You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should be fairly straight forward. Ideally, you will have a set of migrations which can recreate the current state of your database from scratch (for development etc). In your case, you just want to have a first migration which will create any existing state you have in production.
You can use the dbmate dump command to generate db/schema.sql file containing your current database schema. Then, run a dbmate new import_existing or similar to create a new migration file (under db/migrations/), and copy the relevant table definitions into this file. You can then (in development only - NOT production!) run dbmate drop && dbmate up to try recreating a new development/test database from your migration files.
I have a large existing schema that was manually created.
What are the steps to getting dbmate up to date with this schema and start tracking database migrations through dbmate?
Is there any kind of automation that you can suggest?
The text was updated successfully, but these errors were encountered: