Open ShipraShalini opened 1 year ago
What about creating the aerich table manually via sql ddl and then runnning aerich upgrade
?
+1, rn i'm keep clean db dump with aerich table only in my git repo as a workaround
I had the same problem, trying to initialize a duplicate db with aerich init-db
but it did not work:
Inited my_app already, or delete migrations/my_app and try again.
I just had to run aerich upgrade
on the duplicate database instead, to create the tables, and it works well now. No need for manual creation in my case.
Make sure you have properly run aerich init
and aerich init-db
on the original database beforehand though.
I am trying to initialise
aerich
for an existing project which has configuration files and many migration files, in a new environment with a fresh db.aerich init-db --safe true
throwsInited models already, or delete migrations/models and try again.
but the aerich table is not created.aerich heads
saysNo available heads, try migrate first
aerich upgrade
saysNo upgrade items found
I don't want to run
aerich migrate
as the migration files are version controlled.How can I achieve running all migrations (including the
aerich
table) in a new environment?Similar to #267