All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ca.ibodrov.mica.db.liquibase.xml Maven / Gradle / Ivy

<?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-latest.xsd">

    <changeSet id="mica-10000" author="[email protected]">
        <createTable tableName="MICA_CLIENTS">
            <column name="ID" type="UUID">
                <constraints primaryKey="true"/>
            </column>
            <column name="NAME" type="TEXT">
                <constraints nullable="false" unique="true"/>
            </column>
            <column name="CREATED_AT" type="TIMESTAMPTZ" defaultValueComputed="now()">
                <constraints nullable="false"/>
            </column>
        </createTable>

        <createTable tableName="MICA_CLIENT_DATA">
            <column name="DOCUMENT_ID" type="UUID">
                <constraints nullable="false"/>
            </column>
            <column name="EXTERNAL_ID" type="TEXT">
                <constraints nullable="false"/>
            </column>
            <column name="IMPORTED_AT" type="TIMESTAMPTZ" defaultValueComputed="now()">
                <constraints nullable="false"/>
            </column>
            <column name="KIND" type="TEXT">
                <constraints nullable="false"/>
            </column>
            <column name="PARSED_DATA" type="JSONB">
                <constraints nullable="false"/>
            </column>
        </createTable>

        <createIndex tableName="MICA_CLIENT_DATA" indexName="IDX_CLIENT_DATA_BY_EXTERNAL_ID">
            <column name="EXTERNAL_ID"/>
        </createIndex>

        <createTable tableName="MICA_PROFILES">
            <column name="ID" type="UUID">
                <constraints primaryKey="true"/>
            </column>
            <column name="NAME" type="TEXT">
                <constraints nullable="false" unique="true"/>
            </column>
            <column name="CREATED_AT" type="TIMESTAMPTZ" defaultValueComputed="now()">
                <constraints nullable="false"/>
            </column>
            <column name="KIND" type="TEXT">
                <constraints nullable="false"/>
            </column>
            <column name="SCHEMA" type="TEXT">
                <constraints nullable="false"/>
            </column>
        </createTable>
    </changeSet>
</databaseChangeLog>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy