Friday, March 31, 2017

Adding fields in model, migrating a sqlite.db in production...good idea?

Hello,
I have a sqlite db that already holds important production data.
Well same time I am developing that application adding functions while I need them.
Well I know not exactly best practice.
Now I need to add two fields to a model (boolean and char),
I want to makemigrations, git add, git commit, git push
Is there any risk of loosing part of the sqlite database here?
Or can I just backup the sqlite file, try to migrate and all the data plus the new empty fields will be there?
If someone with better knowledge can just say "yes should be working"?
Many thanks!
Martin

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d67d940b-b6ce-49f5-902a-aae14ed174d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment