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 error during hootenanny-services-ui RPM post install #34

Closed
brianhatchl opened this issue Mar 17, 2016 · 2 comments
Closed

Liquibase error during hootenanny-services-ui RPM post install #34

brianhatchl opened this issue Mar 17, 2016 · 2 comments

Comments

@brianhatchl
Copy link
Contributor

Post install hook currently calls liquibase update everytime. This may not be the correct way to update an existing db schema.
https://github.com/ngageoint/hootenanny/blob/develop/scripts/HootServicesUiRpmPostInstall.sh#L124-L134

SEVERE 3/17/16 6:29 PM:liquibase: classes/db/db.changelog-master.xml: classes/db/changelogs/001-Initial.xml::1::jason.surratt: Change Set classes/db/changelogs/001-Initial.xml::1::jason.surratt failed.  Error: Error executing SQL DROP TYPE IF EXISTS nwr_enum: ERROR: cannot drop type nwr_enum because other objects depend on it
  Detail: table current_relation_members column member_type depends on type nwr_enum
  Hint: Use DROP ... CASCADE to drop the dependent objects too.
liquibase.exception.DatabaseException: Error executing SQL DROP TYPE IF EXISTS nwr_enum: ERROR: cannot drop type nwr_enum because other objects depend on it
  Detail: table current_relation_members column member_type depends on type nwr_enum
  Hint: Use DROP ... CASCADE to drop the dependent objects too.
    at liquibase.executor.jvm.JdbcExecutor.execute(Unknown Source)
    at liquibase.executor.jvm.JdbcExecutor.execute(Unknown Source)
    at liquibase.database.AbstractJdbcDatabase.execute(Unknown Source)
    at liquibase.database.AbstractJdbcDatabase.executeStatements(Unknown Source)
    at liquibase.changelog.ChangeSet.execute(Unknown Source)
    at liquibase.changelog.visitor.UpdateVisitor.visit(Unknown Source)
    at liquibase.changelog.ChangeLogIterator.run(Unknown Source)
    at liquibase.Liquibase.update(Unknown Source)
    at liquibase.Liquibase.update(Unknown Source)
    at liquibase.integration.commandline.Main.doMigration(Unknown Source)
    at liquibase.integration.commandline.Main.main(Unknown Source)
Caused by: org.postgresql.util.PSQLException: ERROR: cannot drop type nwr_enum because other objects depend on it
  Detail: table current_relation_members column member_type depends on type nwr_enum
  Hint: Use DROP ... CASCADE to drop the dependent objects too.
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366)
    at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(Unknown Source)
    ... 11 more
Liquibase update Failed: Migration failed for change set classes/db/changelogs/001-Initial.xml::1::jason.surratt:
     Reason: liquibase.exception.DatabaseException: Error executing SQL DROP TYPE IF EXISTS nwr_enum: ERROR: cannot drop type nwr_enum because other objects depend on it
  Detail: table current_relation_members column member_type depends on type nwr_enum
  Hint: Use DROP ... CASCADE to drop the dependent objects too.
SEVERE 3/17/16 6:29 PM:liquibase: classes/db/changelogs/001-Initial.xml::1::jason.surratt: Migration failed for change set classes/db/changelogs/001-Initial.xml::1::jason.surratt:
     Reason: liquibase.exception.DatabaseException: Error executing SQL DROP TYPE IF EXISTS nwr_enum: ERROR: cannot drop type nwr_enum because other objects depend on it
  Detail: table current_relation_members column member_type depends on type nwr_enum
  Hint: Use DROP ... CASCADE to drop the dependent objects too.
liquibase.exception.MigrationFailedException: Migration failed for change set classes/db/changelogs/001-Initial.xml::1::jason.surratt:
     Reason: liquibase.exception.DatabaseException: Error executing SQL DROP TYPE IF EXISTS nwr_enum: ERROR: cannot drop type nwr_enum because other objects depend on it
  Detail: table current_relation_members column member_type depends on type nwr_enum
  Hint: Use DROP ... CASCADE to drop the dependent objects too.
    at liquibase.changelog.ChangeSet.execute(Unknown Source)
    at liquibase.changelog.visitor.UpdateVisitor.visit(Unknown Source)
    at liquibase.changelog.ChangeLogIterator.run(Unknown Source)
    at liquibase.Liquibase.update(Unknown Source)
    at liquibase.Liquibase.update(Unknown Source)
    at liquibase.integration.commandline.Main.doMigration(Unknown Source)
    at liquibase.integration.commandline.Main.main(Unknown Source)
Caused by: liquibase.exception.DatabaseException: Error executing SQL DROP TYPE IF EXISTS nwr_enum: ERROR: cannot drop type nwr_enum because other objects depend on it
  Detail: table current_relation_members column member_type depends on type nwr_enum
  Hint: Use DROP ... CASCADE to drop the dependent objects too.
    at liquibase.executor.jvm.JdbcExecutor.execute(Unknown Source)
    at liquibase.executor.jvm.JdbcExecutor.execute(Unknown Source)
    at liquibase.database.AbstractJdbcDatabase.execute(Unknown Source)
    at liquibase.database.AbstractJdbcDatabase.executeStatements(Unknown Source)
    ... 7 more
Caused by: org.postgresql.util.PSQLException: ERROR: cannot drop type nwr_enum because other objects depend on it
  Detail: table current_relation_members column member_type depends on type nwr_enum
  Hint: Use DROP ... CASCADE to drop the dependent objects too.
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366)
    at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(Unknown Source)
    ... 11 more
@brianhatchl
Copy link
Contributor Author

This is happening during the rpm build phase, not during the test phase. Probably because the build vm is not being recreated from scratch with each jenkins job.

@brianhatchl
Copy link
Contributor Author

This seems to have been fixed as a result of 76d1425

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

1 participant