Quantcast
Channel: Liquibase Forums
Viewing all 1169 articles
Browse latest View live

Re : Java Version Requirements for Liquibase Version 3.4.2

$
0
0
Thanks! That was the issue. Our driver claims to support Java 6, but appears it actually does not.

Just starting with Liquibase - please help.

$
0
0

I am trying to start working with Liquibase, but I have some difficulties,

I have tested my connection string to SQL-Server with SQuirrel and the connection test succeeded.

I have tried for the last two days several solutions, but I can't figure out why the initial update fails :

 

This is my code :

liquibase --driver=com.microsoft.sqlserver.jdbc.SQLServerDriver --classpath="C:\Program Files\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu\sqljdbc4.jar" --changeLogFile=databaseChangeLog.sql --url="jdbc:sqlserver://it-dev-01\DataCenter;databaseName=MyDatabase" --username=Liquibase --password=Liquibase update

 

This is the output :

Unexpected error running Liquibase: Unexpected value databaseName: parameters must start with a '--'

SEVERE 14:38 02/02/16: liquibase: Unexpected value databaseName: parameters must start with a '--'

liquibase.exception.CommandLineParsingException: Unexpected value databaseName: parameters must start with a '--'

    at liquibase.integration.commandline.Main.parseOptions(Main.java:740)

    at liquibase.integration.commandline.Main.run(Main.java:129)

    at liquibase.integration.commandline.Main.main(Main.java:99) 

Re : Just starting with Liquibase - please help.

$
0
0
You might try putting your arguments into a liquibase.properties file rather than all on the command line and see if that helps. I'm thinking maybe there is an issue with quoting and splitting and parsing. It appears that the system is confused about the databaseName that is in the connection string.

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

How does Liquibase handle Oracle Tables and columns that are "quoted" ?

$
0
0
I have several tables in my Oracle database that have quoted names and columns

CREATE TABLE "Example" 
("Col1" varchar2(50),
"col2" varchar2(50)
);

When liquibase generates the changelog, I lose the quotes and all my table/column names become uppercase.


CREATE TABLE EXAMPLE
(COL1 varchar2(50),
COL2  varchar2(50)
);


Any thoughts on how to "escape" the quotes, to re-generate the tables as originally created?

Re : How does Liquibase handle Oracle Tables and columns that are "quoted" ?

$
0
0
There are two things to check. 

The first is to check whether the changelog being generated has the correct case. Hopefully it should. Once you have confirmed that, there is an attribute you can apply to individual change sets to set the 'quoting strategy' to be used. Here is an example:
  1.     <changeSet author="steve" created="Fri Jan 29 14:35:41 CST 2016" id="AddNewTable" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
  2.         <createTable schemaName="SCHEMA1" tableName="NewTable">
  3.             <column name="COLUMN1" type="TEXT">
  4.                 <constraints nullable="true" primaryKey="false" unique="false"/>
  5.             </column>
  6.         </createTable>
  7.     </changeSet>
I was just speaking with Nathan (benevolent dictator for life) and he realized there isn't really a way to set that quoting strategy globally on a changelog, so he is going to put that on the list of feature requests. 

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

Re : Just starting with Liquibase - please help.

$
0
0
Hi Steve, 
Thanks  for your response :
1. I have tried using liquibase.properties file. It seems that Liquibase just ignores this file.
2. I have tested the URL on  SQuirrel  and the connection suceeded, why should it be different in Liquibase?

Re : Just starting with Liquibase - please help.

$
0
0
If Liquibase seems to be ignoring the file, you are doing something incorrectly. It does work - I use that functionality every day. If you can include exactly what you tried, I might be able to help diagnose the issue. Including the argument 

--logLevel=DEBUG

in your command line will also cause Liquibase to include more information in its output, and that may be helpful.

The fact that a URL works with SquirrelSQL and not with Liquibase just indicates that they are parsing the URLs differently. They are different code bases after all.

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

How to load BLOB file into Oracle DB

$
0
0
Hello,

I would like to load blob files with Liquibase but I didn't find any way to do it.
Is it a functionality available into 3.2.2 version ?
Thanks,

Mohamed

Re : How to load BLOB file into Oracle DB

$
0
0
Hello,

This is available via this type of changeSet :
  <insert tableName="TEST_BLOB">
            <column name="a" valueBlobFile="01_Capture.png"/>
    </insert>

by using the xsd 3.0

Regards,
Mohamed


Re : Just starting with Liquibase - please help.

$
0
0
The problem was created by the backslash in Windows operating system.

Thanks.

Re : Just starting with Liquibase - please help.

Run Migrator pulling changelogs from a .JAR file (Spring boot)

$
0
0
Hi, 
I have Spring boot Jar application with changelogs inside the jar.
I want to run updateSQL command with command line.

Is it possible?
Thx

Re : Run Migrator pulling changelogs from a .JAR file (Spring boot)

$
0
0
I believe this is possible, but I am not certain of the exact commands and where in the jar file the changelogs should be located. It would most likely involve listing the jar with the changelogs as part of the classpath.

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

Re : Run Migrator pulling changelogs from a .JAR file (Spring boot)

$
0
0
I tried the following :

java -jar liquibase.jar --driver=com.mysql.jdbc.Driver --classpath=myapplication.jar --changeLogFile=/liquibase/current-changelog.xml  --url=jdbc:mysql://localhost/liquibase --username=root --password=root updateSQL > /tmp/script.sql

And I got the error :

Cannot find database driver: com.mysql.jdbc.Driver

Re : Run Migrator pulling changelogs from a .JAR file (Spring boot)

$
0
0
Excellent - seeing what you actually did and what errors happened is super helpful. 

The problem you are habing now is because the mysql driver jar is not on the classpath. You would need to do something like this:

java -jar liquibase.jar --driver=com.mysql.jdbc.Driver --classpath=myapplication.jar;mysqldriver.jar --changeLogFile=/liquibase/current-changelog.xml  --url=jdbc:mysql://localhost/liquibase --username=root --password=root updateSQL > /tmp/script.sql

Inside your myapplication.jar, I think you would need to have (root)/liquibase/current-changelog.xml

Solving the first problem will get you further and may reveal other issues. 


Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

Re : Run Migrator pulling changelogs from a .JAR file (Spring boot)

$
0
0
Hi Steve

It doesn't work
I got :
mysql-connector-java-5.1.34.jar: command not found

Any ideas?

Re : Adding Netezza extension - problem trying to get "generateChangeLog" to work with a db implemented by an extension

Re : Run Migrator pulling changelogs from a .JAR file (Spring boot)

$
0
0
Can you show me the command that you used? In general, whenever reporting a problem, you should always include three things:

1. This is what I did
2. This is what actually happened
3. This is what I expected to happen

"It doesn't work" isn't super helpful, because I don't know what "It" is.

In this case, if "It" is the exact command I gave you, then the problem could be the separator used in that command - rather than a semicolon, it might need to be a colon (if you are on unix-like OS). 

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

Not able to generate rollback scripts by tag in offline mode

$
0
0
I am trying to generate a rollback script by rollbackTag using maven liquibase plugin as follows in offline mode. It failed to find a tag in offline database(nothing but a changelog.csv file generated on process). It working by rollbackCount.

I am suspecting the problem with generated changelog file in offline mode It's not updating changeset tag information in it.
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>${liquibase.maven.plugin.version}</version>
<configuration>
<propertyFileWillOverride>true</propertyFileWillOverride>
</configuration>
<executions>
<execution>
<id>write-application-rollback-script-sql</id>
<phase>generate-sources</phase>
<configuration>
<changeLogFile>changelog/install-hub.xml</changeLogFile>
<propertyFile>env/offline.properties</propertyFile>
<migrationSqlOutputFile>${project.basedir}/target/liquibase/RollbackPatchScript.sql</migrationSqlOutputFile>
<rollbackTag>v3.1.0-1896</rollbackTag>
</configuration>
<goals>
<goal>rollbackSQL</goal>
</goals>
</execution>
</executions>
</plugin>

offline.properties
url: offline:oracle?version=11.0&changeLogFile=changelog.csv&outputLiquibaseSql=true

Re : Not able to generate rollback scripts by tag in offline mode

$
0
0
I am not clear what you are trying to do - what are the exact commands you used, and what are the relavant input files used? 

I am not clear what your expected result is, nor is it clear what the actual result was. Without those three things, it is very difficult to diagnose the problem.

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
Viewing all 1169 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>