From b7d73ab95de7b8e6f6485b9412ce68a61f54d4d9 Mon Sep 17 00:00:00 2001 From: Dariusz Kedzierski <dkedzierski@syncad.com> Date: Wed, 24 Jun 2020 16:28:19 +0200 Subject: [PATCH] Added PK to hive_post_tags --- hive/db/schema.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hive/db/schema.py b/hive/db/schema.py index d58d383b7..75cafd4f6 100644 --- a/hive/db/schema.py +++ b/hive/db/schema.py @@ -220,6 +220,7 @@ def build_metadata(): 'hive_post_tags', metadata, sa.Column('post_id', sa.Integer, nullable=False), sa.Column('tag_id', sa.Integer, nullable=False), + sa.PrimaryKeyConstraint('post_id', 'tag_id', name='hive_post_tags_pk1'), sa.ForeignKeyConstraint(['post_id'], ['hive_posts.id']), sa.ForeignKeyConstraint(['tag_id'], ['hive_tag_data.id']), ) -- GitLab