Changes between Initial Version and Version 1 of Ticket #28849


Ignore:
Timestamp:
Nov 26, 2017, 9:42:53 PM (7 years ago)
Author:
Simon Charette
Comment:

Submitted a PR with a regression test for the table rename case.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28849

    • Property Has patch set
    • Property Patch needs improvement set
  • Ticket #28849 – Description

    initial v1  
    1212sqlite> ALTER TABLE foo RENAME TO renamed;
    1313sqlite> .schema bar
    14 CREATE TABLE bar ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "foo_id" integer NOT NULL REFERENCES "foo" ("id") DEFERRABLE INITIALLY DEFERRED);  # It still points to "foo"
     14CREATE TABLE bar ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "foo_id" integer NOT NULL REFERENCES "foo" ("id") DEFERRABLE INITIALLY DEFERRED);  -- It still points to "foo"
    1515sqlite> INSERT INTO bar (foo_id) VALUES (999);
    16 sqlite> PRAGMA foreign_keys = ON; # From Django 2.0+
     16sqlite> PRAGMA foreign_keys = ON; -- From Django 2.0+
    1717sqlite> INSERT INTO bar (foo_id) VALUES (999);
    1818Error: no such table: main.foo
Back to Top