From c3dfcc1be309f6de06168841a7224b03c5f075e0 Mon Sep 17 00:00:00 2001 From: Jens Pelzetter Date: Mon, 30 Jan 2023 19:58:55 +0100 Subject: [PATCH] Fix primary key of localized string audit tables --- ...primary_key_of_localized_string_tables.sql | 31 +++++++++++++++++++ ...primary_key_of_localized_string_tables.sql | 31 +++++++++++++++++++ ...primary_key_of_localized_string_tables.sql | 15 +++++++++ ...primary_key_of_localized_string_tables.sql | 15 +++++++++ ...primary_key_of_localized_string_tables.sql | 15 +++++++++ ...primary_key_of_localized_string_tables.sql | 15 +++++++++ 6 files changed, 122 insertions(+) create mode 100644 sci-publications/src/main/resources/db/migrations/org/scientificcms/sci_publications/h2/V7_0_0_3__remove_localized_value_from_primary_key_of_localized_string_tables.sql create mode 100644 sci-publications/src/main/resources/db/migrations/org/scientificcms/sci_publications/pgsql/V7_0_0_3__remove_localized_value_from_primary_key_of_localized_string_tables.sql create mode 100644 sci-types-department/src/main/resources/db/migrations/org/scientificcms/sci_types_department/h2/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql create mode 100644 sci-types-department/src/main/resources/db/migrations/org/scientificcms/sci_types_department/pgsql/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql create mode 100644 sci-types-project/src/main/resources/db/migrations/org/scientificcms/sci_types_project/h2/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql create mode 100644 sci-types-project/src/main/resources/db/migrations/org/scientificcms/sci_types_project/pgsql/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql diff --git a/sci-publications/src/main/resources/db/migrations/org/scientificcms/sci_publications/h2/V7_0_0_3__remove_localized_value_from_primary_key_of_localized_string_tables.sql b/sci-publications/src/main/resources/db/migrations/org/scientificcms/sci_publications/h2/V7_0_0_3__remove_localized_value_from_primary_key_of_localized_string_tables.sql new file mode 100644 index 0000000..89feed7 --- /dev/null +++ b/sci-publications/src/main/resources/db/migrations/org/scientificcms/sci_publications/h2/V7_0_0_3__remove_localized_value_from_primary_key_of_localized_string_tables.sql @@ -0,0 +1,31 @@ +alter table sci_publications.journal_descriptions_aud + drop constraint journal_descriptions_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_publications.publication_titles_aud + drop constraint publication_titles_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_publications.publication_short_descs_aud + drop constraint publication_short_descs_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_publications.publication_abstracts_aud + drop constraint publication_abstracts_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_publications.publication_misc_aud + drop constraint publication_misc_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_publications.publication_edition_aud + drop constraint publication_edition_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_publications.series_titles_aud + drop constraint series_titles_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_publications.series_descriptions_aud + drop constraint series_descriptions_aud_pkey, + add primary key (rev, object_id, locale); diff --git a/sci-publications/src/main/resources/db/migrations/org/scientificcms/sci_publications/pgsql/V7_0_0_3__remove_localized_value_from_primary_key_of_localized_string_tables.sql b/sci-publications/src/main/resources/db/migrations/org/scientificcms/sci_publications/pgsql/V7_0_0_3__remove_localized_value_from_primary_key_of_localized_string_tables.sql new file mode 100644 index 0000000..89feed7 --- /dev/null +++ b/sci-publications/src/main/resources/db/migrations/org/scientificcms/sci_publications/pgsql/V7_0_0_3__remove_localized_value_from_primary_key_of_localized_string_tables.sql @@ -0,0 +1,31 @@ +alter table sci_publications.journal_descriptions_aud + drop constraint journal_descriptions_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_publications.publication_titles_aud + drop constraint publication_titles_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_publications.publication_short_descs_aud + drop constraint publication_short_descs_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_publications.publication_abstracts_aud + drop constraint publication_abstracts_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_publications.publication_misc_aud + drop constraint publication_misc_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_publications.publication_edition_aud + drop constraint publication_edition_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_publications.series_titles_aud + drop constraint series_titles_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_publications.series_descriptions_aud + drop constraint series_descriptions_aud_pkey, + add primary key (rev, object_id, locale); diff --git a/sci-types-department/src/main/resources/db/migrations/org/scientificcms/sci_types_department/h2/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql b/sci-types-department/src/main/resources/db/migrations/org/scientificcms/sci_types_department/h2/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql new file mode 100644 index 0000000..1fbd207 --- /dev/null +++ b/sci-types-department/src/main/resources/db/migrations/org/scientificcms/sci_types_department/h2/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql @@ -0,0 +1,15 @@ +alter table sci_types_department.department_short_descs_aud + drop constraint department_short_descs_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_types_department.department_descs_aud + drop constraint department_descs_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_types_department.department_addendum_aud + drop constraint department_addendum_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_types_department.department_text_values_aud + drop constraint department_text_values_aud_pkey, + add primary key (rev, object_id, locale); \ No newline at end of file diff --git a/sci-types-department/src/main/resources/db/migrations/org/scientificcms/sci_types_department/pgsql/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql b/sci-types-department/src/main/resources/db/migrations/org/scientificcms/sci_types_department/pgsql/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql new file mode 100644 index 0000000..1fbd207 --- /dev/null +++ b/sci-types-department/src/main/resources/db/migrations/org/scientificcms/sci_types_department/pgsql/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql @@ -0,0 +1,15 @@ +alter table sci_types_department.department_short_descs_aud + drop constraint department_short_descs_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_types_department.department_descs_aud + drop constraint department_descs_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_types_department.department_addendum_aud + drop constraint department_addendum_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_types_department.department_text_values_aud + drop constraint department_text_values_aud_pkey, + add primary key (rev, object_id, locale); \ No newline at end of file diff --git a/sci-types-project/src/main/resources/db/migrations/org/scientificcms/sci_types_project/h2/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql b/sci-types-project/src/main/resources/db/migrations/org/scientificcms/sci_types_project/h2/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql new file mode 100644 index 0000000..c7f610d --- /dev/null +++ b/sci-types-project/src/main/resources/db/migrations/org/scientificcms/sci_types_project/h2/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql @@ -0,0 +1,15 @@ +alter table sci_types_project.project_short_descs_aud + drop constraint project_short_descs_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_types_project.project_descs_aud + drop constraint project_descs_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_types_project.project_funding_aud + drop constraint project_funding_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_types_project.project_funding_volume_aud + drop constraint project_funding_volume_aud_pkey, + add primary key (rev, object_id, locale); \ No newline at end of file diff --git a/sci-types-project/src/main/resources/db/migrations/org/scientificcms/sci_types_project/pgsql/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql b/sci-types-project/src/main/resources/db/migrations/org/scientificcms/sci_types_project/pgsql/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql new file mode 100644 index 0000000..c7f610d --- /dev/null +++ b/sci-types-project/src/main/resources/db/migrations/org/scientificcms/sci_types_project/pgsql/V7_0_0_2__remove_localized_value_from_primary_key_of_localized_string_tables.sql @@ -0,0 +1,15 @@ +alter table sci_types_project.project_short_descs_aud + drop constraint project_short_descs_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_types_project.project_descs_aud + drop constraint project_descs_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_types_project.project_funding_aud + drop constraint project_funding_aud_pkey, + add primary key (rev, object_id, locale); + +alter table sci_types_project.project_funding_volume_aud + drop constraint project_funding_volume_aud_pkey, + add primary key (rev, object_id, locale); \ No newline at end of file