db.migration.postgres.V1_035__AttachmentsId.sql Maven / Gradle / Ivy
ALTER TABLE "process_attachments" ADD COLUMN "new_id" INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1 INCREMENT BY 1);
ALTER TABLE "process_attachments" DROP CONSTRAINT "process_attachments_pkey";
ALTER TABLE "process_attachments" DROP COLUMN "id";
ALTER TABLE "process_attachments" RENAME COLUMN "new_id" TO "id";
ALTER TABLE "process_attachments" ADD PRIMARY KEY ("id");