- Extract database schema and migrations into @openreader/database - Extract startup and orchestration scripts into @openreader/bootstrap - Move compute-worker into packages/compute-worker - Remove runtime dependency on drizzle-kit - Update Dockerfile to deploy isolated packages without merging node_modules
9 lines
No EOL
434 B
SQL
9 lines
No EOL
434 B
SQL
CREATE TABLE "user_job_events" (
|
|
"user_id" text NOT NULL,
|
|
"action" text NOT NULL,
|
|
"op_id" text NOT NULL,
|
|
"created_at" bigint DEFAULT (extract(epoch from now()) * 1000)::bigint NOT NULL,
|
|
CONSTRAINT "user_job_events_user_id_action_op_id_pk" PRIMARY KEY("user_id","action","op_id")
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE INDEX "idx_user_job_events_user_action_created" ON "user_job_events" USING btree ("user_id","action","created_at"); |