3 ms·
Django. Django generates the schema migrations automatically from the changed table schema definitions that the developer used when testing their branch, and th
by Myrmornis 7y ago
Django. Django generates the schema migrations automatically from the changed table schema definitions that the developer used when testing their branch, and those rarely cause problems. Data migrations need to be tested against staging DBs with realistic data. But neither is really a major pain point: individual developers create and commit the migration files while preparing their branches for review.
- djstein 7y agoreally the best part about Django
- nickserv 7y agoOnly major gotcha is when renaming fields: it'll drop the old field then create a new field, by default. You have to do the renaming by hand, trivial but can't be forgotten... Which is why you always test on staging first of course.
- haihaibye 7y agoMakemigrations detects if the type is the same and asks you if you renamed it. So, when changing columns do the type change and name change in separate migrations and you won't have to do it by hand.