Tags:
create new tag
view all tags

ItEr65S05DatabaseUpgradeItEr64S07

Story summary Database upgrade
Iteration ItEr65week49To50
FEA ItEr65S05DatabaseUpgradeItEr64S07
Story Lead ItEr64S07DatabaseUpgrade
Next Story  
Passed acceptance test No

Acceptance Criteria

Additional Specification Comments

Implementation Notes

Review LiquiBase forum for more info.

-- ManuelRego - 07 Dec 2010

Final solution:

  • First changelog that create database: db.changelog-database.xml
  • Keep using db.changelog-initial.xml for new changes
  • Disabled Hibernate schema generation, now it just validates the schema:
        <hibernate.hbm2ddl.auto>validate</hibernate.hbm2ddl.auto>
    

More info in the mail sent to navalplan-devel mailing list.

-- ManuelRego - 10 Dec 2010

LiquiBase plugin has moved to a profile where liquibase:update Maven goal will be executed. This profile is called liquibase-update and is enabled by default. It could be disabled it needed with: -P-liquibase-update

On the other hand another new profile for liquibase:updateSQL goal was created. This profile is called liquibase-updatesql and is disabled by default. In order to enable it you should disable the previous one, so the result will be something like: -P-liquibase-update,liquibase-updatesql

This second profile will generate a migrate.sql file with the SQL needed to be applied in a database. We could generate the SQL migration script just for a changelog file with the next argument: -Dliquibase.changeLogFile=src/main/resources/db.changelog-initial.xml

TODO:

  • Check how to integrate diffChangeLog in Maven in order to automatically create changesets when we modify .hbm.xml files. For the moment this is done manually:
java -jar liquibase.jar \
        --classpath=/home/mrego/.m2/repository/postgresql/postgresql/8.3-603.jdbc4/postgresql-8.3-603.jdbc4.jar:/home/mrego/.m2/repository/org/hibernate/hibernate/3.2.7.ga/hibernate-3.2.7.ga.jar:lib/liquibase-hibernate-2.0.jar:/home/mrego/.m2/repository/org/hibernate/hibernate-annotations/3.3.1.GA/hibernate-annotations-3.3.1.GA.jar:/home/mrego/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/home/mrego/.m2/repository/org/hibernate/hibernate-commons-annotations/3.0.0.ga/hibernate-commons-annotations-3.0.0.ga.jar:/home/mrego/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar:/home/mrego/.m2/repository/org/hibernate/ejb3-persistence/1.0.1.GA/ejb3-persistence-1.0.1.GA.jar:/home/mrego/.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar:.:./hbms/ \
        --changeLogFile=db.changelog.xml \
        --driver=org.postgresql.Driver \
        --url=jdbc:postgresql://localhost/navaldev \
        --username=naval \
        --password=naval \
   diffChangeLog \
        --referenceUrl=hibernate:hibernate.cfg.xml

-- ManuelRego - 13 Dec 2010

Delay Causes

Final or Pending Considerations

Entregables de código

%RPSHOWGITCOMMITS%

Tasks in this story

Total Hours in this Story

%RPSHOWTOTALHOURS%


Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 03 Mar 2011 - mrego
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback