The SQL scripts can do more than add indexes. They can add/remove
columns, etc, too. I wasn't trying to suggest that the DBA doesn't run
the modeler, just that once you get a working schema into production,
using the modeler as a DB admin/maintenance tool isn't really
appropriate. The modeler is a tool to model a database schema, not
maintain a database (at least so far...). The DBA or developer can
update/write the scripts -- whatever makes sense for you.
Yes, you can run the scripts against your production database (usually).
Of course, it makes sense to have a backup first. Also, it makes sense
to run and test them in lower database environments first, too
(development, test, acceptance ...). We have about 7 lower environment
databases/servers here to use for that. We don't go straight to
production without testing changes in a lower environment.
Hope that helps ...
/dev/mrg
-----Original Message-----
From: Eric Lazarus [mailto:ericllazaru..ahoo.com]
Sent: Friday, May 19, 2006 12:31 PM
To: cayenne-use..ncubator.apache.org
Subject: RE: Can I use the CayenneModeler to set up indexes? If so, how?
Thanks so much for your help! Let me see if I get your
drift:
Are you saying that you add your indexes by running
SQL scripts against the live data? Are you suggesting
that setting up indexes is something that DBAs do and
that DBAs should not need to learn the modeler so the
modeler need not support index adding and dropping?
Are you also saying that you do your schema migration
by running a set of scripts against a copy of the
production data in a separate instance then cut over
to that separate instance after inspection and also
after testing show that the application(s) run well
against that upgraded database?
Please be very specific as I'm not fully understanding
your process but it sounds like one that might work
well for our application.
Thanks,
Eric
--- "Gentry, Michael (Contractor)"
<michael_gentr..anniemae.com> wrote:
> The modeler currently doesn't allow you to specify
> arbitrary indexes.
> This could be added to the wish list, but would
> mainly be used while
> developing a schema (not while maintaining an
> in-production schema).
>
> My preferred approach is to have upgrade scripts
> that are checked into
> the SCM repository. You can use filenames like
> schema_001.sql,
> schema_002.sql, etc. Makes it easy to sequence them
> and is highly
> reproducible. It also clearly documents your
> changes. It would be a
> very difficult problem for the modeler to be able to
> automatically
> determine the required changes from one schema to
> another -- and you'd
> have to force the DBAs to run the modeler then, too.
>
> I don't know of a good schema migration tool.
>
> /dev/mrg
>
>
> -----Original Message-----
> From: Eric Lazarus [mailto:ericllazaru..ahoo.com]
> Sent: Friday, May 19, 2006 7:15 AM
> To: cayenne user
> Subject: Can I use the CayenneModeler to set up
> indexes? If so, how?
>
>
> Can I use the CayenneModeler to set up indexes? If
> so,
> how?
>
> Can someone share an example, a screen shot or
> something?
>
> If not, how do others deal with this? Do I write a
> little shell script that does SQL queries to add
> those
> indexes when I re-gen the database?
>
> On a separate note, does anyone know a good schema
> migration tool we can use when we, after we deploy,
> we
> end up with changes to our relational and object
> models and we need to move data forward (and, in an
> emergency perhaps, backward)?
>
> Eric
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
This archive was generated by hypermail 2.0.0 : Fri May 19 2006 - 15:53:59 EDT