Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

define MiVideo table relationships (#183) #194

Merged
merged 3 commits into from
Jun 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions db/migrations/0021.add_mivideo_fk.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'''
Migration to add MiVideo table foreign key
'''

from yoyo import step

__depends__ = {'0016.add_mivideo_creation_tables'}

steps = [
step('''
ALTER TABLE mivideo_media_courses
ADD CONSTRAINT fk_media_id
FOREIGN KEY (media_id)
REFERENCES mivideo_media_created(id)
ON UPDATE CASCADE
ON DELETE CASCADE;
'''),
]
lsloan marked this conversation as resolved.
Show resolved Hide resolved