projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
self-service keepalives
[freeside.git]
/
bin
/
create-history-tables
diff --git
a/bin/create-history-tables
b/bin/create-history-tables
index
9ed641e
..
c610e70
100755
(executable)
--- 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
#false laziness w/fs-setup
my @tables = scalar(@ARGV)
? @ARGV
- : grep { ! /^
h
_/ } $schema->tables;
+ : grep { ! /^
(h|pg)
_/ } $schema->tables;
foreach my $table ( @tables ) {
foreach my $table ( @tables ) {
+ next if grep { /^h_$table/ } $schema->tables;
warn "creating history table for $table\n";
my $tableobj = $schema->table($table)
warn "creating history table for $table\n";
my $tableobj = $schema->table($table)
- or die "unknown ta
l
ble $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',
my $h_tableobj = DBIx::DBSchema::Table->new( {
name => "h_$table",
primary_key => 'historynum',