Updating EntityDoi db script removing problematic column entity_type and adding a new one with the same name of type smallint in order for the queries to work properly

This commit is contained in:
Thomas Georgios Giannos 2023-12-06 18:02:42 +02:00
parent 9ba8751564
commit 8227f60cda
1 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,7 @@ ALTER TABLE public."EntityDoi"
RENAME "ID" TO id;
ALTER TABLE public."EntityDoi"
RENAME "EntityType" TO entity_type;
DROP COLUMN "EntityType";
ALTER TABLE public."EntityDoi"
RENAME "RepositoryId" TO repository_id;
@ -25,6 +25,9 @@ ALTER TABLE public."EntityDoi"
ALTER TABLE public."EntityDoi"
RENAME "EntityId" TO entity_id;
ALTER TABLE public."EntityDoi"
ADD COLUMN entity_type smallint NOT NULL DEFAULT 0;
ALTER TABLE public."EntityDoi"
ADD COLUMN is_active smallint NOT NULL DEFAULT 1;