Manually creating/editing Ecto migrations to match an existing DB

While building my Phoenix LiveView application, whenever I’ve needed to add a table column to the database, I used the traditional SQL commands at the postgres CLI, then manually updated the table’s Ecto schema file to include the new column. Now I am wanting the deploy the app elsewhere, but the migrations don’t have the appropriate columns to match with the development DB. Is there a guide somewhere for creating or editing migrations manually, based on an existing psql database?

Thanks in advance!

Check this out?

https://hexdocs.pm/ecto_sql/Mix.Tasks.Ecto.Dump.html#content

1 Like