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

Web Based Change Editor

$
0
0
Hi,

I started a form based editor that uses XForms from Orbeon, but could use http://www.exist-db.org/ .  

If you are using the XML format, this could organize all your changes, provide forms to edit the changes, list and search changes, etc.

I just have a prototype and little incentive to complete it if no users express an interest. 

If you are interested in what a forms based editor for Liquibase Changes, let me know and I will give you a link to the prototype and if there is some interest, I will continue.



Cheers,
Hank

Hank Ratzesberger
XMLWerks

Re : Liquibase dbDoc command does not seem to support contexts - includes changes with non-active contexts as pending

$
0
0
Yes, that is how dbdoc is currently implemented. The trouble is that depending on how contexts (and labels) are used sometimes they make sense to mark as pending and sometimes they make sense to ignore.

I created https://liquibase.jira.com/browse/CORE-2367 to track the feature improvement.

Nathan 

Re : Restricting --diffType="data" to specific tables

$
0
0
There is now an --excludeObjects and --includeObjects flag which may allow you to do this.

Nathan 

Re : Working on setting up new Database (NuoDB) on liquid base

$
0
0
Liquibase does not have support for NuoDB, so if you want it to work you will need to create a liquibase extension.

See liquibase.org/extensions for documentation and/or something like https://github.com/liquibase/liquibase-maxdb as an example project.

Nathan

Re : Liquibase-3.3.0 -- not working with JBoss vfs

$
0
0
Can you try it with Liquibase 3.3.3?

Nathan

Re : Liquibase dbDoc command does not seem to support contexts - includes changes with non-active contexts as pending

$
0
0
I agree that its not obvious what is the correct (expected) behavior in this case. The JIRA issue looks like what I would suggest, make it configurable to consider contexts or not.

Thanks!

Issue to connect with SYSDBA using internal_logon properties

$
0
0
Hello,

I'm trying to connect to an Oracle database with complex configuration : Connection with wallet and SYSDBA role.
I'm using the following script :

  1. MASTERXML=dbchangelog.xml
    LOGINADM=OPS\$ORAADM
    DRIVER="oracle.jdbc.OracleDriver"
    JDBCURL="jdbc:oracle:thin:@DDBA01D1"
    JARFILE="${ORACLE_HOME}/jdbc/lib/ojdbc6.jar:${ORACLE_HOME}/oc4j/jlib/oraclepki.jar:${ORACLE_HOME}/oc4j/jlib/osdt_cert.jar"
    LQBHOME="/home/mboutkhi/tmp/liquibase/liquibase"
    java  -Doracle.net.tns_admin=/etc   -Doracle.net.wallet_location=/soft/oracle/adm/wallet \
                      -jar $LQBHOME/jar/liquibase-3.2.2.jar \
              --driver=${DRIVER} \
              --classpath=${JARFILE} \
                      --url=${JDBCURL} \
                      --changeLogFile=${MASTERXML} \
                      --defaultSchemaName=${LOGINADM} \
              --logLevel=debug  \
    --driverPropertiesFile=/soft/oracle/adm/wallet/sqlnet.ora \
    --defaultsFile=syspropfile.txt \
       update
Into sysprofile.txt file I have the following attribute :
internal_logon:  sysdba

The error is :
  1. Unexpected error running Liquibase: Unknown parameter: 'internal_logon'

    SEVERE 5/18/15 5:44 PM: liquibase: Unknown parameter: 'internal_logon'
    liquibase.exception.CommandLineParsingException: Unknown parameter: 'internal_logon'
            at liquibase.integration.commandline.Main.parsePropertiesFile(Main.java:431)
            at liquibase.integration.commandline.Main.run(Main.java:149)
            at liquibase.integration.commandline.Main.main(Main.java:89)

Does anyone know how to specify this property in the command line ?

Thanks

Regards,

Mohamed


Issue BLOB Handle in Liquibase for Oracle with "DISABLE STORAGE IN ROW"

$
0
0
BLOB Data : Liquibase with Oracle 

Issue : 
How to create a table contains a column as LOB( BLOB/CLOB) with "DISABLE STORAGE IN ROW"

Description : 
We are trying to create a table contains the BLOB data in Liquibase for Oracle DB 
Now challenge is that we need this particular column ( BLOB) should not contain the date in row, instead it should be linked to a table space. 
Means : We want to set the "DISABLE STORAGE IN ROW" for the BLOB Content 

Now we are able to achieve the same if we run the SQL as follows for Oracle DB 

CREATE TABLE DEVMDR1.VCH_ACTIVITY_DEFN
  (
    ...
    CREATE_TS  TIMESTAMP,
    CREATED_BY VARCHAR2(50),
    DEFN_XML BLOB,
    MODIFIED_BY    VARCHAR2(50),
    MODIFY_TS      TIMESTAMP,
    ...
PRIMARY KEY ("ACTIVITY_DEFN_KEY")
  ) LOB ("DEFN_XML") STORE AS (
  TABLESPACE "USERS" DISABLE STORAGE IN ROW CHUNK 8192
  CACHE  NOCOMPRESS ) ;
  
  
 But we are unable to achieve the same using LIQUIBASE. 
 
 
 Can someone give views on the same as need to implement the same as the earliest.
 


Additional attribute for include tag?

$
0
0
Hello,

is there any thought on intruducing the 'labels' attribute for the <include> tag?
I think this would be very handy, because when using Liquibase on several databases that all have the same core data model but some specific differences as well, not each specific would need to be labeled, but they could all be put into an own changeLog. This changeLog could then be included with an <include> that is labeled.

Thanks,

Ben

Re : MySQL creating "boolean" columns as "bit(1)" instead of "tinyint(1)"

$
0
0
MySQL itself maps "BOOLEAN" to "TINYINT(1)".
Thats a much better solution to rely on their mapping than your own.
Can it be changed in a next version?

Liquibase Rollback

$
0
0
Hi,

I have just started to look at liquibase. I am trying to understand how to do a rollback. I simply created three very simply changes

file: changelogs/change1.sql

--liquibase formatted sql

--changeset cky:1
alter table user add test1 text;

--rollback alter table user drop column test1;

file: changelogs/change2.sql
--liquibase formatted sql


--changeset cky:2
-alter table user add test2 text;

--rollback alter table user drop column test2;

file: changelogs/change2.sql

--liquibase formatted sql

--changeset cky:3
-alter table user add test3 text;

--rollback alter table user drop column test3;

So as above, each of the changesets add a column called test[x] and then their respective rollbacks drop them.

I actually have each of these changesets in a separate file.

I am trying to understand how the rollback works. 

I have applied all the three sets using

./liquibase --classpath=mysql-connector-java-5.1.35-bin.jar --driver=com.mysql.jdbc.Driver --changeLogFile=changelogs/change1.sql --url="jdbc:mysql://mysql-staging/affiliate" --username=user --password=pass migrate

The DATABASECHANGELOG table contains all 3 changes.

I also tag each of the changes as tag1, tag2 and tag3 respectively.

./liquibase --classpath=mysql-connector-java-5.1.35-bin.jar --driver=com.mysql.jdbc.Driver --changeLogFile=changelogs/change1.sql --url="jdbc:mysql://mysql-staging/affiliate" --username=user --password=pass tag tag1

Now, to rollback to tag1, I do 
./liquibase --classpath=mysql-connector-java-5.1.35-bin.jar --driver=com.mysql.jdbc.Driver --changeLogFile=changelogs/change1.sql --url="jdbc:mysql://mysql-staging/affiliate" --username=user --password=pass rollbackSQL tag1

But there is no 'drop' sql generated. I was expecting test2 and test3 columns to be deleted.

However, When I rollback using
./liquibase --classpath=mysql-connector-java-5.1.35-bin.jar --driver=com.mysql.jdbc.Driver --changeLogFile=changelogs/change2.sql --url="jdbc:mysql://mysql-staging/affiliate" --username=user --password=pass rollbackSQL tag1, it does seem to generate a drop statement 'alter table user drop column test2;' but as you can see, it is only for column test2 but not for test2 and test3 both.

I tried rolling back using
/liquibase --classpath=mysql-connector-java-5.1.35-bin.jar --driver=com.mysql.jdbc.Driver --changeLogFile=changelogs/change3.sql --url="jdbc:mysql://mysql-staging/affiliate" --username=user --password=pass rollbackSQL tag1, Here it seems to generate a drop statement 'alter table user drop column test3' for test3 but not test2.

I am failing to understand what is the purpose of the tag1 then ? It looks like it is picking up rollback statements from the changeLogFile that I specificy and not rolling back everything upto the tag automatically ?

PS: Liquibase version liquibase-3.3.4



Re : Support for descending key columns on indexes, unique constraints and primary keys

$
0
0
I'll reply on the pull request. 

Nathan

BUG: code comments for sql formated files disappers

$
0
0
hello!

My name is Raste, i work on a project and it is kind of urgent to fix this bug.
i have comments in my plsql code, but these comments disappear when i deploy via liquibase.

here is my code:

--liquibase formatted sql
--changeset  procedure_x_rbg_comment_test:4 (splitStatements:false)
create or replace function x_rbg_comment_test
as 
v_sysdate date;

begin 

--select into variable
/* select into variable*/

select sysdate
  into v_sysdate
  from dual ;


end;



the two comments after begin ( --select into variable and /* select into variable*/) disappear in this case, what i see in the database is something like this.


CREATE OR REPLACE function .x_rbg_comment_test
as 
v_sysdate date;

begin


select sysdate
  into v_sysdate
  from dual ;


end;


OBS! i have latest version of liquibase Version: 3.3.5

Regards
Raste

includeObjects not working with generateChangeLog

$
0
0
Hi,

Has anyone noticed any problems with the new "includeObjects" option when running from the command line? I can't get it working. I get an error
  1. Unexpected error running Liquibase: Unknown parameter: 'includeObjects'

My batch file looks like this:

  1. :: run liquibase
    echo path
    liquibase --driver=oracle.jdbc.OracleDriver ^
         --classpath="C:\tools\tomcat\lib\oracle-jdbc-11.2.0.2.0.jar" ^
         --changeLogFile=changelog.data.xml ^
         --url="jdbc:oracle:thin:@host.server.com:1521:DBNAME" ^
         --username=USERNAME ^
         --password=PASSWORD ^
  2.      --diffTypes="data" ^
         --dataOutputDirectory temp ^
         --includeObjects="table:TABLE_NAME" ^
         generateChangeLog

I'm using 3.3.5.

Also the command line help doesn't mention that option... It's a really useful feature and I'd love to make use of it.

Cheers,

Adam.

Issue to connect with SYSDBA using internal_logon properties

$
0
0
Hello,

I'm trying to connect to an Oracle database with complex configuration : Connection with wallet and SYSDBA role.
I'm using the following script :
  1. MASTERXML=dbchangelog.xml
    LOGINADM=OPS\$ORAADM
    DRIVER="oracle.jdbc.OracleDriver"
    JDBCURL="jdbc:oracle:thin:@DDBA01D1"
    JARFILE="${ORACLE_HOME}/jdbc/lib/ojdbc6.jar:${ORACLE_HOME}/oc4j/jlib/oraclepki.jar:${ORACLE_HOME}/oc4j/jlib/osdt_cert.jar"
    LQBHOME="/home/mboutkhi/tmp/liquibase/liquibase"
    java  -Doracle.net.tns_admin=/etc   -Doracle.net.wallet_location=/soft/oracle/adm/wallet \
                      -jar $LQBHOME/jar/liquibase-3.2.2.jar \
              --driver=${DRIVER} \
              --classpath=${JARFILE} \
                      --url=${JDBCURL} \
                      --changeLogFile=${MASTERXML} \
                      --defaultSchemaName=${LOGINADM} \
              --logLevel=debug  \
    --driverPropertiesFile=/soft/oracle/adm/wallet/sqlnet.ora \
    --defaultsFile=syspropfile.txt \
       update


Into sysprofile.txt file I have the following attribute :
internal_logon:  sysdba

The error is :

  1. Unexpected error running Liquibase: Unknown parameter: 'internal_logon'

    SEVERE 5/18/15 5:44 PM: liquibase: Unknown parameter: 'internal_logon'
    liquibase.exception.CommandLineParsingException: Unknown parameter: 'internal_logon'
            at liquibase.integration.commandline.Main.parsePropertiesFile(Main.java:431)
            at liquibase.integration.commandline.Main.run(Main.java:149)
            at liquibase.integration.commandline.Main.main(Main.java:89)


Does anyone know how to specify this property in the command line ?

Thanks

Regards,

Mohamed

Data Export/Import Heapspace And String Literal Issues

$
0
0
https://github.com/liquibase/liquibase/compare/master...carljoans:mysqlspecific
1.) Trying to export data from a very big table crashes liquibase, because it pulls all the data from the table at once.
      -- issue resolved for mysql in block 226 at the link above, mysql dump only
      -- pulls 10000 records at a time and dumps into separate csv files.
2.) Trying to import data from a very big csv file crashes liquibase.
      -- resolution to issue 1 solves this as well.
3.) String literals in Oracle. If the value in an insert statement [ "insert into table ( column )values( 'very long value' )" ] exceeds 4000 characters Oracle generates an error. Breaking the value string up into Oracle variables solves it unless your variable value exceeds 30000 characters, then a secondary string literal error is generated. So then you need to break that variable into smaller pieces as well.
      -- resolved at block 133 for Oracle only.

Is it possible to compare two packages with jpa/hibernate annotated classes? and how?

Newb question: How wells does LiquiBase play with large tables and replication under MySQL?

$
0
0
We're looking at using LiquiBase for managing (mainly for the revision control) for our MySQL servers, but I had a few questions based on past experience with schema changes and replication.

We have some large InnoDB tables that we have to use pt-online-schema-change to update due to table locking lasting more than 50 seconds causing writes to be dropped. How does LiquiBase Prevent this from happening?

Also, does LiquiBase have any problems (or risk breaking) replication to slaves? (Google serve for "liquibase mysql replication" doesn't turn up a lot, so I was wondering if someone could point in the direction of docs/warnings/cases, etc.

Thanks!
-Adam

Re : Newb question: How wells does LiquiBase play with large tables and replication under MySQL?

$
0
0
Liquibase is really only for schema/structure management, not data replication - I'm not sure if that is what you are asking or not. 

If you are worried about things like "adding a column to a table causes the table to be locked for a long time" then you are correct to be worried - this is definitely something to be aware of when altering a schema, no matter how you do it. Liquibase doesn't have any magic in this regard. One thing you can always do is use Liquibase with the 'generateSQL' option to preview what will actually be run. I did a quick Googling of pt-online-schema-change and Liquibase does not do anything like what that tool is trying to do - the SQL generated is more along the lines of "ALTER TABLE tablename..." rather than what that tool seems to be doing. 

I don't know a whole lot about database replication in MySQL at all, but basically you would need to follow the same steps as if you were doing schema changes 'manually' using SQL scripts, except that Liquibase is the one generating the SQL rather than having to custom-create it for each database. 

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

LoadData ChangeSet with "NOW" in the data

$
0
0
I am trying to load data in to my database with the loadData changeset.  One of the rows in my data has the word 'NOW' for one of the values in a column.  Liquibase is then converting that to the 'NOW' current time keyword instead of the string "NOW".  

Is there a way to escape this value?  I tried quotes around it and that did not help.


Viewing all 2993 articles
Browse latest View live


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