Files

862 B

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, SQL inserts, and data operations, including nested SeparateDatabaseAndState operations, do not prove an empty table. The migration remains fully linted, so top-level and nested RunSQL and RunPython, and operations on existing tables retain their checks. Custom database operations are not trusted as declarative schema operations and therefore invalidate the proof. Table renames also invalidate it because a name can be reused by a populated table.

Rejected. Ignoring all initial migrations or naming them as exemptions. Either option skips unsafe operations that the linter must inspect.