Uploaded image for project: 'Liquibase Core'
  1. Liquibase Core
  2. CORE-2944

outputDefaultSchema and outputDefaultCatalog command line parameters not respected

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.5.2, 3.5.3
    • Fix Version/s: 3.6.0
    • Component/s: None
    • Environment:

      Command line

      Description

      I am "reopening" CORE-2088 Closed as it does not work with 3.5.2 and 3.5.3 versions when using updateSQL and updateToTagSQL:

      Setting the outputDefaultSchema and outputDefaultCatalog command line parameters to false should suppress including the schema/catalog names in SQL executed.

      Even when set to false, however, they are still included in the SQL (e.g. myschema.dummytable in the example below).

      Minimal example:

      changes.xml
      <?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.0.xsd">
      
          <changeSet id="1" author="user1">
              <createTable tableName="dummytable">
                  <column name="c1" type="varchar(50)"/>
              </createTable>
          </changeSet>
      </databaseChangeLog>
      
      Terminal
      liquibase \
        --url=offline:postgresql \
        --username=user1 \
        --password=pwd1 \
        --defaultSchemaName=myschema \
        --changeLogFile=changes.xml \
        --outputFile=update.sql \
        --outputDefaultSchema=false \
        --outputDefaultCatalog=false \
        updateSQL
      
      Result in update.sql
      -- *********************************************************************
      -- Update Database Script
      -- *********************************************************************
      -- Change Log: changes.xml
      -- Ran at: 11/17/16 9:49 AM
      -- Against: null@offline:postgresql
      -- Liquibase version: 3.5.2
      -- *********************************************************************
      
      -- Changeset changes.xml::1::user1
      CREATE TABLE myschema.dummytable (c1 VARCHAR(50));
      

        Attachments

          Activity

            People

            • Reporter:
              badyl badyl
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: