Initial BizOne portal setup

This commit is contained in:
2026-05-11 11:36:33 +07:00
commit 57017dd397
249 changed files with 41305 additions and 0 deletions

View File

@ -0,0 +1,15 @@
ALTER TYPE "UserStatus" ADD VALUE IF NOT EXISTS 'invited';
ALTER TABLE "users"
ALTER COLUMN "password_hash" DROP NOT NULL,
ALTER COLUMN "status" SET DEFAULT 'invited',
ADD COLUMN IF NOT EXISTS "invite_token_hash" TEXT,
ADD COLUMN IF NOT EXISTS "invite_token_expires_at" TIMESTAMP(3),
ADD COLUMN IF NOT EXISTS "email_verified_at" TIMESTAMP(3),
ADD COLUMN IF NOT EXISTS "last_login_at" TIMESTAMP(3);
UPDATE "users"
SET "status" = 'active'
WHERE "status" IS NULL OR "status"::text = 'active';
CREATE INDEX IF NOT EXISTS "users_invite_token_hash_idx" ON "users"("invite_token_hash");