X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Ffs-radius-add-reply;h=3de01374fefd2df65bdbcb50588b4fc2b7b13e80;hp=2f38fbcf758cdfaa6da7eed5a13dcab07759d8e3;hb=470c3559d5077d2db4779610bbd798d58eaec27f;hpb=cf7ca698138c8708c68cb969cc843311e385a7a8 diff --git a/bin/fs-radius-add-reply b/bin/fs-radius-add-reply index 2f38fbcf7..3de01374f 100755 --- a/bin/fs-radius-add-reply +++ b/bin/fs-radius-add-reply @@ -39,12 +39,21 @@ my($char_d) = 80; #default maxlength for text fields ### foreach my $attribute ( @attributes ) { + my $statement = "ALTER TABLE svc_acct ADD COLUMN radius_$attribute varchar($char_d) NULL"; my $sth = $dbh->prepare( $statement ) or warn "Error preparing $statement: ". $dbh->errstr; - $sth->execute + my $rc = $sth->execute or warn "Error executing $statement: ". $sth->errstr; + + $statement = + "ALTER TABLE h_svc_acct ADD COLUMN radius_$attribute varchar($char_d) NULL"; + $sth = $dbh->prepare( $statement ) + or warn "Error preparing $statement: ". $dbh->errstr; + $rc = $sth->execute + or warn "Error executing $statement: ". $sth->errstr; + } $dbh->commit or die $dbh->errstr; @@ -54,7 +63,7 @@ $dbh->disconnect or die $dbh->errstr; print "\n\n", "Now you must run dbdef-create.\n\n"; sub usage { - die "Usage:\n fs-radius-add user\n"; + die "Usage:\n fs-radius-add-reply user\n"; }