- `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?
- `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>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* version: 3.1 => master
* stage: Unreviewed => Someday/Maybe
Comment:
Thanks Simon!
Marking as "Someday/Maybe" because it can we fully implemented after
3.35.0 release (such as #32501).
--
Ticket URL: <https://code.djangoproject.com/ticket/32502#comment:1>
* stage: Someday/Maybe => Accepted
Comment:
https://sqlite.org/releaselog/3_35_0.html
--
Ticket URL: <https://code.djangoproject.com/ticket/32502#comment:2>
* owner: nobody => Girish Sontakke
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/32502#comment:3>
Comment (by GitHub <noreply@…>):
In [changeset:"4e249d11a6e56ca8feb4b055b681cec457ef3a3d" 4e249d1]:
{{{
#!CommitTicketReference repository=""
revision="4e249d11a6e56ca8feb4b055b681cec457ef3a3d"
Refs #32502 -- Added SchemaEditor.prepare_default() on SQLite.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32502#comment:3>
* owner: nobody => Mariusz Felisiak
* status: new => assigned
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/15175 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/32502#comment:4>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"2f73e5406d54cb8945e187eff302a3a3373350be" 2f73e540]:
{{{
#!CommitTicketReference repository=""
revision="2f73e5406d54cb8945e187eff302a3a3373350be"
Refs #32502 -- Avoided table rebuild when adding fields with no default on
SQLite.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32502#comment:5>
* has_patch: 1 => 0
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?
> - `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]
- `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:6>
* owner: Mariusz Felisiak => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/32502#comment:7>
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>
* owner: (none) => Mariusz Felisiak
* status: new => assigned
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/15417 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/32502#comment:9>
Comment (by GitHub <noreply@…>):
In [changeset:"3702819227fd0cdd9b581cd99e11d1561d51cbeb" 37028192]:
{{{
#!CommitTicketReference repository=""
revision="3702819227fd0cdd9b581cd99e11d1561d51cbeb"
Refs #32502 -- Avoided table rebuild when removing fields on SQLite
3.35.5+.
ALTER TABLE ... DROP COLUMN was introduced in SQLite 3.35+ however
a data corruption issue was fixed in SQLite 3.35.5.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32502#comment:10>
* status: assigned => closed
* resolution: => fixed
--
Ticket URL: <https://code.djangoproject.com/ticket/32502#comment:11>