Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncomment foreign keys in core migrations #833

Closed
alexweissman opened this issue Dec 20, 2017 · 2 comments
Closed

Uncomment foreign keys in core migrations #833

alexweissman opened this issue Dec 20, 2017 · 2 comments
Assignees
Labels
data model Related to the db model
Milestone

Comments

@alexweissman
Copy link
Member

See https://forums.userfrosting.com/t/foreign-keys-commented-out-in-migration/139

I had commented these out in 4.0, before we had support for migration dependencies. Now that migration dependencies are supported, we should re-add these.

@alexweissman alexweissman added the data model Related to the db model label Dec 20, 2017
@alexweissman alexweissman added this to the 4.1.16 milestone Dec 20, 2017
@lcharette
Copy link
Member

Note that we should introduce a new migration instead of editing the existing one. Otherwise, existing install will be different than new one. Could also fail when enabling on existing database if existing data doesn't respect the foreign key relations.

This needs to be handled and tested carefully. I suggest it's taken care of in 4.2 instead,

@alexweissman alexweissman modified the milestones: 4.1.16, 4.2.0 Dec 20, 2017
@lcharette lcharette self-assigned this Mar 12, 2018
@lcharette
Copy link
Member

Fixed in 079142f for UF 4.2 !

A new migration is included in 4.2.0 to add the new constraint with the necessary down migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data model Related to the db model
Projects
None yet
Development

No branches or pull requests

2 participants