New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Initial Sequence Support for MariaDB #852

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
1 participant
@schrieveslaach
Copy link

schrieveslaach commented Jan 28, 2019

Starting with version 10.3 MariaDB supports sequences. This PR introduce support through liquibase creating Sequences and default value for MariaDB. For example, following changelogs are supported through this PR:

<?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">

    <changeSet id="1" author="bob">
        <comment>A sample change log</comment>
        <createSequence cycle="true"
                        incrementBy="2"
                        maxValue="1000"
                        minValue="5"
                        ordered="true"
                        sequenceName="seq_id"
                        startValue="5"/>
    </changeSet>


    <changeSet id="2" author="bob">
        <createTable tableName="person"
                     tablespace="A String">
            <column name="address" type="varchar(255)"/>
            <column name="id" type="int" />
        </createTable>
    </changeSet>

    <changeSet id="3" author="bob">
        <addDefaultValue
                         columnName="id"
                         defaultValueSequenceNext="seq_id"
                         tableName="person"/>
    </changeSet>

</databaseChangeLog>

@schrieveslaach schrieveslaach changed the title Implement MariaDB's sequence support Implement Initial Sequence Support for MariaDB Jan 29, 2019

@schrieveslaach schrieveslaach force-pushed the schrieveslaach:master branch from 530e4fb to ea6bf55 Feb 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment