Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. (env) Kajs-MacBook-Pro:umesee kajnygren$ python manage.py makemigrations
  2. You are trying to change the nullable field 'company' on accounting to non-nullable without a default; we can't do that (the database needs something to populate existing rows).
  3. Please select a fix:
  4. 1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
  5. 2) Ignore for now, and let me handle existing rows with NULL myself (e.g. because you added a RunPython or RunSQL operation to handle NULL values in a previous data migration)
  6. 3) Quit, and let me add a default in models.py
  7. Select an option: 1
  8. Please enter the default value now, as valid Python
  9. The datetime and django.utils.timezone modules are available, so you can do e.g. timezone.now
  10. Type 'exit' to exit this prompt
  11. >>> 1
  12. You are trying to change the nullable field 'accounting' on accountingdata to non-nullable without a default; we can't do that (the database needs something to populate existing rows).
  13. Please select a fix:
  14. 1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
  15. 2) Ignore for now, and let me handle existing rows with NULL myself (e.g. because you added a RunPython or RunSQL operation to handle NULL values in a previous data migration)
  16. 3) Quit, and let me add a default in models.py
  17. Select an option: 1
  18. Please enter the default value now, as valid Python
  19. The datetime and django.utils.timezone modules are available, so you can do e.g. timezone.now
  20. Type 'exit' to exit this prompt
  21. >>> 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement