X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=bin%2Fcreate-history-tables;h=c610e70cf1a2481aeb9e056eda94eaa95c4eda22;hb=915f63061a7532aa4ccba27e8240a3ec00a117f5;hp=9ed641efdcc529dadeaf6094d6bba2b3d8f13479;hpb=20bb426a02c0ea54d8feaea7c5da51735ab70293;p=freeside.git diff --git a/bin/create-history-tables b/bin/create-history-tables index 9ed641efd..c610e70cf 100755 --- a/bin/create-history-tables +++ b/bin/create-history-tables @@ -18,11 +18,12 @@ my $schema = dbdef(); #false laziness w/fs-setup my @tables = scalar(@ARGV) ? @ARGV - : grep { ! /^h_/ } $schema->tables; + : grep { ! /^(h|pg)_/ } $schema->tables; foreach my $table ( @tables ) { + next if grep { /^h_$table/ } $schema->tables; warn "creating history table for $table\n"; my $tableobj = $schema->table($table) - or die "unknown talble $table (did you run dbdef-create?)\n"; + or die "unknown table $table (did you run dbdef-create?)\n"; my $h_tableobj = DBIx::DBSchema::Table->new( { name => "h_$table", primary_key => 'historynum',