X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fsbin%2Ffactory;h=78a015950e7732ecec3da9d89b523556592b6bb1;hb=29c296af24c09dc904f6fad51edbf3c5f2f085d3;hp=f72a29675b5d38594c5fb5374f77d44ea7f06709;hpb=8103c1fc1b2c27a6855feadf26f91b980a54bc52;p=freeside.git diff --git a/rt/sbin/factory b/rt/sbin/factory index f72a29675..78a015950 100644 --- a/rt/sbin/factory +++ b/rt/sbin/factory @@ -2,8 +2,8 @@ # BEGIN BPS TAGGED BLOCK {{{ # # COPYRIGHT: -# -# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +# +# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -25,7 +25,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 or visit their web page on the internet at -# http://www.gnu.org/copyleft/gpl.html. +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. # # # CONTRIBUTION SUBMISSION POLICY: @@ -49,6 +49,8 @@ use strict; use DBI; +die "Usage: $0 database namespace" if @ARGV != 2; + my $database = shift; my $namespace = shift; @@ -65,8 +67,8 @@ my $LicenseBlock = << '.'; # BEGIN BPS TAGGED BLOCK {{{ # # COPYRIGHT: -# -# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +# +# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -86,7 +88,9 @@ my $LicenseBlock = << '.'; # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 or visit their web page on the internet at +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. # # # CONTRIBUTION SUBMISSION POLICY: @@ -110,6 +114,7 @@ my $LicenseBlock = << '.'; . my $Attribution = << '.'; + # Autogenerated by DBIx::SearchBuilder factory (by ) # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST. # @@ -124,7 +129,7 @@ my $dsn = "DBI:$driver:database=$database;host=$hostname"; my $dbh = DBI->connect( $dsn, $user, $password ); #get all tables out of database -my @tables = $dbh->tables(); +my @tables = map { s/^\`\Q$database\E\`\.//; $_ } $dbh->tables(); my ( %tablemap, $typemap, %modulemap );