Changes between Version 3 and Version 4 of Ticket #23956


Ignore:
Timestamp:
Dec 4, 2014, 5:28:59 AM (10 years ago)
Author:
Kirill Gagarski
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23956 – Description

    v3 v4  
    9999            name='A',
    100100            fields=[
    101                 ('a_id', models.IntegerField(serialize=False, primary_key=True)),
     101                ('a_id', models.AutoField(primary_key=True, serialize=False)),
    102102            ],
    103103            options={
     
    108108            name='B',
    109109            fields=[
    110                 ('b_id', models.IntegerField(serialize=False, primary_key=True)),
     110                ('b_id', models.AutoField(primary_key=True, serialize=False)),
    111111            ],
    112112            options={
     
    117117            name='C',
    118118            fields=[
    119                 ('a_ptr', models.OneToOneField(parent_link=True, serialize=False, primary_key=True, to='migrationstest.A', auto_created=True)),
     119                ('a_ptr', models.OneToOneField(primary_key=True, auto_created=True, serialize=False, to='migrationstest.A', parent_link=True)),
    120120            ],
    121121            options={
     
    126126            name='D',
    127127            fields=[
    128                 ('a_ptr', models.OneToOneField(parent_link=True, serialize=False, primary_key=True, to='migrationstest.A', auto_created=True)),
     128                ('a_ptr', models.OneToOneField(primary_key=True, auto_created=True, serialize=False, to='migrationstest.A', parent_link=True)),
    129129            ],
    130130            options={
     
    135135            name='E',
    136136            fields=[
    137                 ('a_ptr', models.OneToOneField(parent_link=True, serialize=False, primary_key=True, to='migrationstest.A', auto_created=True)),
    138                 ('b_ptr', models.OneToOneField(parent_link=True, to='migrationstest.B', auto_created=True)),
     137                ('a_ptr', models.OneToOneField(primary_key=True, auto_created=True, serialize=False, to='migrationstest.A', parent_link=True)),
     138                ('b_ptr', models.OneToOneField(parent_link=True, auto_created=True, to='migrationstest.B')),
    139139            ],
    140140            options={
     
    145145            model_name='d',
    146146            name='b_ptr',
    147             field=models.OneToOneField(parent_link=True, to='migrationstest.B', auto_created=True),
     147            field=models.OneToOneField(parent_link=True, auto_created=True, to='migrationstest.B'),
    148148            preserve_default=True,
    149149        ),
     
    151151            model_name='c',
    152152            name='b_ptr',
    153             field=models.OneToOneField(parent_link=True, to='migrationstest.B', auto_created=True),
     153            field=models.OneToOneField(parent_link=True, auto_created=True, to='migrationstest.B'),
    154154            preserve_default=True,
    155155        ),
     
    163163{{{
    164164BEGIN;
    165 CREATE TABLE "migrationstest_a" ("a_id" integer NOT NULL PRIMARY KEY);
    166 CREATE TABLE "migrationstest_b" ("b_id" integer NOT NULL PRIMARY KEY);
     165CREATE TABLE "migrationstest_a" ("a_id" serial NOT NULL PRIMARY KEY);
     166CREATE TABLE "migrationstest_b" ("b_id" serial NOT NULL PRIMARY KEY);
    167167CREATE TABLE "migrationstest_c" ("b_ptr_id" integer NOT NULL UNIQUE, "a_ptr_id" integer NOT NULL PRIMARY KEY);
    168168CREATE TABLE "migrationstest_d" ("b_ptr_id" integer NOT NULL UNIQUE, "a_ptr_id" integer NOT NULL PRIMARY KEY);
     
    172172ALTER TABLE "migrationstest_c" ADD COLUMN "b_ptr_id" integer NOT NULL UNIQUE;
    173173ALTER TABLE "migrationstest_c" ALTER COLUMN "b_ptr_id" DROP DEFAULT;
    174 ALTER TABLE "migrationstest_c" ADD CONSTRAINT "migrationste_b_ptr_id_6684147e60c05d18_fk_migrationstest_b_b_id" FOREIGN KEY ("b_ptr_id") REFERENCES "migrationstest_b" ("b_id") DEFERRABLE INITIALLY DEFERRED;
    175 ALTER TABLE "migrationstest_c" ADD CONSTRAINT "migrationste_a_ptr_id_2670758b3e821055_fk_migrationstest_a_a_id" FOREIGN KEY ("a_ptr_id") REFERENCES "migrationstest_a" ("a_id") DEFERRABLE INITIALLY DEFERRED;
    176 ALTER TABLE "migrationstest_d" ADD CONSTRAINT "migrationste_b_ptr_id_2ed6e3025678dfb9_fk_migrationstest_b_b_id" FOREIGN KEY ("b_ptr_id") REFERENCES "migrationstest_b" ("b_id") DEFERRABLE INITIALLY DEFERRED;
    177 ALTER TABLE "migrationstest_d" ADD CONSTRAINT "migrationste_a_ptr_id_4d0009d1fad71dec_fk_migrationstest_a_a_id" FOREIGN KEY ("a_ptr_id") REFERENCES "migrationstest_a" ("a_id") DEFERRABLE INITIALLY DEFERRED;
    178 ALTER TABLE "migrationstest_e" ADD CONSTRAINT "migrationste_b_ptr_id_29d2159648c59c3e_fk_migrationstest_b_b_id" FOREIGN KEY ("b_ptr_id") REFERENCES "migrationstest_b" ("b_id") DEFERRABLE INITIALLY DEFERRED;
    179 ALTER TABLE "migrationstest_e" ADD CONSTRAINT "migrationste_a_ptr_id_405a8eb9707708c9_fk_migrationstest_a_a_id" FOREIGN KEY ("a_ptr_id") REFERENCES "migrationstest_a" ("a_id") DEFERRABLE INITIALLY DEFERRED;
    180 ALTER TABLE "migrationstest_d" ADD CONSTRAINT "migrationste_b_ptr_id_2ed6e3025678dfb9_fk_migrationstest_b_b_id" FOREIGN KEY ("b_ptr_id") REFERENCES "migrationstest_b" ("b_id") DEFERRABLE INITIALLY DEFERRED;
    181 ALTER TABLE "migrationstest_c" ADD CONSTRAINT "migrationste_b_ptr_id_6684147e60c05d18_fk_migrationstest_b_b_id" FOREIGN KEY ("b_ptr_id") REFERENCES "migrationstest_b" ("b_id") DEFERRABLE INITIALLY DEFERRED;
     174ALTER TABLE "migrationstest_c" ADD CONSTRAINT "migrationste_b_ptr_id_5529c1e12e7a3aaa_fk_migrationstest_b_b_id" FOREIGN KEY ("b_ptr_id") REFERENCES "migrationstest_b" ("b_id") DEFERRABLE INITIALLY DEFERRED;
     175ALTER TABLE "migrationstest_c" ADD CONSTRAINT "migrationste_a_ptr_id_12130065dfb7292a_fk_migrationstest_a_a_id" FOREIGN KEY ("a_ptr_id") REFERENCES "migrationstest_a" ("a_id") DEFERRABLE INITIALLY DEFERRED;
     176ALTER TABLE "migrationstest_d" ADD CONSTRAINT "migrationste_b_ptr_id_4eee8ae4e0885aaa_fk_migrationstest_b_b_id" FOREIGN KEY ("b_ptr_id") REFERENCES "migrationstest_b" ("b_id") DEFERRABLE INITIALLY DEFERRED;
     177ALTER TABLE "migrationstest_d" ADD CONSTRAINT "migrationste_a_ptr_id_7f0ea1e45cc6092a_fk_migrationstest_a_a_id" FOREIGN KEY ("a_ptr_id") REFERENCES "migrationstest_a" ("a_id") DEFERRABLE INITIALLY DEFERRED;
     178ALTER TABLE "migrationstest_e" ADD CONSTRAINT "migrationste_b_ptr_id_7eec341934e15699_fk_migrationstest_b_b_id" FOREIGN KEY ("b_ptr_id") REFERENCES "migrationstest_b" ("b_id") DEFERRABLE INITIALLY DEFERRED;
     179ALTER TABLE "migrationstest_e" ADD CONSTRAINT "migrationste_a_ptr_id_2c800772a4d234e7_fk_migrationstest_a_a_id" FOREIGN KEY ("a_ptr_id") REFERENCES "migrationstest_a" ("a_id") DEFERRABLE INITIALLY DEFERRED;
     180ALTER TABLE "migrationstest_d" ADD CONSTRAINT "migrationste_b_ptr_id_4eee8ae4e0885aaa_fk_migrationstest_b_b_id" FOREIGN KEY ("b_ptr_id") REFERENCES "migrationstest_b" ("b_id") DEFERRABLE INITIALLY DEFERRED;
     181ALTER TABLE "migrationstest_c" ADD CONSTRAINT "migrationste_b_ptr_id_5529c1e12e7a3aaa_fk_migrationstest_b_b_id" FOREIGN KEY ("b_ptr_id") REFERENCES "migrationstest_b" ("b_id") DEFERRABLE INITIALLY DEFERRED;
    182182
    183183COMMIT;
Back to Top