ceo-api/drizzle/0014_data_sources.sql

15 lines
596 B
SQL

-- CC-068: data_sources registry
CREATE TABLE IF NOT EXISTS "data_sources" (
"id" uuid DEFAULT gen_random_uuid() PRIMARY KEY NOT NULL,
"tenant_id" uuid NOT NULL,
"name" text NOT NULL,
"source_type" text DEFAULT 'manual' NOT NULL,
"description" text,
"connection_info" text,
"status" text DEFAULT 'active' NOT NULL,
"last_sync_at" timestamp,
"record_count" integer,
"tags" text[] DEFAULT '{}' NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL
);