Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Automatically altering tables from different schema's

by Anonymous Monk
on Jan 08, 2004 at 19:43 UTC ( [id://319927]=note: print w/replies, xml ) Need Help??


in reply to Automatically altering tables from different schema's

If and only if they are different, then a method taking a database handle should make the necessary changes to the table in question in a transparent manner.
Do you mean you don't want to make the table defintions idenfical if they are already identical? Why not just assume the table definitions are different. Once you have a perl script that can produce the SQL to recreate the table, safe off the data drop table and recreate it and then reload the data.
  • Comment on Re: Automatically altering tables from different schema's

Replies are listed 'Best First'.
Re: Re: Automatically altering tables from different schema's
by liz (Monsignor) on Jan 08, 2004 at 19:51 UTC
    ...Why not just assume the table definitions are different...

    I would let that be up to the developer: either she uses the current table definition, as retrieved from the database, as the "original", or an "original" definition that was stored somewhere else.

    The latter would allow you to keep hidden fields in a table, invisible from your application. This could be handy if you have two "views" on the same table.

    Liz

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://319927]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-20 07:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found