Changes between Initial Version and Version 1 of Ticket #28339, comment 1


Ignore:
Timestamp:
Jun 25, 2017, 7:09:49 PM (7 years ago)
Author:
Craig de Stigter

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28339, comment 1

    initial v1  
    11A tiny test project: https://github.com/craigds/django-28339-testproject
     2
     3Output with that project:
     4
     5{{{
     6#!sql
     7$ ./tp3/manage.py sqlmigrate a 0001
     8BEGIN;
     9--
     10-- Create model B
     11--
     12CREATE TABLE "a_b" ("id" serial NOT NULL PRIMARY KEY);
     13--
     14-- Create model C
     15--
     16CREATE TABLE "a_c" ("id" serial NOT NULL PRIMARY KEY, "b_id" integer NOT NULL);
     17ALTER TABLE "a_c" ADD CONSTRAINT "a_c_b_id_5a026661_fk_a_b_id" FOREIGN KEY ("b_id") REFERENCES "a_b" ("id") DEFERRABLE INITIALLY DEFERRED;
     18CREATE INDEX "a_c_b_id_5a026661" ON "a_c" ("b_id");
     19COMMIT;
     20}}}
     21
     22
     23{{{
     24#!sql
     25$ ./tp3/manage.py sqlmigrate a 0002
     26BEGIN;
     27--
     28-- Alter field b on c
     29--
     30COMMIT;
     31}}}
Back to Top