Opened 3 weeks ago

Last modified 2 weeks ago

#37068 assigned New feature

Avoid table rebuild on SQLite 3.53.0+ for NOT NULL and CHECK constraints

Reported by: Adam Johnson Owned by: Adam Johnson
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description (last modified by Adam Johnson)

Per this release note:

Enhance ALTER TABLE to permit adding and removing NOT NULL and CHECK constraints.

…we should be able to extend django/db/backends/sqlite3/schema.py to avoid table rebuilds in those scenarios.

Change History (5)

comment:1 by Tim Graham, 3 weeks ago

Triage Stage: UnreviewedAccepted

comment:2 by Adam Johnson, 3 weeks ago

Description: modified (diff)

comment:3 by Adam Johnson, 3 weeks ago

(Side quest: updating Python to bundle SQLite 3.53.0+ on macOS and Windows: https://github.com/python/cpython/issues/149029)

comment:4 by Adam Johnson, 3 weeks ago

Turns out there was a bug in this feature in SQLite 3.53.0 related to DROP CONSTRAINT, fixed for the next release: https://sqlite.org/forum/info/8bfbaec404

comment:5 by JaeHyuckSa, 2 weeks ago

Patch needs improvement: set
Note: See TracTickets for help on using tickets.
Back to Top