I forgot about the splitStatements; I had used it once or twice before but back when I first started putting this in place. Thanks!
↧
Re : How to avoid liquibase evaluating columns inside an IF EXISTS BEGIN block even when false
↧
EMF Edapt & Liquidbase
Hi There,
In Eclipse modeling world, there is EMF which let's you create Metamodels (so called ECore models).
These are then used to create actual model instances which can be persisted in XML and also to Databases or even NoSQL databases. So all pretty cool.
Model Migrations are supported through Edapt.
Edapt is pretty good in evolving a Metamodel and the actual model instances when the format is XML. Now when the model is persisted in a database, Edapt can not deal with this.
Now here is my proposal, I would like to extend Edapt to generate a Liquidbase changelog file for evolving the databases which store EMF models.
What I would like to investigate is transformation of an Edapt migration into a Liquidbase migration. Edapt would migrate the metamodel (ecore) but also generate the liquidbase change log.
Now EMF happens to be really cool dealing with XSD and XML instances.
So I would like to start to generate a metamodel from:
In Eclipse modeling world, there is EMF which let's you create Metamodels (so called ECore models).
These are then used to create actual model instances which can be persisted in XML and also to Databases or even NoSQL databases. So all pretty cool.
Model Migrations are supported through Edapt.
Edapt is pretty good in evolving a Metamodel and the actual model instances when the format is XML. Now when the model is persisted in a database, Edapt can not deal with this.
Now here is my proposal, I would like to extend Edapt to generate a Liquidbase changelog file for evolving the databases which store EMF models.
What I would like to investigate is transformation of an Edapt migration into a Liquidbase migration. Edapt would migrate the metamodel (ecore) but also generate the liquidbase change log.
Now EMF happens to be really cool dealing with XSD and XML instances.
So I would like to start to generate a metamodel from:
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd
With this, We can basically easily generate a changelog file from our Edapt migration model.
What I need from you? Well nothing really, I think all is well documented. But perhaps we can
leverage the EMF and Liquidbase world combination somehow.
LEt's see.
Cheers Christophe Bouhier (Committer on Edapt).
↧
↧
Re : Adding comments to changesets no longer works reliably
There's something else going on here. In 3.0, when doing:
- JAXBElement elem = new JAXBElement(new QName("http://www.liquibase.org/xml/ns/dbchangelog","comment"),
- String.class, "NOTE: " + comment);
Then the generated output is "-- NOTE: Some comment".
For some databases, there's a single space between "--" and "NOTE", for other databases there are two spaces. This makes it a bit harder to filter out unwanted comments (we only keep our own comments, that is, those starting with "-- NOTE")
By the way, can I simply ask Liquibase not to add its own comments, header included?
↧
Liquid Base Editor/DB Change Log (XML format) editor
↧
Re : Liquid Base Editor/DB Change Log (XML format) editor
Sorry to be the one to point this out, but the name of the project is Liquibase rather than Liquidbase. There is no "d" in the middle.
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
↧
↧
Re : inserting file into table from jar
I have found a way to do this by modifying the source code, and creating a new attribute 'valueBlobResource'. this will now read a resource file from the jar file that is running. Not sure if this the recommended way to achieve this, if not can someone point in the right direction.
↧
Re : Liquid Base Editor/DB Change Log (XML format) editor
Hi Steve,
Yes indeed, I noticed after commit. Anyway "git mv" does magic.
Cheers Christophe
Yes indeed, I noticed after commit. Anyway "git mv" does magic.
Cheers Christophe
↧
Export data from db2 database
How do I export data from a db2 database and exclude specific tables not to be included in the export data set?
↧
Re : Export refactoring?
How do you go about excluding some table from the export..
thanks
↧
↧
ignoredTables maven example
Is this patch incorporated in 3.2 version? If so How does it work in Maven
"ignoredTables"
↧
Re : changeset with multiple context
Hi,
do the context combinations work in sql-changesets? I could not get it working, tried different ways:
-- changeset erik.petzold:1 context:A and B
this one is executed, even when only context A is specified
-- changeset erik.petzold:2 context:(A and B)
this one cannot be parsed: Unexpected error running Liquibase: Cannot parse context pattern (A
-- changeset erik.petzold:3 context:"A and B"
-- changeset erik.petzold:4 context:'A and B'
these ones are never executed, even if both contexts are active
Is there another syntax or is this feature not implemented?
Thank you
do the context combinations work in sql-changesets? I could not get it working, tried different ways:
-- changeset erik.petzold:1 context:A and B
this one is executed, even when only context A is specified
-- changeset erik.petzold:2 context:(A and B)
this one cannot be parsed: Unexpected error running Liquibase: Cannot parse context pattern (A
-- changeset erik.petzold:3 context:"A and B"
-- changeset erik.petzold:4 context:'A and B'
these ones are never executed, even if both contexts are active
Is there another syntax or is this feature not implemented?
Thank you
↧
Re : changeset with multiple context
Thanks Nathan
↧
Re : changeset with multiple context
Hi Erik,
I used the liquibase version 3.2.0 and works.
The syntax would be something like you have:
<changeSet author="calfaro" id="UniqueId1" context="contextA and contextB">
<insert tableName="tableA">
<column name="setting_key" value="key"/>
<column name="setting_value" value="value"/>
</insert>
</changeSet>
...
And when i call the liquibase library i use the method update(contexts);
Where contexts is a string splitted by , with all the available contexts.
I hope this can help you
I used the liquibase version 3.2.0 and works.
The syntax would be something like you have:
<changeSet author="calfaro" id="UniqueId1" context="contextA and contextB">
<insert tableName="tableA">
<column name="setting_key" value="key"/>
<column name="setting_value" value="value"/>
</insert>
</changeSet>
...
And when i call the liquibase library i use the method update(contexts);
Where contexts is a string splitted by , with all the available contexts.
I hope this can help you
↧
↧
Re : changeset with multiple context
Hi,
in xml it works fine for me too (calling liquibase from command line).
But I don't get it running in liquibase formatted sql files.
in xml it works fine for me too (calling liquibase from command line).
But I don't get it running in liquibase formatted sql files.
↧
Re : changeset with multiple context
Could you send an example?
Maybe you need "convert" those sql files to XML format?
Maybe you need "convert" those sql files to XML format?
↧
Generate SQL file without reference schema
Hi,
there is a possibility for Liquibase to generate sql file using updateSql. Also now offline mode is available but you need to provide changelog as a changelog table. But why it is not possible to generate an SQL file without any schema just having if clause to apply or skip migrations, for example:
if <databasechangelog not contains migration_1>
then
migration_1
mark migration_1 as completed
end
if <databasechangelog not contains migration_2>
then
migration_2
mark migration_2 as completed
end
...
So in this case we can generate SQL file without having any reference schemas. What do you think about this idea or, probably, it is already implemented?
Thanks!
↧
dropFirst is ignored when defined in property files
I'm using the last liquibase version:
- <dependency>
- <groupId>org.liquibase</groupId>
- <artifactId>liquibase-core</artifactId>
- <version>3.2.0</version>
- </dependency>
- username: root
- password: admin
- verbose: true
- dropFirst: true
I can see the following in the output:
- [INFO] context(s): null
- [INFO] number of changes to apply: 0
- [INFO] drop first? false
When I set in in the maven plugin, configuration option:
- <plugin>
- <groupId>org.liquibase</groupId>
- <artifactId>liquibase-maven-plugin</artifactId>
- <version>3.1.1</version>
- <configuration>
- ...
- <dropFirst>true</dropFirst>
It works as expected, In the output:
- [INFO] Settings----------------------------
- ...
- [INFO] drop first? true
↧
↧
sqlFile property replacement in 3.2.0?
Yesterday I updated to 3.2.0 and a previously functioning sqlFile change that relies on Liquibase to do property replacement has failed. The error message that was returned displayed the property markers instead of the replacements. These properties are defined in a constants changelog that is included before my release changelog in a parent changelog. I recall reading that there was a regression on sqlFile property replacement prior to 3.1.1. Has this occurred again? Does this still work for you?
I'm sorry to be that guy. Usually I go read the code myself, but I just don't have time to do it today.
↧
loadUpdateData + runOnChange
I used loadUpdateData with runOnChange="true" to load static data tables. These rows are considered part of the app config and they do not change at runtime, so loadUpdateData seems like a natural choice. Previously, the checksumming would prevent these changes from re-running unless the underlying data changed or the changeSet definition changed.
Recently, without changing Liquibase versions, every one of my loadUpdateData changes marked runOnChange="true" began re-running every time, without any changes. It isn't harming anything in my dev environment, and I think it would be a non-issue in prod, but the unexpected behavior scares me. Has anyone else seen this?
↧
Re : sqlFile property replacement in 3.2.0?
Debugging in, I see that at SqlFileChange:143, my ChangeLogParameters are null, so there's nothing to do the property expansion with.
Here's the structure of my changelogs
update.xml
A property
include constants.xml <!--properties defined here. Some depend on property defined above-->
include v1_2_3.xml
include run_always.xml <!-- changes here used to see properties from constants.xml -->
I switch back to 3.1.1 and everything works as expected. I even mangled something to check for the false positive and the run_always that depends on a property in constants.xml fixed the mangled object.
↧