Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#31411 closed Cleanup/optimization (fixed)

Use RENAME COLUMN on MariaDB 10.5.2+.

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

Description

We can simplify renaming columns on MariaDB 10.5.2 with a default (from BaseDatabaseSchemaEditor) ALTER TABLE ... RENAME COLUMN ... TO ... statement.

See https://mariadb.com/kb/en/alter-table/#rename-column.

Change History (8)

comment:1 by Mariusz Felisiak, 5 years ago

Easy pickings: set

comment:2 by Adam Johnson, 5 years ago

Cc: Adam Johnson added

comment:3 by Hasan Ramezani, 5 years ago

Owner: changed from nobody to Hasan Ramezani
Status: newassigned

comment:4 by Carlton Gibson, 5 years ago

Triage Stage: UnreviewedAccepted

comment:5 by Hasan Ramezani, 5 years ago

Has patch: set

comment:6 by Mariusz Felisiak, 5 years ago

Triage Stage: AcceptedReady for checkin

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In 1fe3e24:

Fixed #31411 -- Used RENAME COLUMN on MariaDB 10.5.2+.

comment:8 by GitHub <noreply@…>, 5 years ago

In 9cab261:

Refs #31411 -- Used RENAME COLUMN on MySQL 8.0.4+.

MySQL 8.0.3 added support for this syntax but also imposed a
restriction against ALTER TABLE RENAME on tables in a foreign key
relationship if a LOCK TABLES was active which has been lifted in MySQL
8.0.4+.

Note: See TracTickets for help on using tickets.
Back to Top