Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. ### Release 1, migration 1
  2.  
  3. class Migration(migrations.Migration):
  4.  
  5. dependencies = [
  6. ....
  7. ]
  8.  
  9. operations = [
  10. migrations.AlterField(null=True...),
  11. ]
  12.  
  13.  
  14. ### Release 1, migration 2
  15.  
  16. state_operations = [
  17. migrations.RemoveField(...)
  18. ]
  19.  
  20.  
  21. class Migration(migrations.Migration):
  22.  
  23. dependencies = [
  24. ('trading', '0001_initial'),
  25. ('data', '0003_auto_20190510_2010'),
  26. ]
  27.  
  28. operations = [
  29. migrations.SeparateDatabaseAndState(
  30. state_operations=state_operations,
  31. )
  32. ]
  33.  
  34.  
  35. ### Release 2, migration 1
  36.  
  37.  
  38. class Migration(migrations.Migration):
  39.  
  40. dependencies = [
  41. ('trading', '0001_initial'),
  42. ('data', '0003_auto_20190510_2010'),
  43. ]
  44.  
  45. operations = [
  46. migrations.RunSQL("DROP field from table")
  47. )
  48. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement