A new topic, 'What reason is there to use a changeset for each database 
statement ?', has been made on a board you are watching.

You can see it at
http://liquibase.org/forum/index.php?topic=114.new#new

The text of the topic is shown below:

(Firstly, I apologize for my bad English)
(Secondly, congratulations for this fabulous tool)

I don't understand the reason to write a different changeset for each database 
statement. Why to put different ids over the same author and the same 
install/update/rollback activity?

In software version control like svn, I think the changes done by a developer 
are referred to unique id. These changes can affect to many methods, many 
classes and many files but while they are committed in the same activity, they 
always have the same ID.

In my case, I use liquibase Ant tasks to install/update/rollback a DDL software 
unit and I need to do all the changes (sometimes hundreds of statements) in a 
transaction, when I use generateChangeLog (to generate liquibase file over 
hibernate mappings) and diffDatabaseToChangeLog, these processes generate 
changeSets with theirs different id for each statement.

Problems:
 - It's very awful and error-prone to generate sql script (updateDatabase / 
rollbackFutureDatabase) with lots of changes on databasechangelog table.
 - If a DBA wants to view and optimize the generated sql file, I think he is 
confused to observe each databasechangelog statement (with its different id) 
and this situation obligated DBA to know about liquibase operation.
 - The databasechangelog table is left in awful and confused state. The table 
is filled with tens or hundres of rows with only one activity. In my case, I 
only want to annotate the activity with a simple databasechangelog row (author 
= DDL software unit name, id = version of the software unit, filename = any).
 - LiquiBase attempts to execute each changeSet in a transaction that is 
committed at the end, but I want to do all the activity in a transaction, not 
each statement.

My solution:
To put a option in the liquibase ant tasks (generateChangeLog / 
diffDatabaseToChangeLog) to can choose the two options:
 - only one changeset for all the activity.
 - a changeset per statement.

Unsubscribe to new topics from this board by clicking here: 
http://liquibase.org/forum/index.php?action=notifyboard;board=1.0

Regards,
The LiquiBase Community Forum Team.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Liquibase-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/liquibase-user

Reply via email to