2023-10-20 17:01:09 +02:00
|
|
|
DO $$DECLARE
|
|
|
|
this_version CONSTANT varchar := '00.01.002';
|
|
|
|
BEGIN
|
|
|
|
PERFORM * FROM "DBVersion" WHERE version = this_version;
|
|
|
|
IF FOUND THEN RETURN; END IF;
|
|
|
|
|
2023-10-18 16:58:36 +02:00
|
|
|
ALTER TABLE public."EntityDoi"
|
|
|
|
RENAME "ID" TO id;
|
|
|
|
|
|
|
|
ALTER TABLE public."EntityDoi"
|
|
|
|
RENAME "EntityType" TO entity_type;
|
|
|
|
|
|
|
|
ALTER TABLE public."EntityDoi"
|
|
|
|
RENAME "RepositoryId" TO repository_id;
|
|
|
|
|
|
|
|
ALTER TABLE public."EntityDoi"
|
|
|
|
RENAME "Doi" TO doi;
|
|
|
|
|
|
|
|
ALTER TABLE public."EntityDoi"
|
|
|
|
RENAME "CreatedAt" TO created_at;
|
|
|
|
|
|
|
|
ALTER TABLE public."EntityDoi"
|
|
|
|
RENAME "UpdatedAt" TO updated_at;
|
|
|
|
|
|
|
|
ALTER TABLE public."EntityDoi"
|
|
|
|
RENAME "EntityId" TO entity_id;
|
|
|
|
|
|
|
|
ALTER TABLE public."EntityDoi"
|
2023-10-20 17:01:09 +02:00
|
|
|
ADD COLUMN is_active smallint NOT NULL DEFAULT 1
|
|
|
|
|
|
|
|
|
|
|
|
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.002', '2023-10-19 12:00:00.000000+02', now(), 'Align Entity Doi table.');
|
|
|
|
|
|
|
|
END$$;
|