Does anyone know what is the correct way to migrate to production databases?
c
chipilov
10/27/2021, 1:26 PM
can you be a little more specific? Maybe provide an example or the details of your use case
y
yurix
10/27/2021, 1:41 PM
I have a file 'schema.sql' with the definition of all tables, functions, RSL policies, etc.
So far, as my tables changed, I have been modifying manually through the GUI to Supabase, however, this can be dangerous and I like to automate it, but I do not know how to do it correctly
c
chipilov
10/27/2021, 1:48 PM
Ok, just to make sure we are on the same page - you need a way to automate the process of syncing the db schema changes in a dev environment to your prod environemtn, correct?
y
yurix
10/27/2021, 2:04 PM
That is, I have tried what they explain in this post, but it does not work, the generated script does some crazy things, such as it makes use of relationships, tables or limitations before even defining it, and of course, the resulting script does not work.
https://supabase.io/blog/2021/03/31/supabase-cli#migrations
Thanks for sharing, I'll try. I had ruled out "migra" because of what it said in the article (which was second on the list), but at the moment it seems like the solution, thanks!