Fix primary key for localized string tables

deploy_packages_to_gitea
Jens Pelzetter 2023-01-30 19:58:21 +01:00
parent 77272549a0
commit f0ececa3b5
4 changed files with 159 additions and 11 deletions

View File

@ -18,7 +18,6 @@
*/ */
package org.librecms.contenttypes; package org.librecms.contenttypes;
import org.hibernate.envers.Audited; import org.hibernate.envers.Audited;
import org.libreccm.l10n.LocalizedString; import org.libreccm.l10n.LocalizedString;
import org.librecms.contentsection.ContentItem; import org.librecms.contentsection.ContentItem;
@ -70,11 +69,14 @@ public class News extends ContentItem implements Serializable {
@Embedded @Embedded
@AssociationOverride( @AssociationOverride(
name = "values", name = "values",
joinTable = @JoinTable(name = "NEWS_TEXTS", joinTable = @JoinTable(
schema = DB_SCHEMA, name = "NEWS_TEXTS",
joinColumns = { schema = DB_SCHEMA,
@JoinColumn(name = "OBJECT_ID")} joinColumns = {
)) @JoinColumn(name = "OBJECT_ID")
}
)
)
private LocalizedString text; private LocalizedString text;
/** /**
@ -96,7 +98,7 @@ public class News extends ContentItem implements Serializable {
super(); super();
text = new LocalizedString(); text = new LocalizedString();
} }
public LocalizedString getText() { public LocalizedString getText() {
return text; return text;
} }

View File

@ -0,0 +1,71 @@
alter table ccm_cms.binary_asset_descriptions_aud
drop constraint binary_asset_descriptions_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.bookmark_descriptions_aud
drop constraint bookmark_descriptions_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.contact_entry_key_labels_aud
drop constraint contact_entry_key_labels_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.legal_metadata_rights_aud
drop constraint legal_metadata_rights_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.side_note_texts_aud
drop constraint side_note_texts_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.asset_titles_aud
drop constraint asset_titles_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.attachment_list_captions_aud
drop constraint attachment_list_captions_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.attachment_list_descriptions_aud
drop constraint attachment_list_descriptions_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.content_item_names_aud
drop constraint content_item_names_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.content_item_titles_aud
drop constraint content_item_titles_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.content_item_descriptions_aud
drop constraint content_item_descriptions_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.article_texts_aud
drop constraint mpa_article_texts_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.event_texts_aud
drop constraint mpa_event_texts_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.event_dates_aud
drop constraint mpa_event_dates_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.mpa_summaries_aud
drop constraint mpa_summaries_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.mpa_section_titles_aud
drop constraint mpa_section_titles_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.mpa_section_text_aud
drop constraint mpa_section_text_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.news_texts_aud
drop constraint news_texts_aud_pkey,
add primary key (rev, object_id, locale);

View File

@ -0,0 +1,71 @@
alter table ccm_cms.binary_asset_descriptions_aud
drop constraint binary_asset_descriptions_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.bookmark_descriptions_aud
drop constraint bookmark_descriptions_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.contact_entry_key_labels_aud
drop constraint contact_entry_key_labels_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.legal_metadata_rights_aud
drop constraint legal_metadata_rights_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.side_note_texts_aud
drop constraint side_note_texts_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.asset_titles_aud
drop constraint asset_titles_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.attachment_list_captions_aud
drop constraint attachment_list_captions_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.attachment_list_descriptions_aud
drop constraint attachment_list_descriptions_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.content_item_names_aud
drop constraint content_item_names_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.content_item_titles_aud
drop constraint content_item_titles_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.content_item_descriptions_aud
drop constraint content_item_descriptions_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.article_texts_aud
drop constraint mpa_article_texts_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.event_texts_aud
drop constraint mpa_event_texts_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.event_dates_aud
drop constraint mpa_event_dates_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.mpa_summaries_aud
drop constraint mpa_summaries_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.mpa_section_titles_aud
drop constraint mpa_section_titles_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.mpa_section_text_aud
drop constraint mpa_section_text_aud_pkey,
add primary key (rev, object_id, locale);
alter table ccm_cms.news_texts_aud
drop constraint news_texts_aud_pkey,
add primary key (rev, object_id, locale);

View File

@ -121,10 +121,14 @@ public class Workflow implements Identifiable, Serializable, Exportable {
@Embedded @Embedded
@AssociationOverride( @AssociationOverride(
name = "values", name = "values",
joinTable = @JoinTable(name = "WORKFLOW_NAMES", joinTable = @JoinTable(
schema = DB_SCHEMA, name = "WORKFLOW_NAMES",
joinColumns = { schema = DB_SCHEMA,
@JoinColumn(name = "WORKFLOW_ID")})) joinColumns = {
@JoinColumn(name = "WORKFLOW_ID")
}
)
)
private LocalizedString name = new LocalizedString(); private LocalizedString name = new LocalizedString();
/** /**