Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Automatically altering tables from different schema's

by Anonymous Monk
on Jan 08, 2004 at 19:43 UTC ( #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
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
Node Status?
node history
Node Type: note [id://319927]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2014-09-18 05:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (108 votes), past polls