fix: required columns on newly created tables retain migration safety checks
This commit is contained in:
1 parent
d55ba66d44
commit
c7a4376d35
5 files changed
+126
-6
No files matched your search
@@ -0,0 +1,12 @@
|
||||
# Architecture Decisions
|
||||
|
||||
## Required columns on newly created tables
|
||||
|
||||
**Decision.** The `NOT_NULL` SQL check accepts `ALTER TABLE ... ADD COLUMN ... NOT NULL`
|
||||
only when the same migration unconditionally created that exact table. `CREATE TABLE IF
|
||||
NOT EXISTS` does not prove an empty table. The migration remains
|
||||
fully linted, so `RunSQL`, `RunPython`, and operations on existing tables retain their
|
||||
checks.
|
||||
|
||||
**Rejected.** Ignoring all initial migrations or naming them as exemptions. Either option
|
||||
skips unsafe operations that the linter must inspect.
|
||||
Reference in new issue
Block a user