Changes between Version 1 and Version 2 of Ticket #37348, comment 4


Ignore:
Timestamp:
Sep 16, 2026, 12:37:42 PM (3 weeks ago)
Author:
Natalia Bidart

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #37348, comment 4

    v1 v2  
    22
    33||= DB =||= Virtual =||= Stored =||= NOT NULL allowed =||= Effect of the null=True removal migration =||
    4 || PostgreSQL || 18+ || 12+ || Yes (stored and virtual) || Emits `ALTER COLUMN ... SET NOT NULL`; fails if NULLs exist (confirmed on PG 18.6) ||
    5 || SQLite || 3.31+ || 3.31+ || Yes || Table rebuild ignores null; no-op (confirmed) ||
    6 || MariaDB || Yes || Yes || Historically no (to verify) || Likely error ||
    7 || SQLite || 3.31+ || 3.31+ || Yes || Table rebuild; effectively a no-op ||
    8 || Oracle || Yes || 23.7+ || Yes || Adds constraint; fails if NULLs exist ||
     4|| PostgreSQL || 18+ || 12+ || `ALTER COLUMN ... SET NOT NULL`; fails if NULLs exist ||
     5|| MySQL || Yes || Yes || `MODIFY` without the `AS` clause is read as converting to a plain column: stored fails on NULLs ("Data truncated"), virtual errors ("Changing the STORED status is not supported") ||
     6|| MariaDB || Yes || Yes || Same `MODIFY`: stored fails on NULLs ("Data truncated"), virtual errors ("This is not yet supported for generated columns") ||
     7|| SQLite || 3.31+ || 3.31+ || Table rebuild ignores null; no-op ||
     8|| Oracle || Yes || 23.7+ || Not run yet ||
    99
    1010The exclude bug affects all backends, except string outputs on Oracle. This backend spread supports the "always nullable" approach. Nobody can know nullability statically, Django doesn't emit NOT NULL on creation anywhere, and the alter path gives different results on each backend. If someone really wants NOT NULL, a CheckConstraint is the portable way to get it.
Back to Top