Re : Support for Hive (Hadoop) schema changes via Liquibase?
Re : A single user for all schemas?
Drop All Database Objects fail in liquibase
I am running in a schema named "1", But in public schema it build successfully(not trying to drop sequences).
Here is my ANT target:
<target name="dropAll" depends="prepare" >
<dropAllDatabaseObjects
driver="${db.driver}"
url="${db.url}"
username="${db.username}"
password="${db.password}"
defaultSchemaName="${db.schema}"
promptOnNonLocalDatabase="yes"
classpathref="classpath"
/>
</target>
Here is the log error:
[dropAllDatabaseObjects] Executing EXECUTE database command: DROP TABLE "1"."database_change_log" CASCADE
[dropAllDatabaseObjects] Executing EXECUTE database command: DROP TABLE "1"."database_change_log_lock" CASCADE
[dropAllDatabaseObjects] Executing EXECUTE database command: DROP TABLE "1"."party" CASCADE
[dropAllDatabaseObjects] Executing EXECUTE database command: DROP SEQUENCE "1"."party_id_seq" CASCADE
[dropAllDatabaseObjects] Release Database Lock
[dropAllDatabaseObjects] Executing UPDATE database command: UPDATE "1".databasechangeloglock SET LOCKED = FALSE, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID =1
[dropAllDatabaseObjects] Successfully released change log lock
BUILD FAILED
D:\Liquibase 3.3.2-ems\common-model\build.xml:90: Unable to drop all objects from database.
at liquibase.integration.ant.DropAllTask.executeWithLiquibaseClassloader(DropAllTask.java:31)
at liquibase.integration.ant.BaseLiquibaseTask.execute(BaseLiquibaseTask.java:82)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:811)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: liquibase.exception.DatabaseException: org.postgresql.util.PSQLException: ERROR: sequence "party_id_seq" does not exist
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:112)
at liquibase.database.AbstractJdbcDatabase.dropDatabaseObjects(AbstractJdbcDatabase.java:753)
at liquibase.Liquibase.dropAll(Liquibase.java:743)
at liquibase.Liquibase.dropAll(Liquibase.java:730)
at liquibase.integration.ant.DropAllTask.executeWithLiquibaseClassloader(DropAllTask.java:28)
... 17 more
Caused by: org.postgresql.util.PSQLException: ERROR: sequence "party_id_seq"does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:405)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:397)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:314)
... 24 more
Re : Understanding validCheckSum
When comparing the changeSet stored in the database with the checksum generated from the current changeSet, do not consider the changeSet changed if the given validCheckSum is in the database.
Did I create Jira / pull request correctly?
Hi, all.
I've followed the guidelines on the Liquibase DEV page as best I can. Can someone cross check that I've done things right? Here's what I did:
1) Registered as a user with Atlassian Cloud so I could create a Jira issue.
2) Created Jira issue CORE-2262
3) Forked the Liquibase repo at https://github.com/liquibase/liquibase, creating https://github.com/bsandiford/liquibase
4) Set my new repo default branch to 3.3.x to match where I'd like the fix made in Liquibase.
5) Checked out from my new repo, fixed the problem, committed and pushed back to my repo. Commit message includes the Jira number, summary, and what I fixed.
6) Created a pull request, and put a comment on the Jira issue so that it references the pull request (#366)
7) Waiting for someone to look at the pull request / merge back (hopefully!) / update the Jira.
One additional question. I have another bug fix I'd like to
make. Do I need to clone Liquibase again, or can I just continue in
my own repository?
Thanks!
Bob (newbie) Sandiford.
Re : Did I create Jira / pull request correctly?
Re : Did I create Jira / pull request correctly?
Thanks, Steve!
Re : Did I create Jira / pull request correctly?
OK - turns out I missed a step. For multiple pull requests from the same fork, each change should be checked into a separate branch of the forked code. Otherwise, subsequent checkins to the base of the fork just end up being added to the first pull request.
So, I'm branching my repo for each separate change, and I'll do a pull request for each branch - that will keep them all separate.
Generate SQL from ChangeLog using API and being Offline
I am trying to merely convert ChangeLog into an SQL file using the Java API. I tried something like:
- Database database = DatabaseFactory.getInstance()
- .findCorrectDatabaseImplementation(new OfflineConnection("offline:oracle"));
- Liquibase liquibase = new Liquibase("changeLog.xml", resourceAccessor, database);
- liquibase.update(new Contexts(), writer);
But I get on the very first line:
- liquibase.exception.UnexpectedLiquibaseException: java.lang.NoSuchMethodException: liquibase.database.OfflineConnection.getWrappedConnection()
- at liquibase.database.core.OracleDatabase.setConnection(OracleDatabase.java:62)
- at liquibase.database.DatabaseFactory.findCorrectDatabaseImplementation(DatabaseFactory.java:123)
What I did miss? Where could I find an example of code to do that?
Thanks for your help,
Gérald
UpdateSQL ignores dbms type?
Re : Generate SQL from ChangeLog using API and being Offline
- liquibase --changeLogFile /path/to/changeLog.xml --url offline:oracle updateSQL
- Unexpected error running Liquibase: java.lang.NoSuchMethodException: liquibase.database.OfflineConnection.getWrappedConnection()
Is it a bug or do I misuse Liquibase?
Re : Generate SQL from ChangeLog using API and being Offline
Re : YAML update fails with Unexpected error running Liquibase: java.util.LinkedHashMap cannot be cast to java.util.List
Re : FILENAME column in databasechangelog table.
Nathan
Re : Using Liquibase 3.3.2 with Vertica 7.1 : java.lang.NoSuchMethodError: liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData.getTables
Re : How to create a "super"-table which will be always created infront of any table?
Re : UpdateSQL ignores dbms type?
Nathan