From e46385e68e6f2398b4352c0d2c523d266696f70c Mon Sep 17 00:00:00 2001 From: Angel Montenegro Date: Wed, 18 Dec 2024 11:23:40 -0600 Subject: [PATCH] Generated by script must not be null (#7159) * generated_by_script must not be null * generated_by_script must not be null --- ..._script_column_to_profile_email_domain.xml | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) 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 index 5c4bda80a8..a5b7bb58be 100644 --- 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 @@ -1,6 +1,6 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd"> @@ -9,14 +9,24 @@ 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'; - + UPDATE profile_email_domain SET generated_by_script = false WHERE generated_by_script is null; - + + + select is_nullable from information_schema.columns where table_name = 'profile_email_domain' and column_name = 'generated_by_script'; + + + + + \ No newline at end of file