-
Notifications
You must be signed in to change notification settings - Fork 38
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
B 20034 #12631
Conversation
Bundle StatsHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded
Removed
Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
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.
Commits match up. Approving now, but please wait until you have PO acceptance.
@@ -0,0 +1,7 @@ | |||
ALTER TABLE application_parameters | |||
ADD COLUMN IF NOT EXISTS parameter_name TEXT NOT NULL, | |||
ADD COLUMN IF NOT EXISTS parameter_value TEXT NOT NULL, |
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.
these new columns can't be set to null, until they are populated with something
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.
Oh, good catch because we have the existing row being used already. Didn't think about that.
Would adding in a default value be a valid approach?
ADD COLUMN IF NOT EXISTS parameter_name TEXT NOT NULL DEFAULT 'NULL',
ADD COLUMN IF NOT EXISTS parameter_value TEXT NOT NULL DEFAULT 'NULL',
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.
I think we either need to populate it with the current data with how we want it to work, then a separate migration to set it to not null for new rows
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.
or don't have the not null restriction
I haven't looked through the code yet to see if validation code is pulling off the old columns or the new param_value
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.
He could remove the NOT NULL
and then a simple update to the model and make them pointers. That might be easier than making them NOT NULL
and the subsequent updates.
What do you think?
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.
I don't see an issue with the param_name and param_value being allowed to be null, unless someone else sees one. The validation codes are using param_value now.
20034
Integration Review
Summary
This PR updates B-19507 so that the application_parameters table can hold a wider array of parameters.
The tests here are to validate that 19507 still functions as expected.
How to test
Couple of setup things you need to do first:
make db_dev_migrate
(this will create theapplication_parameters
tableparameter_name
, 'parameter_value' andid
,updated_at
andcreated_at
will auto populate.envrc
, setexport FEATURE_FLAG_VALIDATION_CODE_REQUIRED=true
client
andserver
For the happiest path
application_parameters
tableFor the saddest path
Screenshots
Mobile
Mobile