RE: Wish

From: Gentry, Michael (michael_gentr..anniemae.com)
Date: Thu Jun 24 2004 - 10:43:26 EDT

  • Next message: Bret Gregory: "DB Adapter Failing to Load"

    My approach has always been option #2. I set up the initial model and
    then if I need to add columns/etc to the database, I add it to the model
    and save it. Then I create a patch script (schemaUpdate.01 or similar)
    for the database (alter table blah...) and check the script into CVS. I
    also have the initial SQL used to create the database, if starting from
    scratch, in CVS, too. This way, you don't lose your data and it is easy
    to see exactly how the schema evolved over time. It is fairly easy to
    apply the patches to the database, even if setting up a new one -- you
    can write a script for that, just execute all the patches in numerical
    order.

    I actually prefer an approach like this to a more automated one in the
    modeler because it shows the history better, but I can see the appeal of
    an automated approach, too.

    Hope that helps,

    /dev/mrg

    -----Original Message-----
    From: Elia Morling [mailto:eli..amiljen.se]
    Sent: Thursday, June 24, 2004 8:37 AM
    To: Sako!; cayenne-use..bjectstyle.org
    Subject: Re: Wish

    Sako, Thanks for your reply.

    Yup. I can connect to the database and Reenginner the Database Schema.
    The
    problems occur at a later stage when I make changes to my database. At
    that
    point I can either:
    1) Reenginner the Database Schema again, which will create a new DataMap
    and force me to reestablish relationships and attribute settings
    or
    2) Make manual changes

    What I want is for the modeler to detect all new changes to my database
    (new
    fields etc.) and add them to the existing DataMap.

    Elia

    ----- Original Message -----
    From: "Sako!" <webobject..tcc.datos.de>
    To: "Elia Morling" <eli..amiljen.se>; <cayenne-user@objectstyle.org>;
    "James Treleaven" <jametre..noreo.on.ca>
    Sent: Thursday, June 24, 2004 1:32 PM
    Subject: Re: Wish

    > did you try this example Elia?
    >
    http://objectstyle.org/cayenne/modelerguide/object-relational-modeling/e
    xisting-database.html
    >
    > if you cant connect the DB. this is another Q.
    >
    > Sako.
    > ----- Original Message -----
    > From: "Elia Morling" <eli..amiljen.se>
    > To: <cayenne-use..bjectstyle.org>; "James Treleaven"
    > <jametre..noreo.on.ca>
    > Sent: Wednesday, June 23, 2004 6:35 PM
    > Subject: Re: Wish
    >
    >
    > > Actually, neither. I want to Reengineer the Database Schema without
    > > having it create a "new structure". I want it to retreive changes to
    > columns
    > > so that I don't have to do it manually for every change to the
    database.
    > >
    > > Elia
    > >
    > > ----- Original Message -----
    > > From: "James Treleaven" <jametre..noreo.on.ca>
    > > To: <cayenne-use..bjectstyle.org>
    > > Sent: Wednesday, June 23, 2004 5:22 PM
    > > Subject: Re: Wish
    > >
    > >
    > > > If you mean 'make the cayenne schema match the database schema'
    this is
    > > > easy to do with Tools->Reengineer Database Schema. If you mean
    'make
    > > > the database schema match the cayenne schema' this can be done
    with
    > > > Tools->Generate Database Schema.
    > > >
    > > > James
    > > >
    > > > Elia Morling wrote:
    > > > > Would it be possible for a "Resync Database Schema" in the
    modeler?
    > > > > Perhaps something for the future...
    > > > >
    > > > > Elia
    > > > >
    > > > >
    > > > >
    > > >
    > > >
    > > >
    > >
    > >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Jun 24 2004 - 10:43:33 EDT