File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
orcid-persistence/src/main/resources/db/updates Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 11<databaseChangeLog xmlns =" http://www.liquibase.org/xml/ns/dbchangelog"
2- xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
3- xsi:schemaLocation=" http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd" >
2+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3+ xsi : schemaLocation =" http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd" >
44
55 <changeSet author =" Andrej Romanov" id =" ADD-GENERATED-BY-SCRIPT-TO-PROFILE-EMAIL-DOMAIN-TABLE" >
66 <preConditions onFail =" MARK_RAN" >
99 </not >
1010 </preConditions >
1111 <sql >ALTER TABLE profile_email_domain ADD generated_by_script boolean default false;</sql >
12- </changeSet >
12+ </changeSet >
1313
1414 <changeSet author =" Andrej Romanov" id =" UPDATE-GENERATED-BY-SCRIPT-BASED-ON-CREATED-DATE" dbms =" postgresql" >
1515 <sql >UPDATE profile_email_domain SET generated_by_script = true WHERE date_created < '2024-10-28';</sql >
1616 </changeSet >
1717
18- <changeSet author =" Angel Montenegro" id =" SET-FALSE-TO-NULL" dbms =" postgresql" >
18+ <changeSet author =" Angel Montenegro" id =" SET-FALSE-TO-NULL-VALUES " dbms =" postgresql" >
1919 <sql >UPDATE profile_email_domain SET generated_by_script = false WHERE generated_by_script is null;</sql >
2020 </changeSet >
2121
22- </databaseChangeLog >
22+ <changeSet author =" Angel Montenegro" id =" SET-FIELD-NOT-NULLABLE" dbms =" postgresql" >
23+ <preConditions onFail =" MARK_RAN" >
24+ <sqlCheck expectedResult =" YES" >select is_nullable from information_schema.columns where table_name = 'profile_email_domain' and column_name = 'generated_by_script';</sqlCheck >
25+ </preConditions >
26+ <addNotNullConstraint
27+ columnName=" generated_by_script"
28+ tableName=" profile_email_domain"
29+ defaultNullValue=" false" />
30+ </changeSet >
31+
32+ </databaseChangeLog >
You can’t perform that action at this time.
0 commit comments