imbhargav5 / nextbase-nextjs-supabase-starter

๐Ÿš€โšก๏ธ Free Boilerplate and Starter kit for Next.js 14+, Supabase, Tailwind CSS 3.2 and TypeScript. ๐Ÿš€ Next.js ๐Ÿ”ฅ Supabase ๐Ÿ’ป TypeScript ๐Ÿ’š ESLint ๐ŸŽจ Prettier ๐Ÿถ Husky ๐Ÿงน Lint-Staged ๐Ÿงช Jest ๐Ÿงช Testing Library ๐Ÿ•น๏ธ Playwright โœ๏ธ Commitizen ๐Ÿ’ฌ Commitlint ๐Ÿ’ป VSCode ๐ŸŒช๏ธ Vercel ๐ŸŽจ PostCSS ๐Ÿƒ Tailwind CSS โš›๏ธ React Query
https://open-source-template.usenextbase.com
MIT License
551 stars 113 forks source link

Add supabase cli action #22

Open romain-sen opened 1 year ago

romain-sen commented 1 year ago

How can we add the Supabase CLI action to the workflow properly ? Do we also need to change how we write migrations ?

imbhargav5 commented 1 year ago

So for type generation it seems like there is an easy way in the CLI action. I don't know if migrations in Supabase CLI action make sense to me. Not sure how I would manage them there.

romain-sen commented 1 year ago

Would it be relevant to create an action that, when a file is changed in supabase/migrations/*.sql, updates the types + pushes the migrations to the project db? What do you think?

imbhargav5 commented 1 year ago

I think so. It's the other way around though. It should update the database with the new migrations and then generate the types from the new database structure.

imbhargav5 commented 1 year ago

This is a great idea. For sure.