Files
simrsx-be/cmd/main-migration/migrations/20251119063438.sql
2025-11-19 13:35:19 +07:00

5 lines
337 B
SQL

-- Modify "Person" table
ALTER TABLE "public"."Person" DROP CONSTRAINT "uni_Person_ResidentIdentityNumber", ALTER COLUMN "ResidentIdentityNumber" TYPE text;
-- Create index "idx_resident_identity" to table: "Person"
CREATE UNIQUE INDEX "idx_resident_identity" ON "public"."Person" ("ResidentIdentityNumber") WHERE ("DeletedAt" IS NULL);