diff --git a/src/main/resources/db/migration/V5_12__Alter-dmp-audit-table.sql b/src/main/resources/db/migration/V5_12__Alter-dmp-audit-table.sql new file mode 100644 index 00000000..c69eb68a --- /dev/null +++ b/src/main/resources/db/migration/V5_12__Alter-dmp-audit-table.sql @@ -0,0 +1,4 @@ +ALTER TABLE auditing_dmp DROP CONSTRAINT auditing_dmp_pkey CASCADE; +ALTER TABLE auditing_dmp ALTER COLUMN _id DROP DEFAULT; +ALTER TABLE auditing_dmp ALTER COLUMN _id TYPE varchar, +ADD PRIMARY KEY (_id); diff --git a/src/main/resources/db/migration/V5_7__create_audit_table_for_dmp.sql b/src/main/resources/db/migration/V5_7__create_audit_table_for_dmp.sql index d806e929..f7ad2851 100644 --- a/src/main/resources/db/migration/V5_7__create_audit_table_for_dmp.sql +++ b/src/main/resources/db/migration/V5_7__create_audit_table_for_dmp.sql @@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS auditing_dmp ( - _id varchar NOT NULL PRIMARY KEY, + _id uuid DEFAULT uuid_generate_v4 () NOT NULL PRIMARY KEY, user_id uuid NOT NULL, api varchar NOT NULL, method varchar NOT NULL,