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

Liquibase not working when deploying

$
0
0
Liquibase is not getting triggered in server environment during deployment. But it is working fine in local environment. what might the reason for this. 

Can you please share which port no liquibase uses to execute the DB queries.

Re : Problems building Liquibase

Introduction to MSBI

$
0
0
Microsoft Business Intelligence (MSBI) is an influential suite of Data Integration, Data Reporting, Information Analysis and Mining components enhanced with technology, stunning UI and simpler eye-catchy method of design and development. MSBI applications can be utilized professionally by any business or firm for data detection, data association and usage of management potentials with the background of SQL Server.

Liquibase is NOT fully supporting for SAP HANA DB

$
0
0
As we are trying to use the existing oracle liquibase-changes.xml for SAP HANA DB, the following features are NOT supported in the Liquibase core 3.5.5 version.

1. ALTER (modify or adding column)
   Throwing excetion that SQL syntax is NOT correct.

2. forIndexName is NOT supported for SAP HANA

3. In Squence creation, ordered = false is NOT supported

4. trigger syntax needs to be changed as per SAP HANA DB

Please help to give suggestions or direction  that without any making changes in the liquibase-changes.xml and  also in liquibase core library changes, How to make common liquibase-changes.xml for both DBs ? and also so In order to work ALTER command need to change the liquibase core libraries.. how to avoid to touch the core libraries changes?

Future of Liquibase as open source project

$
0
0
In broad terms, is the development on the main liquibase github repository being de-prioritized in favor of the Datical repository?

I ask this because as of today the liquibase repo (https://github.com/liquibase/liquibase) shows zero commits in the last month and 6 pull requests still pending merging, whereas the Datical repo (https://github.com/Datical/liquibase ) shows multiple commits and pull requests being merged.

You also see things such as this bug in liquibase (https://liquibase.jira.com/browse/CORE-3222 ) which broke the CLI around 7 months ago. And even though the fix is very simple, and the community submitted a pull request with the fix, the repo owner still has not merged it and the CLI remains broken.

Should we be worried about the future of Liquibase as an open source project?  Is this basically what prompted someone to start the DB-Manul fork a few months ago?  Can someone share some details on this?

Re : Future of Liquibase as open source project

$
0
0
Hi, sorry for the apparent lack of progress on Liquibase but I want to assure you it’s not due to a Datical vs. Liquibase priority problem and Liquibase as a project is definitely not abandoned.

 

Most of the problem comes down to a poor 3.7 vs. 3.6 release management on my part. After the 3.6 release I started on changes for 3.7 with a hope of being able to release that soon. However, for various reasons that release has dragged on far longer than I had hoped while always feeling like it is “nearly there”. My time has been spent more on 3.7 but, in the meantime the 3.6 release has suffered as I’ve not had the time to also inspect and test the pull requests.

 

Now that the holidays have finished up, I was already planning on shifting my focus back to a 3.6 release based on the open pull requests. I’m planning on having a new release out by Jan 15th. As far as the commits that go into the datical repository, I’ve tended to merge those changes back into Liquibase near release time for each major release, so the changes that are in there will be in 3.7 as well.

 

It is definitely apparent that the project has grown enough that it’s past my ability to manage both incoming contributions and future work. Pull requests are great because most of the bug/feature work is done, but it does still take time for me to review and test the changes as well as ensure they do not break anything else.

 

That has made the bottleneck and I would like to improve that. Is there anyone in the community that would be interested in taking a more active role in helping me with the pull request process? Someone that could merge sets of pull request into their own fork and be able to give me the feedback on “these sets of pull requests solve the problems they claim and do not break anything else” ? If anyone is interested, let me know.

Nathan

Re : Future of Liquibase as open source project

$
0
0
Hi Nathan,

I develop using Grails and a plugin made to migrate database have issues tagged as Awaiting Third Party and addressed to Liquibase Hibernate.

There are many issues in Liquibase Hibernate (62 issues)  and 8 pull requests. It seems abandoned.
Issues like index re-creation and others would be fixed by the pull requests.

Could you answer "Is this project no longer maintained?" issue there? If it is discontinued, let us know.

Liquibase to revert back to a previous state

$
0
0
Hello,

I am quite a newbie on Liquibase and despite my research I didn't find any relevant information regarding this subject:

I am going to do a load testing on my web app.

This load test will write a lot of data in my database, and at the end of the test, I want my database looks like it was before the test.

How can I do that by command line?

Thank you.






ArrayIndexOutOfBoundsException with Liquibase 3.6.2

$
0
0
I have below liquibase script for create table. This script is working fine in v3.5.5, but if I use v3.6.2 then its giving me "ArrayIndexOutOfBoundsException". It looks like liquibase is not bale to replace the property with the value based on DB. If I remove "${varcharUnit}" and change "java.sql.Types.VARCHAR(50${varcharUnit})" to "java.sql.Types.VARCHAR(50)" then its working fine with 3.6.2.

Any one has idea what changed in v3.6.2, which leading this error?

Need help to fix this issue.

Script:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog

    <property name="varcharUnit" value=" CHAR" dbms="oracle"/>
    <property name="varcharUnit" value="" dbms="mysql"/>

    <changeSet author="test" id="table-creation-2-1">
        <preConditions onFail="MARK_RAN">
            <not><tableExists tableName="TEST" schemaName="${defaultSchema}"/></not>
        </preConditions>

        <createTable schemaName="${defaultSchema}" tableName="TEST" tablespace="TEST">
            <column name="ID" type="java.sql.Types.BIGINT">
                <constraints nullable="false"/>
            </column>
            <column name="NAME" type="java.sql.Types.VARCHAR(50${varcharUnit})">
                <constraints nullable="false"/>
            </column>
        </createTable>
    </changeSet>

</databaseChangeLog>

Error:

Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at liquibase.datatype.DataTypeFactory.fromDescription(DataTypeFactory.java:251)
at liquibase.change.core.CreateTableChange.generateStatements(CreateTableChange.java:70)
at liquibase.change.AbstractChange.generateStatementsVolatile(AbstractChange.java:287)
at liquibase.change.AbstractChange.warn(AbstractChange.java:358)
at liquibase.changelog.visitor.ValidatingVisitor.visit(ValidatingVisitor.java:109)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:78)
at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:269)
at liquibase.Liquibase.update(Liquibase.java:198)
at liquibase.Liquibase.update(Liquibase.java:179)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:353)
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:305)

Re : Liquibase to revert back to a previous state

$
0
0
Liquibase doesn't really deal with the data - so if you want to do something like this you would need to do something like use the database's native backup/restore commands, or else use something like the liquibase dropAll command, followed by a liquibase update to re-populate the schema. 

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

Re : Future of Liquibase as open source project

$
0
0
Hi, I wanted to apologize for not hitting my goal of the 15th for a 3.6 patch release, but am still planning on having one in the next few days. 

I'll also comment on the hibernate thread as well, thanks

Nathan

Liquibase for SQL Server 2008R2, DATABASECHANGLOGLOCK table creation failed.

$
0
0
While running Liquibase on SQL SERVER 2008R2, create table databasechangeloglock failed with below error 

C:\Liquibase>liquibase update<br>Starting Liquibase at Wed, 16 Jan 2019 19:07:25 IST (version 3.6.0 built at 2018-04-05 05:13:19)<br>Unexpected error running Liquibase: Column, parameter, or variable #2: Cannot find data type BOOLEAN. [Failed SQL: CREATE TABLE DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED datetime, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]<br>liquibase.exception.LockException: liquibase.exception.DatabaseException: Column, parameter, or variable #2: Cannot find data type BOOLEAN. [Failed SQL: CREATE TABLE DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED datetime, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]<br> at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:289)<br> at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:207)<br> at liquibase.Liquibase.update(Liquibase.java:184)<br> at liquibase.Liquibase.update(Liquibase.java:179)<br> at liquibase.integration.commandline.Main.doMigration(Main.java:1205)<br> at liquibase.integration.commandline.Main.run(Main.java:191)<br> at liquibase.integration.commandline.Main.main(Main.java:129)<br>Caused by: liquibase.exception.DatabaseException: Column, parameter, or variable #2: Cannot find data type BOOLEAN. [Failed SQL: CREATE TABLE DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED datetime, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]<br> at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:356)<br> at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57)<br> at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)<br> at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:109)<br> at liquibase.lockservice.StandardLockService.init(StandardLockService.java:97)<br> at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:246)<br> ... 6 common frames omitted<br>Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Column, parameter, or variable #2: Cannot find data type BOOLEAN.<br> at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217)<br> at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1655)<br> at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:885)<br> at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:778)<br> at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7505)<br> at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2445)<br> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:191)<br> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:166)<br> at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:751)<br> at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:352)<br> ... 11 common frames omitted<br><br><br>For more information, please use the --logLevel flag

Liquibase on SQL SERVER 2008R2, create table Databasechangeloglock failed.

$
0
0
While running Liquibase on SQL SERVER 2008R2, create table databasechangeloglock failed with below error 

C:\Liquibase>liquibase update<br>Starting Liquibase at Wed, 16 Jan 2019 19:07:25 IST (version 3.6.0 built at 2018-04-05 05:13:19)<br>Unexpected error running Liquibase: Column, parameter, or variable #2: Cannot find data type BOOLEAN. [Failed SQL: CREATE TABLE DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED datetime, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]<br>liquibase.exception.LockException: liquibase.exception.DatabaseException: Column, parameter, or variable #2: Cannot find data type BOOLEAN. [Failed SQL: CREATE TABLE DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED datetime, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]<br> at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:289)<br> at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:207)<br> at liquibase.Liquibase.update(Liquibase.java:184)<br> at liquibase.Liquibase.update(Liquibase.java:179)<br> at liquibase.integration.commandline.Main.doMigration(Main.java:1205)<br> at liquibase.integration.commandline.Main.run(Main.java:191)<br> at liquibase.integration.commandline.Main.main(Main.java:129)<br>Caused by: liquibase.exception.DatabaseException: Column, parameter, or variable #2: Cannot find data type BOOLEAN. [Failed SQL: CREATE TABLE DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED datetime, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]<br> at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:356)<br> at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57)<br> at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)<br> at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:109)<br> at liquibase.lockservice.StandardLockService.init(StandardLockService.java:97)<br> at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:246)<br> ... 6 common frames omitted<br>Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Column, parameter, or variable #2: Cannot find data type BOOLEAN.<br> at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217)<br> at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1655)<br> at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:885)<br> at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:778)<br> at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7505)<br> at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2445)<br> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:191)<br> at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:166)<br> at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:751)<br> at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:352)<br> ... 11 common frames omitted<br><br><br>For more information, please use the --logLevel flag

Re : Deployment_id in 3.5.3

Re : Deployment_id in 3.5.3

$
0
0
The deployment ID is used to support a new rollback type 'rollback last update'. All the changesets that are applied to a database in a single update operation are given the same deployment id. Prior to this change that feature would need to be based on the deployment timestamp, which was not reliable. 

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

Liquibase run on Server Procedure Functions triggers

$
0
0
Hello,
I have some question about Liquibase .

I explain a little bit  about how we use Liquibase

Liquibase-maven-plugin version 3.6.2

Dbchangelog-3.4.xsd

Dbms=”db2,mssql,oracle,mysql,postgresql”

Our source we used in sql tag or sqlfile is DB2

 

First : Liquibase for procedure and Functions and triggers didn’t create appropriated code for  MSSQL, MYSQL, Oracle, PostgreSQL .

We tried with sql tag,  sqlfile , createprocedure tag craetefunction tag, createtrigger tag but unfortunately it didn’t generate correctly

          

Second: I want to run the project on Server .which is the best approach?

as an example can I use:

 java -jar <myProject.jar> updateSQL


 

Sincerely

Reza Sadeghpour

DataTypes changing and constraints disparission after generating databasechangelog

$
0
0

I am using SQL Server 2014 and liquibase 3.4.2. I used liquibase to generate the changelog XML format. After generating my changelog, some datatypes have changed in a weird way, for example :

  • nvarchar(MAX) changed to varchar(MAX) while nvarchar(20) and nvarchar(100) haven't change.

  • time(7) turns to time(16)

And some primary key conditions have been ommited :

  • [MyID] INT IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL

turns to :

  • [MyID] INT IDENTITY (1, 1) NOT NULL,

Here's my commande to generate the changelog :


C:\Program Files\liquibase-3.4.2-bin>java -jar liquibase.jar --classpath="C:\Pro
gram Files\SQLjdbc\sqljdbc4-2.0.jar" --driver=com.microsoft.sqlserver.jdbc.SQLSe
rverDriver --url=jdbc:sqlserver://myIP:myPort;databaseName=MyDB --username=Myusername
 --password=mypwd --changeLogFile=C:\changelogsqlserver.xml generateChangeLog
Liquibase 'generateChangeLog' Successful

I'm newbie to liquibase and database migration. Any help would be appreciated.

If you need more details please notify me.

Is "NOT FOR REPLICATION" constraint supported in Liquibase ?

$
0
0
Hi again,

Our production database includes the constraint "NOT FOR REPLICATION" with all tables ID.
When generating the database changelog with the command  generateChangeLog this constraint disappears.

I wonder if the liquibase supports that. If so how can I proceed to keep it? thank you.

Re : Is "NOT FOR REPLICATION" constraint supported in Liquibase ?

$
0
0
Many database-specific features are not supported by the generateChangeLog and diffChangelog commands. I don't have definitive proof that this is not supported, but I do know that there are many features like this that are not supported by Liquibase. 

The company that I work for, Datical, has written extensions to Liquibase to add support for things like this. Some of the features we support include "storage options" like tablespaces and partition schemes. We also support triggers, check constraints, database packages (on Oracle), views, and more extensive support for functions and stored procedures. My point in mentioning this is that it is possible to support things like this, but it is not always straightforward. 

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

Create tablespace in oracle

$
0
0
How to create a tablespace in oracle using the existing path in Linux.
Tried to create as below but received error as mentioned below.
Let me know how to use the parameter property to create a tablespace

<property name="dbname1" value="my database name" dbms="oracle" />

CREATE TABLESPACE liquibase_DATA DATAFILE '/u01/app/oracle/oradata/"${dbname1}"/schema_liquibase.dbf' size 1g autoextend on ;

Error Details:-

 cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. 
Viewing all 2993 articles
Browse latest View live


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