openreader/packages/database/migrations/postgres/0008_user_job_events.sql
Richard R 358a56cc9a refactor: implement modular monorepo packages
- 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
2026-06-13 13:51:18 -06:00

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");