trying a CMD fix for docker and added FK relationship to users table (#10)
Reviewed-on: #10 Co-authored-by: Joseph Nelson <joseph.nelson4456@gmail.com> Co-committed-by: Joseph Nelson <joseph.nelson4456@gmail.com>
This commit was merged in pull request #10.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
export const up = (pgm) => {
|
||||
pgm.sql(
|
||||
'ALTER TABLE collections ADD CONSTRAINT fk_collections_user_id FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE'
|
||||
)
|
||||
pgm.sql(
|
||||
'ALTER TABLE sets ADD CONSTRAINT fk_sets_user_id FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE'
|
||||
)
|
||||
}
|
||||
|
||||
export const down = (pgm) => {
|
||||
pgm.sql('ALTER TABLE collections DROP CONSTRAINT fk_collections_user_id')
|
||||
pgm.sql('ALTER TABLE sets DROP CONSTRAINT fk_sets_user_id')
|
||||
}
|
||||
Reference in New Issue
Block a user