I created an app earlier and ran mix phx.gen.context Dashboards Order orders orderid:string progress_status:integer
and then mix ecto.migrate
then, I deleted that old project and gave it a fresh start by starting from scratch. and ran mix phx.gen.context Dashboards Order orders orderid:string progress_status:integer again.(after basic setup) mix ecto.migrate – throws an error saying db is already made.
Phoenix keeps control of the migrations using a table named schema_migrations. This table contains the list of the already applied migrations.
Running mix ecto.migrations shows the status of the migrations. In this case you have to manually synchronize the table’s content with your migrations files.
Manually add the corresponding entry to the schema_migrations table and remove previous entries if necessary.
If the previous migration exists. Then add the column you want to change in the new migration. Create a new migration basically and recover the previous migration.