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

liquibase.plugincoremodel.tableFeatures.xml Maven / Gradle / Ivy

There is a newer version: 2.5.1
Show newest version
<?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.1.xsd">
    <!--
     Copyright (C) 2024 Fraunhofer Institut IOSB, Fraunhoferstr. 1, D 76131
     Karlsruhe, Germany.

     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU Lesser General Public License as published by
     the Free Software Foundation, either version 3 of the License, or
     (at your option) any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU Lesser General Public License for more details.

     You should have received a copy of the GNU Lesser General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
    -->
    <changeSet author="scf" id="2021-01-01-features-1" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
        <preConditions onFail="MARK_RAN">
            <not>
                <tableExists tableName="FEATURES" />
            </not>
        </preConditions>
        <createTable tableName="FEATURES">
            <column name="NAME" type="TEXT"/>
            <column name="DESCRIPTION" type="TEXT"/>
            <column name="PROPERTIES" type="JSONB"/>
            <column name="ENCODING_TYPE" type="TEXT"/>
            <column name="FEATURE" type="TEXT"/>
            <column name="GEOM" type="geometry(Geometry,4326)"/>
        </createTable>
    </changeSet>
    
    <changeSet author="scf" id="2021-01-01-features-2" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
        <validCheckSum>8:4374da152cdee1882ce18c5b93882da1</validCheckSum>
        <preConditions onFail="MARK_RAN">
            <changeLogPropertyDefined property="id-Feature" value="LONG" />
            <not>
                <columnExists columnName="ID" tableName="FEATURES" />
            </not>
        </preConditions>
        <addColumn tableName="FEATURES">
            <column name="ID" type="${idTypeLong}" autoIncrement="true">
                <constraints primaryKey="true" primaryKeyName="FEATURES_PKEY" />
            </column>
        </addColumn>
    </changeSet>

    <changeSet author="scf" id="2021-01-01-features-3" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
        <validCheckSum>8:b7e9c85c285f28e461713f0a5a1e912f</validCheckSum>
        <preConditions onFail="MARK_RAN">
            <or>
                <changeLogPropertyDefined property="id-Feature" value="STRING" />
                <changeLogPropertyDefined property="id-Feature" value="UUID" />
            </or>
            <not>
                <columnExists columnName="ID" tableName="FEATURES" />
            </not>
        </preConditions>
        <addColumn tableName="FEATURES">
            <column name="ID" type="${idType-Feature}" defaultValueComputed="${defaultValueComputed-Feature}">
                <constraints primaryKey="true" primaryKeyName="FEATURES_PKEY"/>
            </column>
        </addColumn>
    </changeSet>

</databaseChangeLog>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy