process raw_store_events records automatically via triggers

This commit is contained in:
2025-12-24 01:22:43 -07:00
parent d1978d6a86
commit 11ff52b1c7
11 changed files with 123 additions and 0 deletions
@@ -1,3 +1,5 @@
BEGIN;
CREATE TABLE tiktok_store_events (
platform TEXT NOT NULL DEFAULT 'tiktok' CHECK (platform = 'tiktok'),
store_id TEXT NOT NULL,
@@ -27,3 +29,5 @@ CREATE TABLE wix_store_events (
PRIMARY KEY (store_id, event_id, event_timestamp),
FOREIGN KEY (platform, store_id, event_id, event_timestamp) REFERENCES raw_store_events
);
COMMIT;