BEGIN; -- -- ACTION CREATE TABLE -- CREATE TABLE "agent_account" ( "id" bigserial PRIMARY KEY, "agentId" uuid NOT NULL, "ownerId" uuid NOT NULL, "name" text NOT NULL, "createdAt" timestamp without time zone NOT NULL, "encryptionPublicKey" bytea, "signingPublicKey" bytea ); -- Indexes CREATE UNIQUE INDEX "agent_account_agent_idx" ON "agent_account" USING btree ("agentId"); CREATE INDEX "agent_account_owner_idx" ON "agent_account" USING btree ("ownerId"); -- -- ACTION CREATE TABLE -- CREATE TABLE "agent_token" ( "id" bigserial PRIMARY KEY, "agentId" uuid NOT NULL, "tokenHash" text NOT NULL, "createdAt" timestamp without time zone NOT NULL, "lastUsedAt" timestamp without time zone ); -- Indexes CREATE UNIQUE INDEX "agent_token_agent_idx" ON "agent_token" USING btree ("agentId"); CREATE UNIQUE INDEX "agent_token_hash_idx" ON "agent_token" USING btree ("tokenHash"); -- -- MIGRATION VERSION FOR halkyon_train -- INSERT INTO "serverpod_migrations" ("module", "version", "timestamp") VALUES ('halkyon_train', '20261111182840467-agents', now()) ON CONFLICT ("module") DO UPDATE SET "version" = '20261111182840467-agents', "timestamp" = now(); -- -- MIGRATION VERSION FOR halkyon_base -- INSERT INTO "serverpod_migrations" ("module", "version", "timestamp") VALUES ('halkyon_base', '20261111182634082-agents', now()) ON CONFLICT ("module") DO UPDATE SET "version" = '20261111182634082-agents', "timestamp" = now(); -- -- MIGRATION VERSION FOR serverpod -- INSERT INTO "serverpod_migrations" ("module", "version", "timestamp") VALUES ('serverpod', '20260824182259319', now()) ON CONFLICT ("module") DO UPDATE SET "version" = '20260824182259319', "timestamp" = now(); -- -- MIGRATION VERSION FOR serverpod_auth_idp -- INSERT INTO "serverpod_migrations" ("module", "version", "timestamp") VALUES ('serverpod_auth_idp', '20260924105404509', now()) ON CONFLICT ("module") DO UPDATE SET "version" = '20260924105404509', "timestamp" = now(); -- -- MIGRATION VERSION FOR serverpod_offline_sync -- INSERT INTO "serverpod_migrations" ("module", "version", "timestamp") VALUES ('serverpod_offline_sync', '20260914143806119', now()) ON CONFLICT ("module") DO UPDATE SET "version" = '20260914143806119', "timestamp" = now(); -- -- MIGRATION VERSION FOR halkyon_oidc -- INSERT INTO "serverpod_migrations" ("module", "version", "timestamp") VALUES ('halkyon_oidc', '20261023180644988', now()) ON CONFLICT ("module") DO UPDATE SET "version" = '20261023180644988', "timestamp" = now(); -- -- MIGRATION VERSION FOR serverpod_auth_core -- INSERT INTO "serverpod_migrations" ("module", "version", "timestamp") VALUES ('serverpod_auth_core', '20260924105232991', now()) ON CONFLICT ("module") DO UPDATE SET "version" = '20260924105232991', "timestamp" = now(); COMMIT;