Opened 3 years ago

Closed 3 years ago

Last modified 17 months ago

#33201 closed Cleanup/optimization (wontfix)

RenameModel with db_table should be a noop.

Reported by: Iuri de Silvio Owned by: Iuri de Silvio
Component: Migrations Version: 3.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

A RenameModel operation that already has db_table defined must be a noop.

In Postgres, it drops and recreates foreign key constraints. In sqlite it recreates the table (as expected for a table renaming).

Change History (9)

comment:1 by Iuri de Silvio, 3 years ago

Owner: changed from nobody to Iuri de Silvio
Status: newassigned

comment:2 by Mariusz Felisiak, 3 years ago

Has patch: set
Summary: RenameModel with db_table recreate constraints.RenameModel with db_table should be a noop.
Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

comment:3 by Iuri de Silvio, 3 years ago

I fixed the patch and it is waiting for review.

comment:4 by Mariusz Felisiak, 3 years ago

Triage Stage: AcceptedReady for checkin

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

Resolution: fixed
Status: assignedclosed

In afeafd60:

Fixed #33201 -- Made RenameModel operation a noop for models with db_table.

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

In 166a3b32:

Fixed #33953 -- Reverted "Fixed #33201 -- Made RenameModel operation a noop for models with db_table."

Regression in afeafd6036616bac8263d762c1610f22241c0187.
This reverts afeafd6036616bac8263d762c1610f22241c0187.

Thanks Timothy Thomas for the report.

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

In 7d5ccbbe:

[4.1.x] Fixed #33953 -- Reverted "Fixed #33201 -- Made RenameModel operation a noop for models with db_table."

Regression in afeafd6036616bac8263d762c1610f22241c0187.
This reverts afeafd6036616bac8263d762c1610f22241c0187.

Thanks Timothy Thomas for the report.

Backport of 166a3b32632c141541d1c3f0eff18e1d8b389404 from main

comment:8 by Mariusz Felisiak, 2 years ago

Has patch: unset
Resolution: fixedwontfix
Triage Stage: Ready for checkinUnreviewed

comment:9 by GitHub <noreply@…>, 17 months ago

In 31090389:

Refs #33201 -- Avoided unnecessary queries when renaming models with db_table on SpatiaLite.

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