Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: OT: Ways of managing changes to a database's structure during a project.

by rinceWind (Monsignor)
on Feb 04, 2004 at 13:37 UTC ( #326485=note: print w/replies, xml ) Need Help??


in reply to OT: Ways of managing changes to a database's structure during a project.

You might want to take a look at Alzabo. This seems a good fit with what you are trying to do.

--
I'm Not Just Another Perl Hacker

  • Comment on Re: OT: Ways of managing changes to a database's structure during a project.

Replies are listed 'Best First'.
Re: Re: OT: Ways of managing changes to a database's structure during a project.
by autarch (Hermit) on Feb 04, 2004 at 21:08 UTC

    Thanks for the plug ;)

    If you're using Alzabo to manage your schema structure then using it as part of an install/update process is trivial. Here's some sample code from a Module::Build subclass I wrote:

    sub ACTION_update_db { $_[0]->_update_db; } sub _update_db { my $self = shift; $self->depends_on('install'); require Alzabo::Create::Schema; my $schema_svn_dir = File::Spec->catdir ( $self->base_dir, 'alzabo-schema-files', 'NameOfSchema' ); my $to_dir = File::Spec->catdir ( Alzabo::Config::schema_dir(), 'NameOfSchema' ); my $copied; foreach my $file ( glob File::Spec->catfile ( $schema_svn_dir, 'NameOfSchema.*' ) ) { my $file = $self->copy_if_modified( from => $file, to_dir => $to_dir, flatten => 1, ); $copied = $file if defined $file; } return unless $copied; require Alzabo::Create::Schema; my $s = Alzabo::Create::Schema->load_from_file ( name => 'NameOfSchema' ); my %connect = ( user => 'username', password => 'password', ); if ( grep { /NameOfSchema/ } $s->driver->schemas(%connect) ) { # This makes the live schema in the database look # like the schema stored in the Alzabo data files. $s->sync_backend(%connect); } else { $s->set_instantiated(0); $s->create(%connect); } }

    This code can be run as its own action (./Build update_db), and it's also run when the install action is run. It's pretty darn convenient.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://326485]
help
Chatterbox?
[Corion]: ambrus: Well, for mathematical notation, I find blackboard much more convenient than a computer. But when inserting text or moving text around, the computer wins obviously
[ambrus]: But either of these is a big problem in practice, so I'd need to spend like thirty years of my life to solve (a) and five more years to solve (b)
[ambrus]: Corion: yes, CURRENTLY the blackboard is more convenient
[ambrus]: and it's not like I want to ban blackboards anyway
[ambrus]: you already have blackboards and a canvas for projector or overhead transparencies (or positive film slide projector, not used for maths) canvas in the same lecture halls today, and switch in a few minutes between presentations,
[ambrus]: they're only difficult to use together.
[ambrus]: overhead transparencies are a nice convenience by the way that mix the two slides, because you can write them in advance and edit them during the presentation easily. but they're not very much in fasion these days.
[ambrus]: you can even print them.
[Discipulus]: ambrus i'm trying out MremoteNG which wrap putty and rdp and many other things..
[Corion]: ambrus: Yes, ideally you would have the ease of overhead projection transparencies and pens drawing on them, combined with the computer generated slide text...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2017-09-26 10:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (293 votes). Check out past polls.

    Notices?