66 lines
2 KiB
MySQL
66 lines
2 KiB
MySQL
|
|
BEGIN;
|
||
|
|
|
||
|
|
--
|
||
|
|
-- ACTION CREATE TABLE
|
||
|
|
--
|
||
|
|
CREATE TABLE "public_profile" (
|
||
|
|
"id" bigserial PRIMARY KEY,
|
||
|
|
"authUserId" uuid NOT NULL,
|
||
|
|
"handle" text NOT NULL,
|
||
|
|
"handleKey" text NOT NULL,
|
||
|
|
"displayName" text NOT NULL,
|
||
|
|
"bio" text NOT NULL,
|
||
|
|
"links" json NOT NULL,
|
||
|
|
"verifiedLinks" json,
|
||
|
|
"avatarHash" text,
|
||
|
|
"firstPublishedAt" timestamp without time zone,
|
||
|
|
"updatedAt" timestamp without time zone NOT NULL
|
||
|
|
);
|
||
|
|
|
||
|
|
-- Indexes
|
||
|
|
CREATE UNIQUE INDEX "public_profile_person_idx" ON "public_profile" USING btree ("authUserId");
|
||
|
|
CREATE UNIQUE INDEX "public_profile_handle_idx" ON "public_profile" USING btree ("handleKey");
|
||
|
|
|
||
|
|
|
||
|
|
--
|
||
|
|
-- MIGRATION VERSION FOR halkyon_todo
|
||
|
|
--
|
||
|
|
INSERT INTO "serverpod_migrations" ("module", "version", "timestamp")
|
||
|
|
VALUES ('halkyon_todo', '20261019201213254-profiles', now())
|
||
|
|
ON CONFLICT ("module")
|
||
|
|
DO UPDATE SET "version" = '20261019201213254-profiles', "timestamp" = now();
|
||
|
|
|
||
|
|
--
|
||
|
|
-- MIGRATION VERSION FOR halkyon_base
|
||
|
|
--
|
||
|
|
INSERT INTO "serverpod_migrations" ("module", "version", "timestamp")
|
||
|
|
VALUES ('halkyon_base', '20261019200558685', now())
|
||
|
|
ON CONFLICT ("module")
|
||
|
|
DO UPDATE SET "version" = '20261019200558685', "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_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;
|