feat: bootstrap supply intelligence baseline
This commit is contained in:
21
migrations/0001_init.sql
Normal file
21
migrations/0001_init.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
CREATE TABLE IF NOT EXISTS supply_intelligence_account_routing_states (
|
||||
account_id BIGINT PRIMARY KEY,
|
||||
platform TEXT NOT NULL,
|
||||
account_status TEXT NOT NULL,
|
||||
routing_enabled BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
risk_score INTEGER NOT NULL DEFAULT 0,
|
||||
reason_code TEXT NOT NULL DEFAULT '',
|
||||
last_probe_at TIMESTAMPTZ NOT NULL,
|
||||
version BIGINT NOT NULL DEFAULT 1
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS supply_intelligence_package_change_events (
|
||||
event_id TEXT PRIMARY KEY,
|
||||
event_type TEXT NOT NULL,
|
||||
package_id BIGINT NOT NULL,
|
||||
platform TEXT NOT NULL,
|
||||
model TEXT NOT NULL,
|
||||
occurred_at TIMESTAMPTZ NOT NULL,
|
||||
version BIGINT NOT NULL,
|
||||
ack_status TEXT NOT NULL DEFAULT 'pending'
|
||||
);
|
||||
Reference in New Issue
Block a user