A new topic, 'Request for Enhancement: Multiple include', has been made on a 
board you are watching.

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

The text of the topic is shown below:

With LiquiBase 1.9.1 I am having difficulty with multiple <include> tags 
pointing to the same change log file.  I get the error, "1 change sets had 
duplicate identifiers".  Has this been addressed in 2.0 beta?

According to the manual,

http://www.liquibase.org/manual/include
Quote
Currently there is no checking for looping changelogs or double inclusion of 
changelogs.

If you include a changelog twice, you shouldn't run into problems because the 
second time around, LiquiBase will know that the changeSets have been run and 
won't run them again ...


I have multiple projects, say A, B, C and D.  Projects A and B may be deployed 
independently or together.  They both have project C as a dependency.  The 
change logs for A and B each include the change log for C.  The change log for 
project D includes the change logs for projects A and B.  The change log for 
project D gets the error "1 change sets had duplicate identifiers".

A simple test verifies that double inclusion produces this error.  (Copied 
below.)

A workaround is to move the inclusion of changelog C to changelog D.  However, 
that means that all dependencies must propagate to the top level.

Can this be fixed?

Thanks,
  --Steve

changelog1.xml:
<databaseChangeLog
  xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9
         http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd";>

  <include file="changelog2.xml"/>
  <include file="changelog2.xml"/>
</databaseChangeLog>

changelog2.xml:
<databaseChangeLog
  xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9
         http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd";>

   <changeSet id="1" author="alfredeneuman">
      <createSequence sequenceName="hibernate_sequence" />   
   </changeSet>   
        
</databaseChangeLog>

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