#!/usr/bin/perl -Tw
#
-# $Id: fs-setup,v 1.20 2000-01-28 22:53:33 ivan Exp $
+# $Id: fs-setup,v 1.25 2000-06-29 12:00:49 ivan Exp $
#
# ivan@sisd.com 97-nov-8,9
#
# fix radius attributes ivan@sisd.com 98-sep-27
#
# $Log: fs-setup,v $
-# Revision 1.20 2000-01-28 22:53:33 ivan
+# Revision 1.25 2000-06-29 12:00:49 ivan
+# support for pre-encrypted md5 passwords.
+#
+# Revision 1.24 2000/03/02 07:44:07 ivan
+# typo forgot closing '
+#
+# Revision 1.23 2000/02/03 05:16:52 ivan
+# beginning of DNS and Apache support
+#
+# Revision 1.22 2000/01/31 05:22:23 ivan
+# prepaid "internet cards"
+#
+# Revision 1.21 2000/01/30 06:03:26 ivan
+# postgres 6.5 finally supports decimal(10,2)
+#
+# Revision 1.20 2000/01/28 22:53:33 ivan
# track full phone number
#
# Revision 1.19 1999/07/29 08:50:35 ivan
#my(@date_type) = ( 'timestamp', '', '' );
my(@date_type) = ( 'int', 'NULL', '' );
my(@perl_type) = ( 'varchar', 'NULL', 255 );
-my(@money_type);
-if (datasrc =~ m/Pg/) { #Pg can't do decimal(10,2)
- @money_type = ( 'money', '', '' );
-} else {
- @money_type = ( 'decimal', '', '10,2' );
-}
+my @money_type = ( 'decimal', '', '10,2' );
###
# create a dbdef object from the old data structure
#because of svc_acct_pop
#foreach (grep /^svc_/, $dbdef->tables) {
#foreach (qw(svc_acct svc_acct_sm svc_charge svc_domain svc_wo)) {
-foreach (qw(svc_acct svc_acct_sm svc_domain)) {
+foreach (qw(svc_acct svc_acct_sm svc_domain svc_www)) {
my($table)=$dbdef->table($_);
my($col);
foreach $col ( $table->columns ) {
'columns' => [
'svcnum', 'int', '', '',
'username', 'varchar', '', $username_len, #unique (& remove dup code)
- '_password', 'varchar', '', 25, #13 for encryped pw's plus ' *SUSPENDED*
+ '_password', 'varchar', '', 50, #13 for encryped pw's plus ' *SUSPENDED* (mp5 passwords can be 34)
'popnum', 'int', 'NULL', '',
'uid', 'int', 'NULL', '',
'gid', 'int', 'NULL', '',
'index' => [ [] ],
},
+ 'domain_record' => {
+ 'columns' => [
+ 'recnum', 'int', '', '',
+ 'svcnum', 'int', '', '',
+ 'reczone', 'varchar', '', $char_d,
+ 'recaf', 'char', '', 2,
+ 'rectype', 'char', '', 5,
+ 'recdata', 'varchar', '', $char_d,
+ ],
+ 'primary_key' => 'recnum',
+ 'unique' => [ [] ],
+ 'index' => [ ['svcnum'] ],
+ },
+
+ 'svc_www' => {
+ 'columns' => [
+ 'svcnum', 'int', '', '',
+ 'recnum', 'int', '', '',
+ 'usersvc', 'int', '', '',
+ ],
+ 'primary_key' => 'svcnum',
+ 'unique' => [ [] ],
+ 'index' => [ [] ],
+ },
+
#'svc_wo' => {
# 'columns' => [
# 'svcnum', 'int', '', '',
# 'index' => [ [] ],
#},
+ 'prepay_credit' => {
+ 'columns' => [
+ 'prepaynum', 'int', '', '',
+ 'identifier', 'varchar', '', $char_d,
+ 'amount', @money_type,
+ ],
+ 'primary_key' => 'prepaynum',
+ 'unique' => [ ['identifier'] ],
+ 'index' => [ [] ],
+ },
+
);
%tables;