As promised (if a bit late… uhh), here’s a patch to unify schema
creation from a single Perl data structure. There’s four attachments
here:
- first, a patch to Makefile and bin/testdeps.pl
- second, the new file bin/initdb, and
- third, the new file etc/schema.pm, and
- lastly, the new file etc/insert.mysql
You’ll also need the DBIx::DataSource and DBIx::DBSchema modules. If they
have not yet propogated to your favourite CPAN mirror, you can get them
at: http://420.am/dbix-datasource and http://420.am/dbix-dbschema
respectively.
The initdb.{mysql,Pg,Oracle} files have become just `initdb’, with the
database type passed as a parameter. The database password is no longer
passed on the the command line and is instead queried from the user.
The schema.{mysql,Pg,Oracle> files have become schema.pm'. The data inserts there were misplaced in there haven't found a new home yet.
insert.mysql’ has the MySQL inserts for now.
MySQL appears to be working. Pg is no worse than before. Oracle
might take some work.
meow
_ivan
schema-patch (1.28 KB)
initdb (1.73 KB)
insert.mysql (9.36 KB)
schema.pm (7.99 KB)