python - Django App - Getting Initial Rows into Database -
i have django application , have few rows want in application @ beginning of time. example system settings table has settings - should setup db instance constructed.
in past, had handled making migration script manually inserted records. however, when run tests , database created , deleted, these scripts not run again , database empty. tests assume migrations have schema migrations, don't need run them again, not case. has led me think maybe migrations shouldn't data migrations , should rethink process? not sure do.
you maybe use fixtures in tests initial data models.
Comments
Post a Comment