8473 Create and fill trustpilot table (#518)

This commit is contained in:
Anders Gustafsson
2025-11-24 10:37:05 +01:00
committed by GitHub
parent 1a61864bba
commit 27b6bc21ad
2 changed files with 17236 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
CREATE TABLE IF NOT EXISTS trustpilot_ratings (
print_id INTEGER NOT NULL,
trustpilot_business_unit_id TEXT NOT NULL,
rating NUMERIC(3, 2) NOT NULL,
review_count INTEGER NOT NULL,
updated TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
PRIMARY KEY (print_id, trustpilot_business_unit_id),
FOREIGN KEY (print_id) REFERENCES "product-printproducts"(printid) ON DELETE CASCADE
);
CREATE TRIGGER updated_timestamp BEFORE UPDATE ON trustpilot_ratings FOR EACH ROW EXECUTE PROCEDURE updated_timestamp();
+17225
View File
File diff suppressed because it is too large Load Diff