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

Migration fails if entities are not topologically sorted #32

Closed
meteficha opened this issue Dec 27, 2011 · 3 comments
Closed

Migration fails if entities are not topologically sorted #32

meteficha opened this issue Dec 27, 2011 · 3 comments

Comments

@meteficha
Copy link
Member

If you have

Foo
  ref BarId

Bar

then persistent's migration fails because it first tries to create Foo and then Bar.

For this bug it suffices to do a topological sort inside the migration code.

@gregwebs
Copy link
Member

For workarounds, you can use the printMigration function to get the migration Yesod was going to produce and then manually change it.

@gregwebs
Copy link
Member

@snoyberg Was this addressed in the recent refactoring?

@snoyberg
Copy link
Member

No, it has not been solved. I'm hesitant to implement it without solving circular dependencies (#24) as well, though that shouldn't really be necessary.

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

No branches or pull requests

3 participants