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