dhosek has asked for the wisdom of the Perl Monks concerning the following question:
I'm leaning towards something along the lines of having a standard migrations directory in the application with numbered migrations in the format
001.create_user_table.m 001.create_data_table.m 002.add_permissions_to_users.m ...
Within a migration you'll have something along the lines of:
Although the specifics are still up in the air. I'd appreciate everyone's feedback on this.sub UP { create_table( name => 'users', key => 'id', fields => { id => 'integer', username => 'string(40)', password => 'string(20)', displayname => 'string(60)', }, ); } sub DOWN { drop_table('users'); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Interface suggestions
by tachyon-II (Chaplain) on Apr 23, 2008 at 03:08 UTC | |
by dhosek (Beadle) on Apr 25, 2008 at 02:23 UTC |