From 3fc548058bac5ef33f3955f4188bf6bea9ac9311 Mon Sep 17 00:00:00 2001 From: WriterV2 Date: Wed, 6 Nov 2024 17:38:25 +0100 Subject: Feat: Update db to set tag for product instead of specific product --- migrations/20241106161637_tagredesign.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 migrations/20241106161637_tagredesign.sql (limited to 'migrations') diff --git a/migrations/20241106161637_tagredesign.sql b/migrations/20241106161637_tagredesign.sql new file mode 100644 index 0000000..c33cec3 --- /dev/null +++ b/migrations/20241106161637_tagredesign.sql @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS storytag; +DROP TABLE IF EXISTS gametag; +DROP TABLE IF EXISTS tooltag; + +CREATE TABLE IF NOT EXISTS producttag +( + pid INTEGER NOT NULL, + tid INTEGER NOT NULL, + FOREIGN KEY (pid) REFERENCES product(id), + FOREIGN KEY (tid) REFERENCES tag(id), + PRIMARY KEY (pid, tid) +); + -- cgit v1.2.3