# Generating a change log with multiple columns foreign keys from an existing Oracle database fails

**URL:** <https://forum.liquibase.org/t/generating-a-change-log-with-multiple-columns-foreign-keys-from-an-existing-oracle-database-fails/2332>\
**Category:** General Discussion\
**Created:** [July 24, 2013, 7:49pm UTC](https://forum.liquibase.org/t/generating-a-change-log-with-multiple-columns-foreign-keys-from-an-existing-oracle-database-fails/2332 "2013-07-24T19:49:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [July 24, 2013, 7:49pm UTC](https://forum.liquibase.org/t/generating-a-change-log-with-multiple-columns-foreign-keys-from-an-existing-oracle-database-fails/2332/1 "2013-07-24T19:49:00Z")

</div>

Hi,  
  
I am trying to generate a changelog from our existing database. Couple of the tables have foreign keys that contain multiple columns. It seems this does not work, as the generated addForeignKeyConstraints does not contain comma separated baseColumnNames nor referencedColumnNames. Only the first column of the foreign key is contained.  
  
I use Liquibase 3.0.2. Is that supposed to work? Does it work for someone? Anything I could have done wrong?  
  
liquibase --defaultCatalogName= --classpath=… --driver=oracle.jdbc.OracleDriver --changeLogFile=… --url jdbc:oracle:thin:@…:1521:develop --username=USER\_2 --password=…&nbsp; generateChangeLog  
  
(… = Removed for privacy reasons)  
  
TIA,  
  
Sascha

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [July 24, 2013, 7:49pm UTC](https://forum.liquibase.org/t/generating-a-change-log-with-multiple-columns-foreign-keys-from-an-existing-oracle-database-fails/2332/2 "2013-07-24T19:49:00Z")

</div>

Same problem here with version 3.0.2.

Tibi

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [July 24, 2013, 7:49pm UTC](https://forum.liquibase.org/t/generating-a-change-log-with-multiple-columns-foreign-keys-from-an-existing-oracle-database-fails/2332/3 "2013-07-24T19:49:00Z")

</div>

I think I found a problem with how foreign keys are compared. The fix will be in 3.0.3, hopefully out soon.

Nathan

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [July 24, 2013, 7:49pm UTC](https://forum.liquibase.org/t/generating-a-change-log-with-multiple-columns-foreign-keys-from-an-existing-oracle-database-fails/2332/4 "2013-07-24T19:49:00Z")

</div>

Thanks Nathan. Looking forward to 3.0.3.  
  
Sascha

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [July 24, 2013, 7:49pm UTC](https://forum.liquibase.org/t/generating-a-change-log-with-multiple-columns-foreign-keys-from-an-existing-oracle-database-fails/2332/5 "2013-07-24T19:49:00Z")

</div>

Any news about the release date of 3.0.3?

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [July 24, 2013, 7:49pm UTC](https://forum.liquibase.org/t/generating-a-change-log-with-multiple-columns-foreign-keys-from-an-existing-oracle-database-fails/2332/6 "2013-07-24T19:49:00Z")

</div>

Working to finish it up soon. It’s been a couple busy weeks of traveling, but hopefully by the beginning of next week at the latest.

Nathan

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [July 24, 2013, 7:49pm UTC](https://forum.liquibase.org/t/generating-a-change-log-with-multiple-columns-foreign-keys-from-an-existing-oracle-database-fails/2332/7 "2013-07-24T19:49:00Z")

</div>

Thumbs up!   
  
Sascha

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [July 24, 2013, 7:49pm UTC](https://forum.liquibase.org/t/generating-a-change-log-with-multiple-columns-foreign-keys-from-an-existing-oracle-database-fails/2332/8 "2013-07-24T19:49:00Z")

</div>

It seems this is not yet fixed in 3.0.4. Multi column foreign keys are not generated correctly when running generateChangelog against Firebird and Oracle database. Shouldn’t that be fixed?

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [July 24, 2013, 7:49pm UTC](https://forum.liquibase.org/t/generating-a-change-log-with-multiple-columns-foreign-keys-from-an-existing-oracle-database-fails/2332/9 "2013-07-24T19:49:00Z")

</div>

I am going to create one and add it as a comment to the Jira entry.

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [July 24, 2013, 7:49pm UTC](https://forum.liquibase.org/t/generating-a-change-log-with-multiple-columns-foreign-keys-from-an-existing-oracle-database-fails/2332/10 "2013-07-24T19:49:00Z")

</div>

It should be fixed, I’ll have to take a look. If you have an easy test case you can send that would be great.

Nathan

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [July 24, 2013, 7:49pm UTC](https://forum.liquibase.org/t/generating-a-change-log-with-multiple-columns-foreign-keys-from-an-existing-oracle-database-fails/2332/11 "2013-07-24T19:49:00Z")

</div>

I created&nbsp;[https://liquibase.jira.com/browse/CORE-1453](https://liquibase.jira.com/browse/CORE-1453)&nbsp;to track the issue in 3.0.4

Nathan
