[freeside-commits] freeside/FS/bin freeside-dbdef-create,NONE,1.1
Ivan,,,
ivan at wavetail.420.am
Fri Aug 10 16:50:06 PDT 2007
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail:/tmp/cvs-serv13597/FS/bin
Added Files:
freeside-dbdef-create
Log Message:
rename dbdef-create to freeside-dbdef-create and move it to FS/bin, so it gets %%%FREESIDE_CONF%%% substituted
--- NEW FILE: freeside-dbdef-create ---
#!/usr/bin/perl -Tw
use strict;
use DBI;
use DBIx::DBSchema 0.26;
use FS::UID qw(adminsuidsetup datasrc driver_name);
use FS::Schema;
my $user = shift or die &usage;
$FS::Schema::setup_hack = 1;
$FS::CurrentUser::upgrade_hack = 1;
my($dbh)=adminsuidsetup $user;
#needs to match FS::Record
my($dbdef_file) = "%%%FREESIDE_CONF%%%/dbdef.". datasrc;
my $dbdef = new_native DBIx::DBSchema $dbh;
#print $dbdef->pretty_print;
#important
$dbdef->save($dbdef_file);
sub usage {
die "Usage:\n dbdef-create user\n";
}
More information about the freeside-commits
mailing list