postgresql - How can I create a foreign key constraint using Yesod/Persistent? -
postgresql - How can I create a foreign key constraint using Yesod/Persistent? -
is there way create foreign key constraint using persistent's schema syntax postgres backend? or need manually sql? specifically, on delete cascade
relationship such when hackday
deleted, of kid project
s deleted:
hackday title text created utctime default=now() votingclosed bool default=false deriving show project hackday hackdayid title text creators text votes int default=0 created utctime default=now() deriving show
persistent not have built-in back upwards triggers, though it's we've been wanting add together (simply lacking manpower). now, you'll have add together trigger manually.
postgresql migration yesod persistent
Comments
Post a Comment