From d62e1e882572c155fcfaf938390876ac6a0143a6 Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Mon, 16 Dec 2024 21:17:40 +0200 Subject: [PATCH 1/2] add generated by script column (#7153) * add generated by script column * improve liquibase changeset * fix column name * try different changeset * remove attribute * fix changeset order * restore dbms --- .../pojo/ajaxForm/ProfileEmailDomain.java | 7 +++++++ .../entities/ProfileEmailDomainEntity.java | 10 ++++++++++ .../src/main/resources/db-master.xml | 1 + ..._script_column_to_profile_email_domain.xml | 19 +++++++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 orcid-persistence/src/main/resources/db/updates/add_generated_by_script_column_to_profile_email_domain.xml diff --git a/orcid-core/src/main/java/org/orcid/pojo/ajaxForm/ProfileEmailDomain.java b/orcid-core/src/main/java/org/orcid/pojo/ajaxForm/ProfileEmailDomain.java index 422442a130..ae689fc7fa 100644 --- a/orcid-core/src/main/java/org/orcid/pojo/ajaxForm/ProfileEmailDomain.java +++ b/orcid-core/src/main/java/org/orcid/pojo/ajaxForm/ProfileEmailDomain.java @@ -15,12 +15,15 @@ public class ProfileEmailDomain { private Date lastModified; + private Boolean generatedByScript; + public static ProfileEmailDomain valueOf(ProfileEmailDomainEntity ed) { ProfileEmailDomain emailDomain = new ProfileEmailDomain(); if (ed != null) { emailDomain.setValue(ed.getEmailDomain()); emailDomain.setVisibility(ed.getVisibility()); + emailDomain.setGeneratedByScript(ed.getGeneratedByScript()); if (ed.getDateCreated() != null) { Date createdDate = new Date(); @@ -77,4 +80,8 @@ public Date getLastModified() { public void setLastModified(Date lastModified) { this.lastModified = lastModified; } + + public Boolean getGeneratedByScript() { return generatedByScript; } + + public void setGeneratedByScript(Boolean generatedByScript) { this.generatedByScript = generatedByScript; } } diff --git a/orcid-persistence/src/main/java/org/orcid/persistence/jpa/entities/ProfileEmailDomainEntity.java b/orcid-persistence/src/main/java/org/orcid/persistence/jpa/entities/ProfileEmailDomainEntity.java index 50da86cd52..7e0584d136 100644 --- a/orcid-persistence/src/main/java/org/orcid/persistence/jpa/entities/ProfileEmailDomainEntity.java +++ b/orcid-persistence/src/main/java/org/orcid/persistence/jpa/entities/ProfileEmailDomainEntity.java @@ -18,6 +18,7 @@ public class ProfileEmailDomainEntity extends BaseEntity { private String emailDomain; private String visibility; private Date dateCreated; + private Boolean generatedByScript; @Id @Column(name = "id") @@ -67,6 +68,15 @@ public void setDateCreated(Date dateCreated) { this.dateCreated = dateCreated; } + @Column(name = "generated_by_script") + public Boolean getGeneratedByScript() { + return generatedByScript; + } + + public void setGeneratedByScript(Boolean generatedByScript) { + this.generatedByScript = generatedByScript; + } + @Override public boolean equals(Object obj) { diff --git a/orcid-persistence/src/main/resources/db-master.xml b/orcid-persistence/src/main/resources/db-master.xml index 2d893fead1..c624134353 100644 --- a/orcid-persistence/src/main/resources/db-master.xml +++ b/orcid-persistence/src/main/resources/db-master.xml @@ -407,4 +407,5 @@ + \ No newline at end of file diff --git a/orcid-persistence/src/main/resources/db/updates/add_generated_by_script_column_to_profile_email_domain.xml b/orcid-persistence/src/main/resources/db/updates/add_generated_by_script_column_to_profile_email_domain.xml new file mode 100644 index 0000000000..546eab3e6f --- /dev/null +++ b/orcid-persistence/src/main/resources/db/updates/add_generated_by_script_column_to_profile_email_domain.xml @@ -0,0 +1,19 @@ + + + + + + + + + ALTER TABLE profile_email_domain ADD generated_by_script boolean default false; + + + + + UPDATE profile_email_domain SET generated_by_script = true WHERE date_created < '2024-10-28'; + + + From cccb6a1dc6c63abdf2703ee7fbffbec52f8919d2 Mon Sep 17 00:00:00 2001 From: github actions Date: Mon, 16 Dec 2024 19:29:52 +0000 Subject: [PATCH 2/2] v2.69.2 changelog update --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e51a537bb..f83e424da1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v2.69.2 - 2024-12-16 + +[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.69.1...v2.69.2) + ## v2.69.1 - 2024-12-13 [Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.69.0...v2.69.1)