Replaces choice field segment status with boolean#166
Replaces choice field segment status with boolean#166
Conversation
| @@ -0,0 +1,24 @@ | |||
| # -*- coding: utf-8 -*- | |||
There was a problem hiding this comment.
Can you rename this migration to describe what it is changing?
| self.status = ( | ||
| self.STATUS_ENABLED if self.status == self.STATUS_DISABLED | ||
| else self.STATUS_DISABLED) | ||
| self.enabled = ( |
There was a problem hiding this comment.
Might be able to shorten this to self.enabled = not self.enabled but not sure if that is good practice.
There was a problem hiding this comment.
Explicit before implicit right?
435af54 to
5cd5d4f
Compare
Codecov Report
@@ Coverage Diff @@
## master #166 +/- ##
==========================================
- Coverage 67.51% 67.48% -0.03%
==========================================
Files 55 56 +1
Lines 2358 2362 +4
==========================================
+ Hits 1592 1594 +2
- Misses 766 768 +2
Continue to review full report at Codecov.
|
c55e88a to
2574d29
Compare
Codecov Report
@@ Coverage Diff @@
## master #166 +/- ##
==========================================
- Coverage 92.83% 92.49% -0.35%
==========================================
Files 66 67 +1
Lines 2010 2024 +14
==========================================
+ Hits 1866 1872 +6
- Misses 144 152 +8
Continue to review full report at Codecov.
|
7b16fd6 to
8d07361
Compare
| ('wagtail_personalisation', '0020_rules_delete_relatedqueryname'), | ||
| ] | ||
|
|
||
| operations = [ |
There was a problem hiding this comment.
Status data will be lost without a multi-step migration which:
- create the new field
- populate the new field from the old one
- delete the old field
cc89cda to
c31415b
Compare
Fixes #149