-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replaces choice field segment status with boolean #166
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,24 @@ | |||
# -*- coding: utf-8 -*- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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