Files
lobehub/packages/database/migrations/0047_add_slug_document.sql
2025-11-24 21:15:25 +08:00

3 lines
244 B
SQL

ALTER TABLE "documents" ADD COLUMN IF NOT EXISTS "slug" varchar(255);--> statement-breakpoint
CREATE UNIQUE INDEX IF NOT EXISTS "documents_slug_user_id_unique" ON "documents" USING btree ("slug","user_id") WHERE "documents"."slug" is not null;