dpc-attribution/src/main/resources/queue_migrations.xml
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
<changeSet id="create-job-queue-table" author="nickrobison-usds">
<createTable tableName="JOB_QUEUE">
<column name="jobid" type="UUID">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="provider_id" type="VARCHAR(50)"/>
<column name="patients" type="TEXT"/>
<column name="resource_types" type="VARCHAR"/>
<column name="status" type="TINYINT"/>
<column name="rsa_public_key" type="BYTEA"/>
<column name="submit_time" type="TIMESTAMP WITH TIME ZONE"/>
<column name="start_time" type="TIMESTAMP WITH TIME ZONE"/>
<column name="complete_time" type="TIMESTAMP WITH TIME ZONE"/>
</createTable>
<createTable tableName="JOB_RESULT">
<column name="jobid" type="UUID">
<constraints nullable="false"/>
</column>
<column name="resource_type" type="INTEGER"/>
<column name="sequence" type="INTEGER"/>
<column name="count" type="INTEGER"/>
</createTable>
<addPrimaryKey tableName="JOB_RESULT"
columnNames="jobid, resource_type, sequence"/>
<addForeignKeyConstraint baseTableName="JOB_RESULT" baseColumnNames="jobid" constraintName="fk_job_id_results"
referencedTableName="JOB_QUEUE"
referencedColumnNames="jobid"/>
</changeSet>
<changeSet id="add-organization-id" author="ronakdev">
<addColumn tableName="JOB_QUEUE">
<column name="organization_id" type="UUID"/>
</addColumn>
</changeSet>
<changeSet id="remove-old-queue-db" author="ronaldheft-usds">
<dropTable tableName="JOB_RESULT"/>
<dropTable tableName="JOB_QUEUE"/>
</changeSet>
<!-- This file has beeen deprcated and is no longer in use-->
</databaseChangeLog>