s/icradiusmachine/machine/
[freeside.git] / bin / fs-setup
index aae9c57..3dde038 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: fs-setup,v 1.19 1999-07-29 08:50:35 ivan Exp $
+# $Id: fs-setup,v 1.24 2000-03-02 07:44:07 ivan Exp $
 #
 # ivan@sisd.com 97-nov-8,9
 #
 # fix radius attributes ivan@sisd.com 98-sep-27
 #
 # $Log: fs-setup,v $
-# Revision 1.19  1999-07-29 08:50:35  ivan
+# 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
 # wrong type for cust_pay_batch.exp
 #
 # Revision 1.18  1999/04/15 22:46:30  ivan
@@ -128,12 +143,7 @@ my($char_d) = 80; #default maxlength for text fields
 #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
@@ -180,7 +190,7 @@ my($part_svc)=$dbdef->table('part_svc');
 #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 ) {
@@ -591,7 +601,7 @@ sub tables_hash_hack {
         'state',     'varchar',   '',   $char_d,
         'ac',        'char',   '',   3,
         'exch',      'char',   '',   3,
-        #rest o' number?
+        'loc',       'char',   'NULL',   4, #NULL for legacy purposes
       ],
       'primary_key' => 'popnum',
       'unique' => [ [] ],
@@ -649,6 +659,31 @@ sub tables_hash_hack {
       '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',    '',   '',
@@ -662,6 +697,17 @@ sub tables_hash_hack {
     #  'index' => [ [] ],
     #},
 
+    'prepay_credit' => {
+      'columns' => [
+        'prepaynum',   'int',     '',   '',
+        'identifier',  'varchar', '', $char_d,
+        'amount',      @money_type,
+      ],
+      'primary_key' => 'prepaynum',
+      'unique'      => [ ['identifier'] ],
+      'index'       => [ [] ],
+    },
+
   );
 
   %tables;