From 352c6ff5481c18e60b0876d41ec1b47b71b4c001 Mon Sep 17 00:00:00 2001 From: Martin Carlsson Date: Fri, 12 Feb 2021 11:06:50 +0100 Subject: [PATCH] P5-6033 blacklist collections (#188) --- migrations/000.306.sql | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 migrations/000.306.sql diff --git a/migrations/000.306.sql b/migrations/000.306.sql new file mode 100644 index 0000000..7e2665f --- /dev/null +++ b/migrations/000.306.sql @@ -0,0 +1,21 @@ +-- P5-6033: blacklist collections + + +create table collections_blacklist ( + id serial primary key, + collection_id integer not null, + market_id integer not null, + unique(collection_id, market_id) +); + + +alter table collections_blacklist + add constraint collection_fkey + foreign key (collection_id) + references collections(id) match simple; + + +alter table collections_blacklist + add constraint market_fkey + foreign key (market_id) + references markets(id) match simple;