let's assume i've got tables
book id pk_id name library book_id fk_book_id references book(id) ...
i want add constraint name fk_book_id
library
table, foreign key, references id
field of table book
. how that?
column(name:'book_id'...) { constraints { nullable(false) unique(true) } constraints(foreignkeyname: 'fk_book_id', references: 'book' ... ) // column? }
i know addforeignkeycontraint
method, i'd use constraints
. syntax it?
Comments
Post a Comment