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 | |
parent | b159f42fa3f48cc2ca3b43773e7661e17d2fb072 (diff) |
RADIUS groups on the way!
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/create-history-tables | 11 | ||||
-rwxr-xr-x | bin/fs-setup | 13 |
2 files changed, 20 insertions, 4 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"; } diff --git a/bin/fs-setup b/bin/fs-setup index 7ee04a5d8..01e08f77d 100755 --- a/bin/fs-setup +++ b/bin/fs-setup @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: fs-setup,v 1.83 2002-03-04 12:48:49 ivan Exp $ +# $Id: fs-setup,v 1.84 2002-03-22 18:56:32 ivan Exp $ #to delay loading dbdef until we're ready BEGIN { $FS::Record::setup_hack = 1; } @@ -951,6 +951,17 @@ sub tables_hash_hack { 'index' => [ [ 'exportnum' ], [ 'optionname' ] ], }, + 'radius_usergroup' => { + 'columns' => [ + 'usergroupnum', 'int', '', '', + 'svcnum', 'int', '', '', + 'groupname', 'varchar', '', $char_d, + ], + 'primary_key' => 'usergroupnum', + 'unique' => [], + 'index' => [ [ 'svcnum' ], [ 'groupname' ] ], + }, + ); %tables; |