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

Liquibase won't allow create empty table with no columns in postgres #31

Open
sync-by-unito bot opened this issue Dec 6, 2020 · 0 comments
Open

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Dec 6, 2020

I have a changeset:


and running the update gets me:
ronak@Ronaks-MacBook-Pro postgres % liquibase --changeLogFile=activity3.xml --defaultsFile=liquibase.properties.dev updateSQL

Liquibase Pro 4.2.0 by Datical licensed to Liquibase Pro Customer until Mon May 17 19:00:00 CDT 2021
####################################################

  1. _ _ _ _ ##
  2. | | () () | ##
  3. | | _ __ _ _ _ | |_ __ _ _ _ ##
  4. | | | |/ | | | | | '_ \ / _ / |/ \ ##
  5. | |**| | (| | || | | |) | (_| ** \ __/ ##
  6. _**/|*, |*,||./ **,_|_/___| ##
  7. | | ##
  8. |_| ##

  1. Get documentation at docs.liquibase.com ##
  2. Get certified courses at learn.liquibase.com ##
  3. Get advanced features and support at ##
  4. liquibase.com/support ##

####################################################
Starting Liquibase at 11:08:17 (version 4.2.0 #18 built at 2020-11-13 16:49+0000)
Unexpected error running Liquibase: Validation Failed:
1 changes have validation failures
columns is empty, activity3.xml::1607273632381-1::ronak (generated)

For more information, please use the --logLevel flag
[2020-12-06 11:08:18] SEVERE [liquibase.integration] Unexpected error running Liquibase: Validation Failed:
1 changes have validation failures
columns is empty, activity3.xml::1607273632381-1::ronak (generated)

liquibase.exception.ValidationFailedException: Validation Failed:
1 changes have validation failures
columns is empty, activity3.xml::1607273632381-1::ronak (generated)

at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:298)
at liquibase.Liquibase.lambda$update$1(Liquibase.java:237)
at liquibase.Scope.lambda$child$0(Scope.java:160)
at liquibase.Scope.child(Scope.java:169)
at liquibase.Scope.child(Scope.java:159)
at liquibase.Scope.child(Scope.java:138)
at liquibase.Liquibase.runInScope(Liquibase.java:2277)
at liquibase.Liquibase.update(Liquibase.java:215)
at liquibase.Liquibase$1.run(Liquibase.java:394)
at liquibase.Scope.lambda$child$0(Scope.java:160)
at liquibase.Scope.child(Scope.java:169)
at liquibase.Scope.child(Scope.java:159)
at liquibase.Scope.child(Scope.java:138)
at liquibase.Liquibase.runInScope(Liquibase.java:2277)
at liquibase.Liquibase.update(Liquibase.java:379)
at liquibase.Liquibase.update(Liquibase.java:371)
at liquibase.integration.commandline.Main.doMigration(Main.java:1794)
at liquibase.integration.commandline.Main$1.lambda$run$0(Main.java:361)
at liquibase.Scope.lambda$child$0(Scope.java:160)
at liquibase.Scope.child(Scope.java:169)
at liquibase.Scope.child(Scope.java:159)
at liquibase.Scope.child(Scope.java:138)
at liquibase.Scope.child(Scope.java:222)
at liquibase.Scope.child(Scope.java:226)
at liquibase.integration.commandline.Main$1.run(Main.java:360)
at liquibase.integration.commandline.Main$1.run(Main.java:193)
at liquibase.Scope.child(Scope.java:169)
at liquibase.Scope.child(Scope.java:145)
at liquibase.integration.commandline.Main.run(Main.java:193)
at liquibase.integration.commandline.Main.main(Main.java:156)

ronak@Ronaks-MacBook-Pro postgres %

It may be silly to create a table with now columns but it is legit Postgres:
https://stackoverflow.com/questions/31322009/create-empty-table-in-postgresql

Here's the sql I used to create the table:
CREATE TABLE public.ronaktable (

);

┆Issue is synchronized with this Jira Bug by Unito
┆Attachments: activity3.xml | liquibase.properties.dev

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

0 participants