Skip to content

Make user_provision_type NOT NULL#9985

Merged
smklein merged 1 commit into
mainfrom
less-null-silo
Mar 6, 2026
Merged

Make user_provision_type NOT NULL#9985
smklein merged 1 commit into
mainfrom
less-null-silo

Conversation

@smklein

@smklein smklein commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

Part of #9966

These columns are "Not Null" in the Diesel schema, but "Nullable" in the CRDB schema. This PR aligns them.

@smklein smklein requested a review from jmpesp March 5, 2026 23:52

@jmpesp jmpesp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One thing, I assume you thought of this already: is it ok that a single upX.sql contains all those UPDATE and ALTER TABLE statements?

@smklein

smklein commented Mar 6, 2026

Copy link
Copy Markdown
Collaborator Author

One thing, I assume you thought of this already: is it ok that a single upX.sql contains all those UPDATE and ALTER TABLE statements?

It is - there should be "at most one schema-modifying statement" - aka 'DDL' - (the ALTER TABLE) but any number of "data modifying statements" - aka 'DML' - (the UPDATE statements).

It's not visible, but we're implicitly doing extra DML statements within each transaction too, to help verify the database version is correct, and to prevent us from applying old updates.

@smklein

smklein commented Mar 6, 2026

Copy link
Copy Markdown
Collaborator Author

Also as of #9878 we actually have automated tests verifying that each transaction has "at most one" DDL statement

@jmpesp

jmpesp commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

🚀

@smklein smklein merged commit 685088e into main Mar 6, 2026
16 checks passed
@smklein smklein deleted the less-null-silo branch March 6, 2026 19:28
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