Skip to content
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

Add a database default for relaynumber.enabled #2261

Conversation

jwhitlock
Copy link
Member

With a database-enabled default value, the existing v3.6.1 code will continue to work during the period when this migration is run and the new release is not fully deployed.

Tested locally with sqlite3 3.37.0 and PostgreSQL 14.4. CircleCI will run tests against both.

With a database-enabled default value, the existing v3.6.1 code will
continue to work during the period when this migration is run and the
new release is not fully deployed.
@jwhitlock jwhitlock requested a review from groovecoder July 28, 2022 19:18
@netlify
Copy link

netlify bot commented Jul 28, 2022

Deploy Preview for fx-relay-demo canceled.

Name Link
🔨 Latest commit 530ed29
🔍 Latest deploy log https://app.netlify.com/sites/fx-relay-demo/deploys/62e2e10d4eb9410008ba27eb

@jwhitlock
Copy link
Member Author

Copy link
Member

@groovecoder groovecoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved with just 1 Q to make sure I understand and don't mess up the merge.

Comment on lines +63 to +67
migrations.RunPython(
code=add_db_default_forward_func,
reverse_code=migrations.RunPython.noop,
elidable=True,
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it matter if this runs before/after the migrations.AddField?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes for the PostgreSQL variant, no for the SQLite variant, so yes

@jwhitlock jwhitlock merged commit cee23a7 into add-relaynumber-block-toggle-mpp-2223 Jul 29, 2022
@jwhitlock jwhitlock deleted the add-relaynumber-enabled-db-default-mpp-2223 branch July 29, 2022 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants