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

Re : "Cluster-safe database upgrades" liquibase benefit mentioned - what does this mean?

$
0
0
The main use case is when you have Liquibase to auto-run on startup of a web application, and you have a cluster of servers that may end up being started at the same time..

Nathan

Case problem on Oracle

$
0
0
Hello,

We use several different DBs with liquibase (MySQL, Postgres, Oracle, MSSQL) and we met a problem while running our existing change sets on Oracle. We overrode the default database change log table name in our maven configuration. We had no problem with it on other DBs but it did not work on Oracle. The problem is that by default Oracle uses uppercase names for every created objects so even if we write these table names with lower case in our maven POMs, they will be in data dictionary (all_tables) with upper case names. When Liquibase tries to check if they already exist it won't find them and tries to create them. Creation fails with the following log entries:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.329 s
[INFO] Finished at: 2016-10-24T17:09:45+02:00
[INFO] Final Memory: 27M/585M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.4.2:update (default-cli) on project auth-jar: Error setting up or running Liquibase: ORA-00955: name is already used by an existing object
[ERROR] [Failed SQL: CREATE TABLE au_db_changelog (ID VARCHAR2(255) NOT NULL, AUTHOR VARCHAR2(255) NOT NULL, FILENAME VARCHAR2(255) NOT NULL, DATEEXECUTED TIMESTAMP NOT NULL, ORDEREXECUTED NUMBER(10) NOT NULL, EXECTYPE VARCHAR2(10) NOT NULL, MD5SUM VARCHAR2(35), DESCRIPTION VARCHAR2(255), COMMENTS VARCHAR2(255), TAG VARCHAR2(255), LIQUIBASE VARCHAR2(20), CONTEXTS VARCHAR2(255), LABELS VARCHAR2(255))]
[ERROR] -> [Help 1]


We located the problem which could be fixed pretty easily (at least we think it could be :) ). Here is the problematic line:
Source on Github

The fix would be using database.correctObjectName(tableName, Table.class) instead of tableName.

There might be similar problems in other queryOracle methods.

Zoltán Kinyó

If you like Liquibase, you’ll love Datical DB

$
0
0
Thanks for checking out Liquibase. If you work for a big company and are thinking about using Liquibase you will want to check out Datical DB. It has all things you like about Liquibase plus capabilities every enterprise needs – like change forecasting, rules enforcement, extended object support, reporting and more. Find out more here: ttp://www.datical.com/liquibase/

Nathan
LiquibaseBenevolent Dictator for Life

Liquibase extensions XSD empty

Re : IncludeAll runs twice once with logical path and once with absolute path

$
0
0
also be wary of issues with includeAll from 

http://www.liquibase.org/documentation/includeall.html

While the includeAll tag has many valuable uses, its use can cause problems down the road. The biggest thing to avoid is to use the includeAll tag to simulate Ruby on Rails Active Migrations strategy of a list of changes, one per file, that are ran in file order. While this seems like a good idea at first, it quickly runs into problems


Changeset identifiers - best practises - supporting multiple branches

$
0
0
Team,

Whilst the liquibase documentation doesn't enforce / recommend any particular convention for the identifier I'd be interested in other teams experiences on what worked well / didn't for them and why.  

We could generate an identifier ourselves based on the date and a number sequence e.g. YYYYMMDD-<SEQ> although if others merge changesets in the same day they might get conflicts and resolve sequence numbers. I know it doesn't matter so much even if out of sequence as the key issue is uniqueness however perhaps some schemes are better.  

Also we may have "newer" changes from old service pack branches merged into master for which we'd want to keep the same changeset identifier presumably i.e. it's the same logical changeset with schema plus data updates in most cases. 

Appreciate your thoughts and we can develop this into a guidance page

Re : Liquibase creates log tables with user schema

$
0
0
I'm not sure and it sounds more like a general SQL Server user permissions issue you might get good answers googling with those keywords.  However for liquibase it may help to simply generate the SQL it produces, log in with that user and then you can validate the owner of the table, make adjustments and test.

Re : Good discussion and review of other database migration frameworks

$
0
0
It seems dbDeploy, migrate4j and MIGRATEdb are abandoned (last release for migrade4j was in 2008, and for dbdeploy in 2009 and MIGRATEdb in 2014)

I just had a brief look at MIGRATEdb and the fact that each change needs to for itself it has already been applied somehow defeats the purpose of such a tool.

The only true contender I know of today, is Flyway which only(?) supports custom SQL scripts.

I still prefer the XML format because it can be used for DBMS independent migrations and allows for some automated analysis of the migrations which is really hard to do with SQL scripts (e.g. we have a little tool that parses the XML and then checks if certain naming conventions are following if each table has a primary key and so on).

It also makes generating a changelogs easier. We also have a set of macros for Toad Data Modeler that allow us to generate the Liquibase Changeset directly from there - in a DBMS independent manner. We even had a set of XLST scripts that would convert the XML of a freeware modelling tool into a Liquibase ChangeLog






includeAll without recursion

$
0
0
I suppose that includeAll is recursive and there is no possibility to make it not recursive, is it correct?

I need this possibility. Is it on your roadmap?

Re : Deployment_id in 3.5.3

$
0
0
Yes, the deployment_id is automatically generated, and there is currently no way to control or supply that value. 

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

Re : Deployment_id in 3.5.3

Re : Changeset identifiers - best practises - supporting multiple branches

$
0
0
We have found it easier to have identifiers as JIRA tickets with optional -01/-02 etc when necessary. It has worked well for us, furthermore it immediately tells you which ticket the changeset belongs to.

Re : Changeset identifiers - best practises - supporting multiple branches

$
0
0
Thanks Raj, yes although the changeset comment could be used to reflect that information too. When you span multiple JIRA tickets for a change do you have any pattern? How do you coordinate numbers between them? 

Given the insignificance of the identifier actually needing to be sequential I'm wondering if a simple GUID auto generated is even better with the changeset comment reflecting other information e.g. the date it was originally created / JIRA entities and so on.  You would never have to worry about whether an identifier was really unique too.


Re : Changeset identifiers - best practises - supporting multiple branches

$
0
0
For multiple tickets for a change, usually we put the main jira ticket number as id and reference all tickets in comments. That seems to work well for us.

Liquibase partially contained database case sensetivity

$
0
0
I have created partially contained database in MS SQL server 2012. Database collation is Cyrillic_General_CS_AS. In contained database this collation applies only for user data and temp data. Database metadata is in default catalog collation - Latin1_General_100_CI_AS_WS_KS_SC. So now i have case-insensetive table names and case-sensetive user data.
In my java application i am trying to modify existing table with liquibase. Database.isCaseSensitive() returns me that my database is case-sensetive. And when i am trying to get existing Table from DatabaseSnapshot it returns me null. But infact this table is exsist in database.

      Table realTable = snapshot.get(table); //returns null

Is there any ways to change this behaviour?

Thank you!


clustered index for MSSQL

$
0
0
Hi,

I see that in LIQUIBASE 3.3.0 AND 3.2.3 THERE IS NEW ATTRIBUTE:

Support for clustered/nonclustered indexes and primary keys

We installed the latest version(3.5.1 ??)

We're running it on MSSQL

I did the following and got err:

Attribute 'clustered' is not allowed to appear in element 'createIndex'.

   <createIndex 
   indexName="pk_t_premium_rates"
   tableName="t_premium_rates"
   unique="true"
   clustered="true">
<column name="actuary_version_table"/>
<column name="actuary_table_edition"/>

clustered index for MSSQL

$
0
0

I see that in LIQUIBASE 3.3.0 AND 3.2.3 THERE IS NEW ATTRIBUTE:

Support for clustered/nonclustered indexes and primary keys

We installed the latest version(3.5.1 ??)

We're running it on MSSQL

I did the following and got err:

Attribute 'clustered' is not allowed to appear in element 'createIndex'.

    <createIndex 
    indexName="pk_t_premium_rates"
    tableName="t_premium_rates"
    unique="true"
    clustered="true">
<column name="actuary_version_table"/>
<column name="actuary_tab

JIRA registration problem

$
0
0
I need to file an issue against Liquibase 3.5.3, but have been having trouble registering to JIRA.  I've tried a few times over the past week and always receive the same message at the end of the registration process: "We are currently unable to complete your sign up. There are no available licenses for JIRA Software."

Are there any admins who could look into this?  Or perhaps it's something I'm doing wrong?

(The actual issue I need to file is that Liquibase doesn't play well with javacc 6)

Re : JIRA registration problem

$
0
0
I'll make sure Nathan sees this, but in the meantime if you would like to write something up here I can enter it into Jira.

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

Re : JIRA registration problem

$
0
0
Thanks Steve.  Here's what I'm running into: I'm the package maintainer for Liquibase in Fedora (a Linux distribution) and when I build Liquibase in the impending version of Fedora I'm getting some compilation errors.

Compilation failure
[ERROR] /builddir/build/BUILD/liquibase-liquibase-parent-3.5.3/liquibase-core/src/main/java/liquibase/util/SqlParser.java:[54,19] liquibase.util.SqlParser.SqlCharStream is not abstract and does not override abstract method setTrackLineColumn(boolean) in liquibase.util.grammar.CharStream

Javacc 5.x, used by current Fedora releases, works just fine but the impeding release uses Javacc 6.1.3.  In Javacc 6.1.3, it looks like the CharStream interface added some new methods with setTrackLineColumn and getTrackLineColumn among them.  The documentation on these interfaces on the javacc site is very spotty, but I found some random javadoc that appears to reflect the new interface.  If the Liquibase team could implement those missing methods, I can get Liquibase built for upstream Fedora.
Viewing all 2993 articles
Browse latest View live