Re: DBPatch

From: Aristedes Maniatis (ar..sh.com.au)
Date: Tue Apr 15 2008 - 20:08:00 EDT

  • Next message: Andrus Adamchik: "Re: DBPatch"

    On 15/04/2008, at 10:07 PM, Andrus Adamchik wrote:
    > Sure, but I think the fact that we'll get more metadata in Cayenne
    > will not make DBPatch obsolete. Cayenne schema merge can only
    > operate on a delta of two schema versions. DBPatch also deals with
    > data migration. So the two serve different goals. DBPatch is about
    > DB "versioning" across multiple installations of a DB.

    Yes, we thought that if we ever reached a goal of versioning through
    storing multiple Cayenne models, that we'd still need a post-schema-
    update hook to run SQL needed for the data upgrade.

    > I haven't thought through the cross-DB features just yet... Maybe we
    > can implement a mechanism based on defaults (e.g. if 90% of
    > dbpatches do not depend on a DB nature, you create them once, for
    > the remaining 10% you'd create files following naming
    > conventions ... mypatch.sql.mysql, mypatch.sql.derby, etc.)

    We found that lots of things had to be changed between DBs. VARCHAR ->
    VARCHAR2 in Oracle, VARCHAR(5000) in Derby -> TEXT in mySQL. Different
    ways of dropping and creating indexes, etc. The differences are
    substantial. Our initial idea was preprocessing statements:

    #mysql
    CREATE TABLE....
    #end

    But it seemed like too much work for the reward, so we just settled on
    folders full of (almost) duplicate files. Keep an eye out for a commit
    from Matthias later this week to onCourse which will implement all this.

    My only other comment here is that ant may not be the best tool for
    deployed systems.

    Regards
    Ari

    -------------------------->
    ish
    http://www.ish.com.au
    Level 1, 30 Wilson Street Newtown 2042 Australia
    phone +61 2 9550 5001 fax +61 2 9550 4001
    GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A



    This archive was generated by hypermail 2.0.0 : Tue Apr 15 2008 - 20:08:44 EDT