X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fsbin%2Ffactory;h=78a015950e7732ecec3da9d89b523556592b6bb1;hp=6b2d896fa2800ed8700da36a72a9145a40a0fe07;hb=b4b0c7e72d7eaee2fbfc7022022c9698323203dd;hpb=2dfda73eeb3eae2d4f894099754794ef07d060dd diff --git a/rt/sbin/factory b/rt/sbin/factory index 6b2d896fa..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-2009 Best Practical Solutions, LLC +# +# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -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 );