task/3382: Harmonisera tabellnamn #6
|
@ -14,81 +14,86 @@ public class GeneralSystemSettings extends DomainObject {
|
||||||
@Id
|
@Id
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
|
|
||||||
@Basic
|
@Column(name = "daisy_profile_link_base_url")
|
||||||
private String daisyProfileLinkBaseURL;
|
private String daisyProfileLinkBaseURL;
|
||||||
|
|
||||||
@Basic
|
@Column(name = "daisy_select_research_area_url")
|
||||||
private String daisySelectResearchAreaURL;
|
private String daisySelectResearchAreaURL;
|
||||||
|
|
||||||
@ElementCollection
|
@ElementCollection
|
||||||
@CollectionTable(name = "general_system_settings_alarm_recipients")
|
@CollectionTable(name = "general_system_settings_alarm_recipient",
|
||||||
|
joinColumns = @JoinColumn(name = "general_system_settings_id", referencedColumnName = "id"))
|
||||||
@Column(name = "mail")
|
@Column(name = "mail")
|
||||||
private List<String> alarmMails = new ArrayList<>();
|
private List<String> alarmMails = new ArrayList<>();
|
||||||
|
|
||||||
@ElementCollection
|
@ElementCollection
|
||||||
@CollectionTable(name = "general_system_settings_supervisor_change_recipients")
|
@CollectionTable(name = "general_system_settings_supervisor_change_recipient",
|
||||||
|
joinColumns = @JoinColumn(name = "general_system_settings_id", referencedColumnName = "id"))
|
||||||
@Column(name = "mail")
|
@Column(name = "mail")
|
||||||
private List<String> supervisorChangeMails = new ArrayList<>();
|
private List<String> supervisorChangeMails = new ArrayList<>();
|
||||||
|
|
||||||
@Basic(optional = true)
|
@Column(name = "project_partner_days_to_live", nullable = true)
|
||||||
private int projectPartnerDaysToLive;
|
private int projectPartnerDaysToLive;
|
||||||
|
|
||||||
@Basic(optional = false)
|
@Column(name = "mail_notifications", nullable = false)
|
||||||
private boolean mailNotifications = true;
|
private boolean mailNotifications = true;
|
||||||
|
|
||||||
@Basic(optional = false)
|
@Column(name = "mail_from_name", nullable = false)
|
||||||
private String mailFromName = "SciPro";
|
private String mailFromName = "SciPro";
|
||||||
|
|
||||||
@Basic(optional = false)
|
@Column(name = "system_from_mail", nullable = false)
|
||||||
private String systemFromMail = "noreply-scipro@dsv.su.se";
|
private String systemFromMail = "noreply-scipro@dsv.su.se";
|
||||||
|
|
||||||
@Basic(optional = false)
|
@Column(name = "smtp_server", nullable = false)
|
||||||
private String smtpServer = "localhost";
|
private String smtpServer = "localhost";
|
||||||
|
|
||||||
|
@Column(name = "peer_display_latest_reviews")
|
||||||
private boolean peerDisplayLatestReviews = true;
|
private boolean peerDisplayLatestReviews = true;
|
||||||
|
|
||||||
@Basic(optional = false)
|
@Column(name = "number_of_latest_reviews_displayed", nullable = false)
|
||||||
private int numberOfLatestReviewsDisplayed = DEFAULT_NUMER_OF_LATEST_REVIEWS_DISPLAYED;
|
private int numberOfLatestReviewsDisplayed = DEFAULT_NUMER_OF_LATEST_REVIEWS_DISPLAYED;
|
||||||
|
|
||||||
@Basic(optional = false)
|
@Column(name = "public_reviews_activated", nullable = false)
|
||||||
private boolean publicReviewsActivated = true;
|
private boolean publicReviewsActivated = true;
|
||||||
|
|
||||||
@Basic(optional = false)
|
@Column(name = "peer_download_enabled", nullable = false)
|
||||||
private boolean peerDownloadEnabled = true;
|
private boolean peerDownloadEnabled = true;
|
||||||
|
|
||||||
@Basic(optional = false)
|
@Column(name = "scipro_url", nullable = false)
|
||||||
private String sciproURL = "http://localhost:8080/";
|
private String sciproURL = "http://localhost:8080/";
|
||||||
|
|
||||||
@Basic(optional = false)
|
@Column(name = "show_single_sign_on", nullable = false)
|
||||||
private boolean showSingleSignOn = true;
|
private boolean showSingleSignOn = true;
|
||||||
|
|
||||||
@ElementCollection
|
@ElementCollection
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@JoinTable(name = "general_system_settings_system_modules")
|
@Column(name = "system_module")
|
||||||
|
@CollectionTable(name = "general_system_settings_system_module",
|
||||||
|
joinColumns = @JoinColumn(name = "general_system_settings_id", referencedColumnName = "id"))
|
||||||
private Set<SystemModule> systemModules = EnumSet.allOf(SystemModule.class);
|
private Set<SystemModule> systemModules = EnumSet.allOf(SystemModule.class);
|
||||||
|
|
||||||
@Basic(optional = true)
|
@Column(name = "match_responsible_mail", nullable = true)
|
||||||
private String matchResponsibleMail = "";
|
private String matchResponsibleMail = "";
|
||||||
|
|
||||||
@Basic(optional = true)
|
@Column(name = "reviewer_support_mail", nullable = true)
|
||||||
private String reviewerSupportMail;
|
private String reviewerSupportMail;
|
||||||
|
|
||||||
@Basic(optional = true)
|
@Column(name = "thesis_support_mail", nullable = true)
|
||||||
private String thesisSupportMail;
|
private String thesisSupportMail;
|
||||||
|
|
||||||
@Basic(optional = true)
|
@Column(name = "external_room_booking_url", nullable = true)
|
||||||
private String externalRoomBookingURL;
|
private String externalRoomBookingURL;
|
||||||
|
|
||||||
@Basic(optional = true)
|
@Column(name = "external_getting_started_with_idea_url", nullable = true)
|
||||||
private String externalGettingStartedWithIdeaURL;
|
private String externalGettingStartedWithIdeaURL;
|
||||||
|
|
||||||
@Basic(optional = true)
|
@Column(name = "external_grading_url", nullable = true)
|
||||||
private String externalGradingURL;
|
private String externalGradingURL;
|
||||||
|
|
||||||
@Basic(optional = false)
|
@Column(name = "final_survey_available", nullable = false)
|
||||||
private boolean finalSurveyAvailable = false;
|
private boolean finalSurveyAvailable = false;
|
||||||
|
|
||||||
@Basic
|
@Column(name = "active_project_idea_support_mail")
|
||||||
private String activeProjectIdeaSupportMail;
|
private String activeProjectIdeaSupportMail;
|
||||||
|
|
||||||
public GeneralSystemSettings() {
|
public GeneralSystemSettings() {
|
||||||
|
|
|
@ -404,3 +404,98 @@ alter table `FinalSeminarSettings` rename column `evaluationURL` to `evaluation_
|
||||||
alter table `FinalSeminarSettings` rename column `oppositionPriorityDays` to `opposition_priority_days`;
|
alter table `FinalSeminarSettings` rename column `oppositionPriorityDays` to `opposition_priority_days`;
|
||||||
|
|
||||||
rename table `FinalSeminarSettings` to `final_seminar_settings`;
|
rename table `FinalSeminarSettings` to `final_seminar_settings`;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Step 4: general_system_settings and three related tables.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-- table: general_system_settings_system_module
|
||||||
|
|
||||||
|
alter table `general_system_settings_system_modules` drop primary key;
|
||||||
|
alter table `general_system_settings_system_modules` drop foreign key `general_system_settings_system_modules_ibfk_1`;
|
||||||
|
alter table `general_system_settings_system_modules` drop key `GeneralSystemSettings_id`;
|
||||||
|
|
||||||
|
alter table `general_system_settings_system_modules` rename column `GeneralSystemSettings_id` to `general_system_settings_id`;
|
||||||
|
alter table `general_system_settings_system_modules` rename column `systemModules` to `system_module`;
|
||||||
|
|
||||||
|
rename table `general_system_settings_system_modules` to `general_system_settings_system_module`;
|
||||||
|
|
||||||
|
alter table `general_system_settings_system_module` add primary key (general_system_settings_id, system_module);
|
||||||
|
|
||||||
|
alter table `general_system_settings_system_module`
|
||||||
|
add constraint fk_general_system_settings_system_module_id
|
||||||
|
foreign key (general_system_settings_id)
|
||||||
|
references general_system_settings(id)
|
||||||
|
on delete cascade
|
||||||
|
on update cascade;
|
||||||
|
|
||||||
|
-- table: general_system_settings_supervisor_change_recipient
|
||||||
|
|
||||||
|
alter table `general_system_settings_supervisor_change_recipients` drop foreign key `FK7DA712D52AC37675`;
|
||||||
|
alter table `general_system_settings_supervisor_change_recipients` drop key `FK7DA712D52AC37675`;
|
||||||
|
|
||||||
|
alter table `general_system_settings_supervisor_change_recipients` rename column `GeneralSystemSettings_id` to `general_system_settings_id`;
|
||||||
|
|
||||||
|
rename table `general_system_settings_supervisor_change_recipients` to `general_system_settings_supervisor_change_recipient`;
|
||||||
|
|
||||||
|
alter table `general_system_settings_supervisor_change_recipient` add primary key (general_system_settings_id, mail);
|
||||||
|
|
||||||
|
alter table `general_system_settings_supervisor_change_recipient`
|
||||||
|
add constraint fk_general_system_settings_supervisor_change_recipient_id
|
||||||
|
foreign key (general_system_settings_id)
|
||||||
|
references general_system_settings(id)
|
||||||
|
on delete cascade
|
||||||
|
on update cascade;
|
||||||
|
|
||||||
|
-- table: general_system_settings_alarm_recipient
|
||||||
|
|
||||||
|
alter table `general_system_settings_alarm_recipients` drop foreign key `FK3C9272B2AC37675`;
|
||||||
|
alter table `general_system_settings_alarm_recipients` drop key `FK3C9272B2AC37675`;
|
||||||
|
|
||||||
|
alter table `general_system_settings_alarm_recipients` rename column `GeneralSystemSettings_id` to `general_system_settings_id`;
|
||||||
|
|
||||||
|
rename table `general_system_settings_alarm_recipients` to `general_system_settings_alarm_recipient`;
|
||||||
|
|
||||||
|
alter table `general_system_settings_alarm_recipient` add primary key (general_system_settings_id, mail);
|
||||||
|
|
||||||
|
alter table `general_system_settings_alarm_recipient`
|
||||||
|
add constraint fk_general_system_settings_alarm_recipient_id
|
||||||
|
foreign key (general_system_settings_id)
|
||||||
|
references general_system_settings(id)
|
||||||
|
on delete cascade
|
||||||
|
on update cascade;
|
||||||
|
|
||||||
|
-- table: general_system_settings
|
||||||
|
|
||||||
|
alter table `general_system_settings` rename column `daisyProfileLinkBaseURL` to `daisy_profile_link_base_url`;
|
||||||
|
alter table `general_system_settings` rename column `daisySelectResearchAreaURL` to `daisy_select_research_area_url`;
|
||||||
|
alter table `general_system_settings` rename column `projectPartnerDaysToLive` to `project_partner_days_to_live`;
|
||||||
|
alter table `general_system_settings` rename column `mailNotifications` to `mail_notifications`;
|
||||||
|
alter table `general_system_settings` rename column `mailFromName` to `mail_from_name`;
|
||||||
|
alter table `general_system_settings` rename column `systemFromMail` to `system_from_mail`;
|
||||||
|
alter table `general_system_settings` rename column `smtpServer` to `smtp_server`;
|
||||||
|
alter table `general_system_settings` rename column `peerDisplayLatestReviews` to `peer_display_latest_reviews`;
|
||||||
|
alter table `general_system_settings` rename column `numberOfLatestReviewsDisplayed` to `number_of_latest_reviews_displayed`;
|
||||||
|
alter table `general_system_settings` rename column `publicReviewsActivated` to `public_reviews_activated`;
|
||||||
|
alter table `general_system_settings` rename column `peerDownloadEnabled` to `peer_download_enabled`;
|
||||||
|
alter table `general_system_settings` rename column `sciproURL` to `scipro_url`;
|
||||||
|
alter table `general_system_settings` rename column `showSingleSignOn` to `show_single_sign_on`;
|
||||||
|
alter table `general_system_settings` rename column `matchResponsibleMail` to `match_responsible_mail`;
|
||||||
|
alter table `general_system_settings` rename column `reviewerSupportMail` to `reviewer_support_mail`;
|
||||||
|
alter table `general_system_settings` rename column `thesisSupportMail` to `thesis_support_mail`;
|
||||||
|
alter table `general_system_settings` rename column `externalRoomBookingURL` to `external_room_booking_url`;
|
||||||
|
alter table `general_system_settings` rename column `externalGettingStartedWithIdeaURL` to `external_getting_started_with_idea_url`;
|
||||||
|
alter table `general_system_settings` rename column `externalGradingURL` to `external_grading_url`;
|
||||||
|
alter table `general_system_settings` rename column `finalSurveyAvailable` to `final_survey_available`;
|
||||||
|
alter table `general_system_settings` rename column `activeProjectIdeaSupportMail` to `active_project_idea_support_mail`;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user