diff --git a/li.strolch.persistence.postgresql/src/main/resources/strolch_db_schema_0.7.0_migration.sql b/li.strolch.persistence.postgresql/src/main/resources/strolch_db_schema_0.7.0_migration.sql index 925edbb67..f14de389c 100644 --- a/li.strolch.persistence.postgresql/src/main/resources/strolch_db_schema_0.7.0_migration.sql +++ b/li.strolch.persistence.postgresql/src/main/resources/strolch_db_schema_0.7.0_migration.sql @@ -1,5 +1,11 @@ -CREATE TYPE log_severity_type AS ENUM ('Info', 'Notification', 'Warning', 'Error', 'Exception'); +DO $$ +BEGIN + IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'log_severity_type') THEN + CREATE TYPE log_severity_type AS ENUM ('Info', 'Notification', 'Warning', 'Error', 'Exception'); + END IF; +END$$; + CREATE TABLE IF NOT EXISTS operations_log ( id varchar(255) PRIMARY KEY,