Improve social milestone sharing flow
This commit is contained in:
@@ -28,3 +28,16 @@ ALTER TABLE "SocialMilestone" ADD COLUMN IF NOT EXISTS "language" TEXT NOT NULL
|
||||
ALTER TABLE "SocialMilestone" ADD COLUMN IF NOT EXISTS "cardData" JSONB;
|
||||
CREATE INDEX IF NOT EXISTS "SocialMilestone_status_claimedAt_idx"
|
||||
ON "SocialMilestone" ("status", "claimedAt");
|
||||
|
||||
-- Version 2: independent brand and self-share state plus a consent-gated
|
||||
-- unguessable URL for Open Graph previews. Execute manually once.
|
||||
ALTER TABLE "SocialMilestone" ADD COLUMN IF NOT EXISTS "brandStatus" TEXT NOT NULL DEFAULT 'pending';
|
||||
ALTER TABLE "SocialMilestone" ADD COLUMN IF NOT EXISTS "brandApprovedAt" TIMESTAMP(3);
|
||||
ALTER TABLE "SocialMilestone" ADD COLUMN IF NOT EXISTS "brandPostedAt" TIMESTAMP(3);
|
||||
ALTER TABLE "SocialMilestone" ADD COLUMN IF NOT EXISTS "brandPostUrl" TEXT;
|
||||
ALTER TABLE "SocialMilestone" ADD COLUMN IF NOT EXISTS "brandPostError" TEXT;
|
||||
ALTER TABLE "SocialMilestone" ADD COLUMN IF NOT EXISTS "selfSharedAt" TIMESTAMP(3);
|
||||
ALTER TABLE "SocialMilestone" ADD COLUMN IF NOT EXISTS "shareToken" TEXT;
|
||||
ALTER TABLE "SocialMilestone" ADD COLUMN IF NOT EXISTS "publicShareApprovedAt" TIMESTAMP(3);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS "SocialMilestone_shareToken_key"
|
||||
ON "SocialMilestone" ("shareToken") WHERE "shareToken" IS NOT NULL;
|
||||
|
||||
Reference in New Issue
Block a user