diff options
author | ivan <ivan> | 2002-03-22 18:56:33 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-03-22 18:56:33 +0000 |
commit | 20bb426a02c0ea54d8feaea7c5da51735ab70293 (patch) | |
tree | 28282f7c74f9f13ba831df23b26465d9b7b1b6e2 /bin/create-history-tables | |
parent | b159f42fa3f48cc2ca3b43773e7661e17d2fb072 (diff) |
RADIUS groups on the way!
Diffstat (limited to 'bin/create-history-tables')
-rwxr-xr-x | bin/create-history-tables | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/create-history-tables b/bin/create-history-tables index fb4c866c6..9ed641efd 100755 --- a/bin/create-history-tables +++ b/bin/create-history-tables @@ -16,8 +16,13 @@ my $dbh = adminsuidsetup $user; my $schema = dbdef(); #false laziness w/fs-setup -foreach my $table ( grep { ! /^h_/ } $schema->tables ) { - my $tableobj = $schema->table($table); +my @tables = scalar(@ARGV) + ? @ARGV + : grep { ! /^h_/ } $schema->tables; +foreach my $table ( @tables ) { + warn "creating history table for $table\n"; + my $tableobj = $schema->table($table) + or die "unknown talble $table (did you run dbdef-create?)\n"; my $h_tableobj = DBIx::DBSchema::Table->new( { name => "h_$table", primary_key => 'historynum', @@ -73,6 +78,6 @@ $dbh->commit or die $dbh->errstr; $dbh->disconnect or die $dbh->errstr; sub usage { - die "Usage:\n create-history-tables user\n"; + die "Usage:\n create-history-tables user [ table table ... ] \n"; } |