#32502: Replace SQLite schema table rebuild by ALTER functions when supported
--------------------------------------+------------------------------------
Reporter: Simon Charette | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by Mariusz Felisiak:
Old description:
> Per https://www.sqlite.org/lang_altertable.html
>
> - `ALTER TABLE RENAME COLUMN` is
> [https://www.sqlite.org/search?s=c&q=RENAME+COLUMN supported since 3.25
> but had issues with unique columns until 3.27]
> - `ALTER TABLE ADD COLUMN` is
> [https://www.sqlite.org/search?s=c&q=ADD+COLUMN supported since 3.2.0]
> not sure why it wasn't used in the first place since 3.2 was released in
> 2005? (added in 2f73e5406d54cb8945e187eff302a3a3373350be)
> - `ALTER TABLE DROP COLUMN`
> [https://www.sqlite.org/draft/releaselog/3_35_0.html will be supported by
> 3.35]
>
> This will leave only `ALTER COLUMN` and `ADD/REMOVE CONSTRAINT` that must
> be emulated on SQLite 3.35+
New description:
Per https://www.sqlite.org/lang_altertable.html
- ~~`ALTER TABLE RENAME COLUMN` is
[https://www.sqlite.org/search?s=c&q=RENAME+COLUMN supported since 3.25
but had issues with unique columns until 3.27] ~~ (duplicate of #29763).
- `ALTER TABLE ADD COLUMN` is
[https://www.sqlite.org/search?s=c&q=ADD+COLUMN supported since 3.2.0] not
sure why it wasn't used in the first place since 3.2 was released in 2005?
(added in 2f73e5406d54cb8945e187eff302a3a3373350be)
- `ALTER TABLE DROP COLUMN`
[https://www.sqlite.org/draft/releaselog/3_35_0.html will be supported by
3.35]
This will leave only `ALTER COLUMN` and `ADD/REMOVE CONSTRAINT` that must
be emulated on SQLite 3.35+
--
--
Ticket URL: <https://code.djangoproject.com/ticket/32502#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.fad225ba8937fddebe63bc60775460aa%40djangoproject.com.