8473 Create and fill trustpilot table (#518)
This commit is contained in:
@@ -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
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user