X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fsbin%2Ffactory;h=78a015950e7732ecec3da9d89b523556592b6bb1;hb=666bacbcbeab98606a59a9a540c8e247f6203331;hp=743d8b90ee37914e3c786d37eeb4ec6e4c025c64;hpb=673b9a458d9138523026963df6fa3b4683e09bae;p=freeside.git diff --git a/rt/sbin/factory b/rt/sbin/factory index 743d8b90e..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-2005 Best Practical Solutions, LLC +# +# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -23,7 +23,9 @@ # # 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: @@ -47,6 +49,8 @@ use strict; use DBI; +die "Usage: $0 database namespace" if @ARGV != 2; + my $database = shift; my $namespace = shift; @@ -63,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) @@ -84,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: @@ -108,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. # @@ -122,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 );