You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide a clean way to use a temporary database whilst in development mode. The problem I have at the moment is if you make a change which requires a database migration, you don't really want to migrate the local database (or spend time writing the migration) until you're sure of the exact nature of the new database schema that you want. Hence in the meantime what you would like to do is be able to run the current state of the code with a new database. I'm typically doing this:
$ cp generated/db.sqlite current.db.sqlite
Then modify the code as much as I like and develop it, until I have the feature working. Then I can work on my new feature, get all the tests passing and such. Then develop the migration, then:
$ cp current.db.sqlite generated/db.sqlite
Check the migration and tests work and then delete the current.db.sqlite.
So basically I think I just want to codify this practice in the manage.py file.
The text was updated successfully, but these errors were encountered:
Provide a clean way to use a temporary database whilst in development mode. The problem I have at the moment is if you make a change which requires a database migration, you don't really want to migrate the local database (or spend time writing the migration) until you're sure of the exact nature of the new database schema that you want. Hence in the meantime what you would like to do is be able to run the current state of the code with a new database. I'm typically doing this:
Then modify the code as much as I like and develop it, until I have the feature working. Then I can work on my new feature, get all the tests passing and such. Then develop the migration, then:
Check the migration and tests work and then delete the
current.db.sqlite
.So basically I think I just want to codify this practice in the
manage.py
file.The text was updated successfully, but these errors were encountered: