nextbase-nextjs-supabase-starter icon indicating copy to clipboard operation
nextbase-nextjs-supabase-starter copied to clipboard

Add supabase cli action

Open romain-sen opened this issue 2 years ago โ€ข 4 comments

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

romain-sen avatar Jun 19 '23 08:06 romain-sen

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.

imbhargav5 avatar Jun 19 '23 09:06 imbhargav5

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?

romain-sen avatar Jun 19 '23 11:06 romain-sen

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 avatar Jun 19 '23 11:06 imbhargav5

This is a great idea. For sure.

imbhargav5 avatar Jun 19 '23 11:06 imbhargav5