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

migrations.001-access-control-entry.xml Maven / Gradle / Ivy

<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2011-2014 Jeppetto and Jonathan Thompson
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~    http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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-2.0.xsd">
    <changeSet id="security:001-access-control-entry" author="jeppetto">

        <createTable tableName="AccessControlEntries">
            <column name="id" type="BIGINT" autoIncrement="true">
                <constraints nullable="false" primaryKey="true"/>
            </column>
            <column name="objectType" type="VARCHAR(255)">
                <constraints nullable="false"/>
            </column>
            <column name="objectId" type="VARCHAR(255)">
                <constraints nullable="false"/>
            </column>
            <column name="accessibleBy" type="VARCHAR(255)">
                <constraints nullable="false"/>
            </column>
            <column name="accessType" type="VARCHAR(4)">
                <constraints nullable="false"/>
            </column>
        </createTable>

        <createIndex tableName="AccessControlEntries" indexName="idx_AccessControlEntries_all">
            <column name="objectId"/>
            <column name="objectType"/>
            <column name="accessibleBy"/>
        </createIndex>

        <createIndex tableName="AccessControlEntries" indexName="idx_AccessControlEntries_id_type">
            <column name="objectId"/>
            <column name="objectType"/>
        </createIndex>

        <createIndex tableName="AccessControlEntries" indexName="idx_AccessControlEntries_accessibleby_type">
            <column name="accessibleBy"/>
            <column name="objectType"/>
        </createIndex>

    </changeSet>
</databaseChangeLog>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy