Skip to content

How to create many things in one hook only? Why this code doesn't work? #380

Answered by vmihailenco
frederikhors asked this question in Q&A
Discussion options

You must be logged in to vote

AfterCreateTable is run after the table is created so query.ForeignKey(("team_id") REFERENCES "teams" ("id")) does not make any difference / is ignored. You should move it to BeforeCreateTable.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by frederikhors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants