From ea01d08ee3d05b951b289bae7189be55551faa93 2018-02-28 19:48:16 From: Marcin Lulek Date: 2018-02-28 19:48:16 Subject: [PATCH] alert_channels: it should also be a pkey --- diff --git a/backend/src/appenlight/migrations/versions/e9fcfbdd9498_connect_resources_to_alert_channels.py b/backend/src/appenlight/migrations/versions/e9fcfbdd9498_connect_resources_to_alert_channels.py index 08599aa..d048267 100644 --- a/backend/src/appenlight/migrations/versions/e9fcfbdd9498_connect_resources_to_alert_channels.py +++ b/backend/src/appenlight/migrations/versions/e9fcfbdd9498_connect_resources_to_alert_channels.py @@ -19,10 +19,12 @@ def upgrade(): 'channels_resources', sa.Column('channel_pkey', sa.Integer, sa.ForeignKey('alert_channels.pkey', - ondelete='CASCADE', onupdate='CASCADE')), + ondelete='CASCADE', onupdate='CASCADE'), + primary_key=True), sa.Column('resource_id', sa.Integer, sa.ForeignKey('resources.resource_id', - ondelete='CASCADE', onupdate='CASCADE')) + ondelete='CASCADE', onupdate='CASCADE'), + primary_key=True) )