# upgrade existing db project 1.9 =\> 2.0

**URL:** <https://forum.liquibase.org/t/upgrade-existing-db-project-1-9-2-0/242>\
**Category:** General Discussion\
**Created:** [September 18, 2009, 12:35pm UTC](https://forum.liquibase.org/t/upgrade-existing-db-project-1-9-2-0/242 "2009-09-18T12:35:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![taranenko](https://avatars.discourse-cdn.com/v4/letter/t/ee7513/32.png) [@taranenko](https://forum.liquibase.org/u/taranenko)\
**Post date:** [September 18, 2009, 12:35pm UTC](https://forum.liquibase.org/t/upgrade-existing-db-project-1-9-2-0/242/1 "2009-09-18T12:35:00Z")

</div>

Hi,  
definitely I skipped a how-to upgrade existing 1.9 project to version 2.0

Trying to launch 2.0 over 1.9 database liquibase throws exception (launched under maven 2.2.0)

…trunk\mischung-dbupdate\mischung\>mvn package  
[INFO] Scanning for projects…  
[INFO] ------------------------------------------------------------------------  
[INFO] Building Update Mischung db  
[INFO]&nbsp; &nbsp; task-segment: [package]  
[INFO] ------------------------------------------------------------------------  
[INFO] [resources:resources {execution: default-resources}]  
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!  
[INFO] Copying 52 resources  
[INFO] [compiler:compile {execution: default-compile}]  
[INFO] Nothing to compile - all classes are up to date  
[INFO] [liquibase:updateSQL {execution: generate-step}]  
[INFO] ------------------------------------------------------------------------  
[INFO] there are no resolved artifacts for the Maven project.  
[INFO] Output SQL Migration File: C:\dev\reckitt\MischungAppl\trunk\mischung-dbupdate\mischung\target\liquibase\migrate.sql  
[INFO] Executing on Database: jdbc:jtds:sqlserver://localhost:1433;DatabaseName=mischung  
18.09.2009 12:23:59 liquibase.logging.JavaUtilLogger info  
INFO: Successfully acquired change log lock  
18.09.2009 12:23:59 liquibase.logging.JavaUtilLogger warning  
WARNUNG: C:/dev/reckitt/MischungAppl/trunk/mischung-dbupdate/mischung/target/classes/changeset-mischung.xml is using schema version 1.9 rather than version 2.0  
18.09.2009 12:24:00 liquibase.logging.JavaUtilLogger info  
INFO: Reading from [dbo].[DATABASECHANGELOG]  
18.09.2009 12:24:00 liquibase.logging.JavaUtilLogger info  
INFO: Successfully released change log lock  
18.09.2009 12:24:00 liquibase.logging.JavaUtilLogger info  
INFO: Successfully released change log lock  
18.09.2009 12:24:00 liquibase.logging.JavaUtilLogger info  
INFO: Successfully released change log lock  
[INFO] ------------------------------------------------------------------------  
[ERROR] BUILD ERROR  
[INFO] ------------------------------------------------------------------------  
[INFO] Error setting up or running Liquibase: Error executing SQL SELECT FILENAME,AUTHOR,ID,MD5SUM,DATEEXECUTED,ORDEREXECUTED,TAG FROM [dbo].[DATABASECHANGELOG] ORDER B  
Y DATEEXECUTED ASC, ORDEREXECUTED ASC

Invalid column name ‘ORDEREXECUTED’.  
[INFO] ------------------------------------------------------------------------  
[INFO] For more information, run Maven with the -e switch  
[INFO] ------------------------------------------------------------------------  
[INFO] Total time: 3 seconds  
[INFO] Finished at: Fri Sep 18 12:24:00 GMT+01:00 2009  
[INFO] Final Memory: 8M/15M  
[INFO] ------------------------------------------------------------------------

It would be nice to be pointed how to troubleshoot the issue .

Cheers, Oleg

---

<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:** [September 18, 2009, 12:35pm UTC](https://forum.liquibase.org/t/upgrade-existing-db-project-1-9-2-0/242/2 "2009-09-18T12:35:00Z")

</div>

Probably because there is not howto for upgrading to 2.0 yet 🙂

We are still working on 2.0, it is just in beta3, and so we have not yet finalized or documented how the upgrade process works. I added some checks that should have upgraded your database.&nbsp; What version of 2.0 are you running?&nbsp; The latest from trunk?

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:** [September 18, 2009, 12:35pm UTC](https://forum.liquibase.org/t/upgrade-existing-db-project-1-9-2-0/242/3 "2009-09-18T12:35:00Z")

</div>

The method that should upgrade the table is AbstractDatabase.checkDatabaseChangeLogTable()

---

<div class="post-metadata">

**Author:** ![taranenko](https://avatars.discourse-cdn.com/v4/letter/t/ee7513/32.png) [@taranenko](https://forum.liquibase.org/u/taranenko)\
**Post date:** [September 18, 2009, 12:35pm UTC](https://forum.liquibase.org/t/upgrade-existing-db-project-1-9-2-0/242/4 "2009-09-18T12:35:00Z")

</div>

Yes, I’m using the trunk version.

One more suggestion. Add a maven/ant/liqubase tasks to do such upgrading convenient.  
I’m not sure if should be done automatically. The best way - do manually, optionally with generating SQL script (as updateSQL task)  
Name of the new task?  
liquibaseUpgrade, or simple ‘upgrade’, parameters currentVersion, targetVersion.  
What about downgrade? It would be super, if not tedious, of course.

It will help protect investment in the liquibase and robustness of the program.

---

<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:** [September 18, 2009, 12:35pm UTC](https://forum.liquibase.org/t/upgrade-existing-db-project-1-9-2-0/242/5 "2009-09-18T12:35:00Z")

</div>

I think doing an automatic upgrade is the better option.&nbsp; There are times (such as having liquibase run as part of application startup as a servlet listener) that you can’t expect people to know when to do an “upgrade” command vs. a regular update.&nbsp; Plus, if it is automatic and transparent, it will save me from having to write more of a howto guide 🙂

The automatic upgrade was working at one point, I’ll have to look into why it is not now.

Nathan&nbsp;

---

<div class="post-metadata">

**Author:** ![albatross\_lb](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@albatross\_lb](https://forum.liquibase.org/u/albatross_lb)\
**Post date:** [September 18, 2009, 12:35pm UTC](https://forum.liquibase.org/t/upgrade-existing-db-project-1-9-2-0/242/6 "2009-09-18T12:35:00Z")

</div>

The upgrade guide at [http://www.liquibase.org/v2\_upgrade](http://www.liquibase.org/v2_upgrade) oes not specify _how_ to upgrade. In particular: If I have a series of changelogs in 1.9 format (which have not been applied), will these be processed correctly by 2.0 ?

If so, this is my suggestion to add to the upgrade guide:

## Upgrade Process

To upgrade, start creating the new changelogs in 2.0 format. At the first run of the 2.0 version of Liquibase, the existing checksums in the DATABASECHANGELOG table will be upgraded. Subsequently the changelogs will be applied. Any existing changelogs in 1.9 format will successfully be processed by 2.0.

If the above is not correct, then what is the procedure?

---

<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:** [September 18, 2009, 12:35pm UTC](https://forum.liquibase.org/t/upgrade-existing-db-project-1-9-2-0/242/7 "2009-09-18T12:35:00Z")

</div>

You should be able to leave your changelogs in 1.9 format.&nbsp; The XML format is the same, with the only difference being the lack of the modifyColumn change and any new features in 2.0.&nbsp;

For most people, you should be able to just replace the jar file and it will work as expected.&nbsp; I’ll make sure tho describe the checksum changes better, though.&nbsp;

Nathan
