Skip to content
This repository has been archived by the owner on Aug 25, 2018. It is now read-only.

Migration error when migration entry has "on_delete: :nullify" #111

Closed
jmufugi opened this issue Jun 23, 2018 · 1 comment
Closed

Migration error when migration entry has "on_delete: :nullify" #111

jmufugi opened this issue Jun 23, 2018 · 1 comment

Comments

@jmufugi
Copy link

jmufugi commented Jun 23, 2018

I am getting error when migration entry has "on_delete: :nullify"
"Unexpected error while running migrations: syntax error at or near "NULLIFY"
Seems :nullify is not converted to sql "SET NULL" "
Bug in lucky_migrator.

oneiros added a commit to oneiros/lucky_migrator that referenced this issue Jul 6, 2018
paulcsmith pushed a commit that referenced this issue Jul 12, 2018
* Use `SET NULL` instead of `NULLIFY`.

According to

https://www.postgresql.org/docs/9.5/static/ddl-constraints.html

this should be the right syntax. See #111

* Remove trailing whitespace.

* Use on delete strategies consistently.

Use the same code to generate correct SQL for create
table and create foreign key statements.
@paulcsmith
Copy link
Member

Closed by #117 (review)

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

No branches or pull requests

2 participants