Skip to content

Commit

Permalink
fixed patient.state column size
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzy11 committed Jun 1, 2023
1 parent 8652813 commit 956a289
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/resources/liquibase/2.7.x.x/base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<include relativeToChangelogFile="true" file="add_analyser_import_role.xml"/>
<include relativeToChangelogFile="true" file="add_validation_by_date.xml"/>
<include relativeToChangelogFile="true" file="support_reject_sample.xml"/>
<!-- <include relativeToChangelogFile="true" file="reflex_rule.xml"/> -->
<include relativeToChangelogFile="true" file="site_information.xml"/>
<include relativeToChangelogFile="true" file="critical_range.xml"/>
<include relativeToChangelogFile="true" file="fix_database_bugs_retroc.xml"/>
<include relativeToChangelogFile="true" file="add_psc_sampletype_test_element.xml"/>
<include relativeToChangelogFile="true" file="add_admin_default_roles.xml"/>
<include relativeToChangelogFile="true" file="fix_person_table.xml"/>
</databaseChangeLog>
15 changes: 15 additions & 0 deletions src/main/resources/liquibase/2.7.x.x/fix_person_table.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
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-3.8.xsd">
<changeSet author="mozzymutesa" id="1">
<preConditions onFail="MARK_RAN">
<columnExists tableName="person" columnName="state" />
<sqlCheck expectedResult="2">SELECT character_maximum_length FROM information_schema.columns WHERE table_name='person' AND column_name='state'</sqlCheck>
</preConditions>
<comment>Increase size of the person.state column</comment>
<modifyDataType tableName="person" columnName="state" newDataType="varchar(225)"/>
</changeSet>
</databaseChangeLog>

0 comments on commit 956a289

Please sign in to comment.