xebialabs-community/xld-flyway-plugin

View on GitHub
src/main/resources/synthetic.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2019 XEBIALABS

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-->
<synthetic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns="http://www.xebialabs.com/deployit/synthetic"
           xsi:schemaLocation="http://www.xebialabs.com/deployit/synthetic synthetic.xsd">

    <type type="flyway.Runner" extends="flyway.VirtualContainer">
        <property name="serverUrl"
                  required="true" description="The jdbc url to use to connect to the database"/>
        <property name="username"
                  required="false" description="The user to use to connect to the database"/>
        <property name="password"
                  required="false"
                  password="true" description="The password to use to connect to the database"/>
        <property name="infoMode" label="Info Mode" kind="enum"
                  required="true"
                  description="Info about all migrations, including applied, current and pending with details and status.">
            <enum-values>
                <value>All</value>
                <value>Applied</value>
                <value>Current</value>
                <value>Pending</value>
            </enum-values>
        </property>
        <method name="CheckLogging" delegate="jythonScript" description="Check info logging" script="flyway/info-logging.py" />

    </type>

    <type type="flyway.DeployedScripts" extends="udm.BaseDeployedArtifact" deployable-type="flyway.Scripts"
          container-type="flyway.Runner">
        <generate-deployable type="flyway.Scripts" extends="udm.BaseDeployableFolderArtifact"/>
        <property name="username"
                  kind="string"
                  required="false"
                  description="The user to use to connect to the database."/>
        <property name="password"
                  kind="string"
                  required="false"
                  password="true"
                  description="The password to use to connect to the database."/>
        <property name="schemas"
                  kind="list_of_string"
                  required="true"
                  description="Case-sensitive list of schemas managed by Flyway."/>
        <property name="table"
                  kind="string"
                  required="false"
                  description="The name of Flyway's metadata table."/>
        <property name="locations"
                  kind="list_of_string"
                  required="false"
                  description="List of locations to scan recursively for migrations."/>
        <property name="encoding"
                  kind="string"
                  required="false"
                  description="The encoding of Sql migrations."/>
        <property name="baselineOnMigrate"
                  kind="boolean"
                  required="true"
                  default="false"
                  description="Whether to automatically call baseline when migrate is executed against a non-empty schema with no metadata table. This is useful for initial Flyway production deployments on projects with an existing DB."/>
        <property name="repair"
                  kind="boolean"
                  required="true"
                  default="true"
                  description="Repairs the Flyway metadata table."/>
        <property name="outOfOrder"
                  kind="boolean"
                  required="true"
                  default="false"
                  description='Allows migrations to be run "out of order". If you already have versions 1 and 3 applied, and now a version 2 is found, it will be applied too instead of being ignored.'/>
        <property name="validateOnMigrate"
                  kind="boolean"
                  required="true"
                  default="true"
                  description="Whether to automatically call validate or not when running migrate."/>
        <property name="targetVersion"
                  kind="string"
                  required="false"
                  description="The target version up to which Flyway should consider migrations. The special value current designates the current version of the schema. (default: the latest version)"/>
        <property name="flywayPlaceholders"
                  kind="map_string_string"
                  required="false"
                  description="Sets the placeholders to replace in sql migration scripts."/>
        <!-- hidden parameters -->
        <property name="startClean"
                  kind="boolean"
                  required="true"
                  default="false"
                  hidden="true"/>
        <property name="placeholderReplacement"
                  kind="boolean"
                  required="true"
                  default="true"
                  hidden="true"/>
        <property name="placeholderPrefix"
                  kind="string"
                  required="false"
                  default="$["
                  hidden="true"/>
        <property name="placeholderSuffix"
                  kind="string"
                  required="false"
                  default="]"
                  hidden="true"/>
    </type>

</synthetic>