# Problem with generateChangeLog for existing database

**URL:** <https://forum.liquibase.org/t/problem-with-generatechangelog-for-existing-database/1899>\
**Category:** General Discussion\
**Created:** [April 2, 2012, 7:12pm UTC](https://forum.liquibase.org/t/problem-with-generatechangelog-for-existing-database/1899 "2012-04-02T19:12:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffwoqsjdhgcvukyasc](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jeffwoqsjdhgcvukyasc](https://forum.liquibase.org/u/jeffwoqsjdhgcvukyasc)\
**Post date:** [April 2, 2012, 7:12pm UTC](https://forum.liquibase.org/t/problem-with-generatechangelog-for-existing-database/1899/1 "2012-04-02T19:12:00Z")

</div>

Hi,

New to liquibase as of today. Trying to test some changes by first getting a copy of our existing database schema into liquibase. I ran the following command:

liquibase --driver=org.postgresql.Driver \</div\>

&nbsp; &nbsp; &nbsp; --changeLogFile=db.changelog.xml \</div\>

&nbsp; &nbsp; &nbsp; --classpath=postgresql-9.1-901.jdbc4.jar \</div\>

&nbsp; &nbsp; &nbsp; --url=“jdbc:postgresql://dev01:5432/ampamw” \</div\>

&nbsp; &nbsp; &nbsp; --username=inpoc \</div\>

&nbsp; &nbsp; &nbsp; --password=password \</div\>

&nbsp; &nbsp; &nbsp; generateChangeLog

against a postgresql 8.4 instance. The result looked like:

Liquibase Home is not set.

Liquibase Home: /Users/jeffwilliams/dev/liquibase/liquibase

INFO 4/2/12 2:10 PM:liquibase: Reading tables for inpoc @ jdbc:postgresql://dev01:5432/ampamw …

INFO 4/2/12 2:10 PM:liquibase: Reading views for inpoc @ jdbc:postgresql://dev01:5432/ampamw …

INFO 4/2/12 2:10 PM:liquibase: Reading foreign keys for inpoc @ jdbc:postgresql://dev01:5432/ampamw …

WARNING 4/2/12 2:11 PM:liquibase: Foreign key fk9ebfecd361bbc6d0 references table amw\_stat\_report\_key, which is in a different schema. Retaining FK in diff, but table will not be diffed.

WARNING 4/2/12 2:11 PM:liquibase: Foreign key amw\_presale\_user\_fk1 references table amw\_presale\_secret\_key, which is in a different schema. Retaining FK in diff, but table will not be diffed.

WARNING 4/2/12 2:11 PM:liquibase: Foreign key fk41eeff742c60edf0 references table amw\_presale\_secret\_key, which is in a different schema. Retaining FK in diff, but table will not be diffed.

INFO 4/2/12 2:11 PM:liquibase: Reading primary keys for inpoc @ jdbc:postgresql://dev01:5432/ampamw …

INFO 4/2/12 2:11 PM:liquibase: Reading columns for inpoc @ jdbc:postgresql://dev01:5432/ampamw …

Liquibase Update Failed: ERROR: syntax error at or near “column”

&nbsp; Position: 9

SEVERE 4/2/12 2:11 PM:liquibase: ERROR: syntax error at or near “column”

&nbsp; Position: 9

liquibase.exception.DatabaseException: org.postgresql.util.PSQLException: ERROR: syntax error at or near “column”

&nbsp; Position: 9

… 5 more

Regards,

Jeff

---

<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:** [April 2, 2012, 7:12pm UTC](https://forum.liquibase.org/t/problem-with-generatechangelog-for-existing-database/1899/2 "2012-04-02T19:12:00Z")

</div>

It looks like it is getting caught up on a column or table named “column”. Do you know where that may be and if it would be easy to rename as a workaround?  
  
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:** [April 2, 2012, 7:12pm UTC](https://forum.liquibase.org/t/problem-with-generatechangelog-for-existing-database/1899/3 "2012-04-02T19:12:00Z")

</div>

Ok, I’ve found what may be the cause:

1. # \d tmp\_rule\_type\_group
2. Table “public.tmp\_rule\_type\_group”
3. &nbsp; Column &nbsp;| &nbsp;Type &nbsp; | Modifiers&nbsp;
4. ----------±--------±----------
5. &nbsp;ruleid &nbsp; | integer |&nbsp;
6. &nbsp;?column? | text &nbsp; &nbsp;|&nbsp;

However, shouldn’t liquibase be able to handle strange column names that are accepted by the database? Or is there an easy way to exclude this table from the dump? Getting a rename may take a long time.

Jeff
