#Data Migrations

2 messages · Page 1 of 1 (latest)

storm swift
#

Hi I had a question about managing data. I’m coming from rails world and now working in a Django monolith. In Rails we have the ideas of schema migrations and data migrations as totally separate things. You can run your schema migrations and data migrations independently of each other. This makes sense to me. It seems as though the Django supported way of managing data migrations is via the same migrations that are used to manage the schema. I wasn’t the biggest fan of this at first, have run into a problem with tests. Since the test database runs all migrations during test set up I’ve got all this data in my test database that I don’t expect or want there. My question is two fold: is there a better way of managing data migrations? If not is there a way to specify a migration to not be run during test database set up?

exotic tangle
#

the Django supported way of managing data migrations is via the same migrations that are used to manage the schema.
That's how I understand it