-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
110 changed files
with
12,374 additions
and
16,577 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
<?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"> | ||
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"> | ||
|
||
<include file="liquibase/2.0.x.x/convert_id_types.xml" /> | ||
<include | ||
file="liquibase/2.0.x.x/validation_site_information.xml" /> | ||
<include file="liquibase/2.0.x.x/fhir_data_export.xml" /> | ||
<include file="liquibase/2.0.x.x/default_test.xml" /> | ||
<include file="liquibase/2.0.x.x/patient_contact.xml" /> | ||
<include file="liquibase/2.0.x.x/convert_id_types.xml"/> | ||
<include file="liquibase/2.0.x.x/validation_site_information.xml"/> | ||
<include file="liquibase/2.0.x.x/fhir_data_export.xml"/> | ||
<include file="liquibase/2.0.x.x/default_test.xml"/> | ||
<include file="liquibase/2.0.x.x/patient_contact.xml"/> | ||
|
||
</databaseChangeLog> |
86 changes: 43 additions & 43 deletions
86
src/main/resources/liquibase/2.0.x.x/convert_id_types.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
<?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="caleb" id="1"> | ||
<comment>modify login_user as an example</comment> | ||
|
||
<modifyDataType columnName="id" newDataType="INTEGER" | ||
schemaName="clinlims" tableName="login_user" /> | ||
<dropPrimaryKey schemaName="clinlims" | ||
tableName="login_user" /> | ||
<addPrimaryKey schemaName="clinlims" | ||
tableName="login_user" columnNames="id" /> | ||
<addColumn schemaName="clinlims" tableName="login_user"> | ||
<column name="last_updated" type="TIMESTAMP WITH TIME ZONE" /> | ||
</addColumn> | ||
|
||
<rollback> | ||
<modifyDataType columnName="id" newDataType="numeric" | ||
schemaName="clinlims" tableName="login_user" /> | ||
<dropPrimaryKey schemaName="clinlims" | ||
tableName="login_user" /> | ||
<addPrimaryKey schemaName="clinlims" | ||
tableName="login_user" columnNames="login_name" /> | ||
</rollback> | ||
</changeSet> | ||
|
||
<changeSet author="caleb" id="2"> | ||
<comment>modify gender as a second example</comment> | ||
|
||
<modifyDataType columnName="id" newDataType="INTEGER" | ||
schemaName="clinlims" tableName="gender" /> | ||
<renameColumn oldColumnName="lastupdated" | ||
newColumnName="last_updated" columnName="id" schemaName="clinlims" | ||
tableName="gender"></renameColumn> | ||
|
||
<rollback> | ||
<modifyDataType columnName="id" newDataType="numeric" | ||
schemaName="clinlims" tableName="gender" /> | ||
</rollback> | ||
|
||
</changeSet> | ||
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="caleb" id="1"> | ||
<comment>modify login_user as an example</comment> | ||
|
||
<modifyDataType columnName="id" newDataType="INTEGER" | ||
schemaName="clinlims" tableName="login_user" /> | ||
<dropPrimaryKey schemaName="clinlims" | ||
tableName="login_user" /> | ||
<addPrimaryKey schemaName="clinlims" | ||
tableName="login_user" columnNames="id" /> | ||
<addColumn schemaName="clinlims" tableName="login_user"> | ||
<column name="last_updated" type="TIMESTAMP WITH TIME ZONE" /> | ||
</addColumn> | ||
|
||
<rollback> | ||
<modifyDataType columnName="id" newDataType="numeric" | ||
schemaName="clinlims" tableName="login_user" /> | ||
<dropPrimaryKey schemaName="clinlims" | ||
tableName="login_user" /> | ||
<addPrimaryKey schemaName="clinlims" | ||
tableName="login_user" columnNames="login_name" /> | ||
</rollback> | ||
</changeSet> | ||
|
||
<changeSet author="caleb" id="2"> | ||
<comment>modify gender as a second example</comment> | ||
|
||
<modifyDataType columnName="id" newDataType="INTEGER" | ||
schemaName="clinlims" tableName="gender" /> | ||
<renameColumn oldColumnName="lastupdated" | ||
newColumnName="last_updated" columnName="id" schemaName="clinlims" | ||
tableName="gender"></renameColumn> | ||
|
||
<rollback> | ||
<modifyDataType columnName="id" newDataType="numeric" | ||
schemaName="clinlims" tableName="gender" /> | ||
</rollback> | ||
|
||
</changeSet> | ||
|
||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
<?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"> | ||
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="caleb" id="1"> | ||
<comment>add lastupdated to site informations without to stop a bug</comment> | ||
<changeSet author="caleb" id="1"> | ||
<comment>add lastupdated to site informations without to stop a bug</comment> | ||
|
||
<!-- auto-rollsback --> | ||
<addColumn schemaName="clinlims" tableName="test"> | ||
<column name="default_test_result_id" type="numeric(10)" /> | ||
</addColumn> | ||
<!-- auto-rollsback --> | ||
<addColumn schemaName="clinlims" | ||
tableName="test"> | ||
<column name="default_test_result_id" type="numeric(10)"/> | ||
</addColumn> | ||
|
||
</changeSet> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
110 changes: 55 additions & 55 deletions
110
src/main/resources/liquibase/2.0.x.x/fhir_data_export.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,65 @@ | ||
<?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"> | ||
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="caleb" id="1"> | ||
<comment>add functionality for fhir data export</comment> | ||
<changeSet author="caleb" id="1"> | ||
<comment>add functionality for fhir data export</comment> | ||
|
||
<!-- auto-rollsback --> | ||
<createTable schemaName="clinlims" | ||
tableName="data_export_task"> | ||
<column name="id" type="BIGINT"> | ||
<constraints primaryKey="true" /> | ||
</column> | ||
<column name="data_request_attempt_timeout" type="integer" /> | ||
<column name="max_data_export_interval" type="integer" /> | ||
<column name="endpoint" type="VARCHAR (255)"> | ||
<constraints unique="true" /> | ||
</column> | ||
</createTable> | ||
<!-- auto-rollsback --> | ||
<createTable schemaName="clinlims" | ||
tableName="data_export_task"> | ||
<column name="id" type="BIGINT"> | ||
<constraints primaryKey="true" /> | ||
</column> | ||
<column name="data_request_attempt_timeout" type="integer" /> | ||
<column name="max_data_export_interval" type="integer" /> | ||
<column name="endpoint" type="VARCHAR (255)" > | ||
<constraints unique="true" /> | ||
</column> | ||
</createTable> | ||
|
||
<!-- auto-rollsback --> | ||
<createTable schemaName="clinlims" | ||
tableName="data_export_fhir_resources"> | ||
<column name="data_export_task_id" type="BIGINT"> | ||
<constraints | ||
foreignKeyName="fk_data_export_fhir_resources_data_export_task" | ||
references="data_export_task(id)"></constraints> | ||
</column> | ||
<column name="fhir_resources" type="VARCHAR (255)" /> | ||
</createTable> | ||
<!-- auto-rollsback --> | ||
<createTable schemaName="clinlims" | ||
tableName="data_export_fhir_resources"> | ||
<column name="data_export_task_id" type="BIGINT"> | ||
<constraints | ||
foreignKeyName="fk_data_export_fhir_resources_data_export_task" | ||
references="data_export_task(id)"></constraints> | ||
</column> | ||
<column name="fhir_resources" type="VARCHAR (255)" /> | ||
</createTable> | ||
|
||
<!-- auto-rollsback --> | ||
<createTable schemaName="clinlims" | ||
tableName="data_export_headers"> | ||
<column name="data_export_task_id" type="BIGINT"> | ||
<constraints | ||
foreignKeyName="fk_data_export_headers_data_export_task" | ||
references="data_export_task(id)"></constraints> | ||
</column> | ||
<column name="key" type="VARCHAR (255)" /> | ||
<column name="value" type="VARCHAR (255)" /> | ||
</createTable> | ||
<!-- auto-rollsback --> | ||
<createTable schemaName="clinlims" | ||
tableName="data_export_headers"> | ||
<column name="data_export_task_id" type="BIGINT"> | ||
<constraints | ||
foreignKeyName="fk_data_export_headers_data_export_task" | ||
references="data_export_task(id)"></constraints> | ||
</column> | ||
<column name="key" type="VARCHAR (255)" /> | ||
<column name="value" type="VARCHAR (255)" /> | ||
</createTable> | ||
|
||
<!-- auto-rollsback --> | ||
<createTable schemaName="clinlims" | ||
tableName="data_export_attempt"> | ||
<column name="id" type="BIGINT"> | ||
<constraints primaryKey="true" /> | ||
</column> | ||
<column name="start_time" type="DATETIME" /> | ||
<column name="end_time" type="DATETIME" /> | ||
<column name="data_export_task_id" type="BIGINT"> | ||
<constraints | ||
foreignKeyName="fk_data_export_attempt_data_export_task" | ||
references="data_export_task(id)"></constraints> | ||
</column> | ||
<column name="data_export_status" type="VARCHAR (255)" /> | ||
</createTable> | ||
<!-- auto-rollsback --> | ||
<createTable schemaName="clinlims" | ||
tableName="data_export_attempt"> | ||
<column name="id" type="BIGINT"> | ||
<constraints primaryKey="true" /> | ||
</column> | ||
<column name="start_time" type="DATETIME" /> | ||
<column name="end_time" type="DATETIME" /> | ||
<column name="data_export_task_id" type="BIGINT"> | ||
<constraints | ||
foreignKeyName="fk_data_export_attempt_data_export_task" | ||
references="data_export_task(id)"></constraints> | ||
</column> | ||
<column name="data_export_status" type="VARCHAR (255)" /> | ||
</createTable> | ||
|
||
</changeSet> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,44 @@ | ||
<?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"> | ||
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="csteele" id="1"> | ||
<preConditions onFail="MARK_RAN"> | ||
<changeSet author="csteele" id="1"> | ||
<preConditions onFail="MARK_RAN"> | ||
<sqlCheck expectedResult="0">SELECT count(*) FROM clinlims.reference_tables WHERE name = 'PATIENT_CONTACT'</sqlCheck> | ||
</preConditions> | ||
<insert schemaName="clinlims" tableName="reference_tables"> | ||
<column name="id" valueSequenceNext="reference_tables_seq" /> | ||
<column name="name" value="PATIENT_CONTACT" /> | ||
<column name="keep_history" value="Y" /> | ||
<column name="is_hl7_encoded" value="N" /> | ||
</insert> | ||
<rollback> | ||
<delete schemaName="clinlims" tableName="reference_tables"> | ||
<where>name='PATIENT_CONTACT'</where> | ||
</delete> | ||
</rollback> | ||
</changeSet> | ||
|
||
<sqlCheck expectedResult="0">SELECT count(*) FROM | ||
clinlims.reference_tables WHERE name = 'PATIENT_CONTACT'</sqlCheck> | ||
|
||
</preConditions> | ||
<insert schemaName="clinlims" tableName="reference_tables"> | ||
<column name="id" valueSequenceNext="reference_tables_seq" /> | ||
<column name="name" value="PATIENT_CONTACT" /> | ||
<column name="keep_history" value="Y" /> | ||
<column name="is_hl7_encoded" value="N" /> | ||
</insert> | ||
<rollback> | ||
<delete schemaName="clinlims" tableName="reference_tables"> | ||
<where>name='PATIENT_CONTACT'</where> | ||
</delete> | ||
</rollback> | ||
</changeSet> | ||
|
||
<changeSet author="csteele" id="2"> | ||
<preConditions onFail="MARK_RAN"> | ||
<not> | ||
<tableExists tableName="patient_contact" | ||
schemaName="clinlims" /> | ||
</not> | ||
</preConditions> | ||
<comment>create patient contact table</comment> | ||
<createTable schemaName="clinlims" | ||
tableName="patient_contact"> | ||
<column name="id" type="NUMERIC(10)"> | ||
<constraints primaryKey="true" /> | ||
</column> | ||
<column name="patient_id" type="NUMERIC(10)" /> | ||
<column name="person_id" type="NUMERIC(60)" /> | ||
<column name="lastupdated" type="DATE" /> | ||
</createTable> | ||
<createSequence incrementBy="1" schemaName="clinlims" | ||
sequenceName="patient_contact_seq" startValue="1" /> | ||
</changeSet> | ||
<changeSet author="csteele" id="2"> | ||
<preConditions onFail="MARK_RAN"> | ||
<not> | ||
<tableExists tableName="patient_contact" schemaName="clinlims" /> | ||
</not> | ||
</preConditions> | ||
<comment>create patient contact table</comment> | ||
<createTable schemaName="clinlims" tableName="patient_contact"> | ||
<column name="id" type="NUMERIC(10)"> | ||
<constraints primaryKey="true" /> | ||
</column> | ||
<column name="patient_id" type="NUMERIC(10)" /> | ||
<column name="person_id" type="NUMERIC(60)" /> | ||
<column name="lastupdated" type="DATE" /> | ||
</createTable> | ||
<createSequence incrementBy="1" schemaName="clinlims" | ||
sequenceName="patient_contact_seq" startValue="1" /> | ||
</changeSet> | ||
</databaseChangeLog> |
22 changes: 11 additions & 11 deletions
22
src/main/resources/liquibase/2.0.x.x/validation_site_information.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?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"> | ||
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="caleb" id="1"> | ||
<comment>add lastupdated to site informations without to stop a bug</comment> | ||
<changeSet author="caleb" id="1"> | ||
<comment>add lastupdated to site informations without to stop a bug</comment> | ||
|
||
<!-- auto-rollsback --> | ||
<addNotNullConstraint schemaName="clinlims" | ||
tableName="site_information" columnName="lastupdated" | ||
columnDataType="DATE" defaultNullValue="${now}" /> | ||
<!-- auto-rollsback --> | ||
<addNotNullConstraint schemaName="clinlims" | ||
tableName="site_information" columnName="lastupdated" | ||
columnDataType="DATE" defaultNullValue="${now}" /> | ||
|
||
</changeSet> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
Oops, something went wrong.