Opened 4 years ago

Closed 4 years ago

#23308 closed Bug (duplicate)

Running a migration fails when adding a foreign key to another app

Reported by: amarsahinovic Owned by: nobody
Component: Migrations Version: 1.7-rc-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


I'm unable to create a foreign key to another application after running initial migrations to create the models and later adding an additional foreign key to one of them. It makes the migration, but it fails when I try to execute it.

I've created an example project to demonstrate:

Change History (3)

comment:1 Changed 4 years ago by Collin Anderson

Could you try re-generating that 0002 migration with the latest 1.7.x code? When I re-generated it on my computer with the latest code, it added ('articles', '0001_initial'), as a dependency which fixed it.

comment:2 Changed 4 years ago by amarsahinovic

It worked when I used the latest git code. Thank you!

comment:3 Changed 4 years ago by Tim Graham

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top