Skip to content
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

Generate Changelog with defaultSchemaName not possible #130

Open
sirius322 opened this issue Aug 16, 2023 · 1 comment
Open

Generate Changelog with defaultSchemaName not possible #130

sirius322 opened this issue Aug 16, 2023 · 1 comment

Comments

@sirius322
Copy link

I have updated Liquibase from 4.17.0 to 4.23.1 and the plugin from 2.0.4 to 2.2.0.

Now I have trouble migrating my activity for generating a changelog from an existing schema. Before the update I used the defaultSchemaName argument. With the new version a changelog with a dummy changeset is being generated. The current source code states that the liquibase command doesn't take the default-schema-name argument.

However, when used directly liquibase generate-changelog --help still lists the argument and works as expected when applied directly.

  1. Is this a bug or is there a reason why defaultSchemaName is not supported by the Gradle plugin?
  2. Is there any workaround?

Two things that I have tried so far :

  • Using the option -PliquibaseExtraArguments="default-schema-name=SCHEMANAME" had no effect
  • Replacing defaultSchemaName with schemas produces a changelog but adds the source schema as a referencedTableCatalogName to the addForeignKeyConstraint
    (<addForeignKeyConstraint ... referencedTableCatalogName="SCHEMANAME"/>). This causes an error when Liquibase Update is run with a different schema/database.
@stevesaliman
Copy link
Collaborator

At the time I last updated the plugin, Liquibase 4.16.1 was current, and the default-schema-name was not part of that release from what I can tell. It isn't in the source code for Liquibase (hence my comment in the plugin), and it doesn't come back when I do liquibase generate-changelog --help.

The solution is to update the plugn again to sync it up with the latest CLI. If I'm lucky, they only added options and didn't remove any...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants