add customer signup date
[freeside.git] / FS / FS / Schema.pm
index ef697b9..99f8873 100644 (file)
@@ -319,6 +319,7 @@ sub tables_hashref {
         'weight',      'int', '', '', '', '', 
         'plan',       'varchar', 'NULL', $char_d, '', '', 
         'plandata',   'text', 'NULL', '', '', '', 
+        'reason',     'int', 'NULL', '', '', '', 
         'disabled',     'char', 'NULL', 1, '', '', 
       ],
       'primary_key' => 'eventpart',
@@ -407,6 +408,8 @@ sub tables_hashref {
 #        'middle',   'varchar', 'NULL', $char_d, '', '', 
         'first',    'varchar', '',     $char_d, '', '', 
         'ss',       'varchar', 'NULL', 11, '', '', 
+        'birthdate' ,@date_type, '', '', 
+        'signupdate',@date_type, '', '', 
         'company',  'varchar', 'NULL', $char_d, '', '', 
         'address1', 'varchar', '',     $char_d, '', '', 
         'address2', 'varchar', 'NULL', $char_d, '', '', 
@@ -473,6 +476,19 @@ sub tables_hashref {
       'index' => [ ['custnum'], ],
     },
 
+    'cust_main_note' => {
+      'columns' => [
+        'notenum',  'serial',  '',     '', '', '', 
+        'custnum',  'int',  '',     '', '', '', 
+        '_date',    @date_type, '', '', 
+        'otaker',   'varchar', '',    32, '', '', 
+        'comments', 'text', 'NULL', '', '', '', 
+      ],
+      'primary_key' => 'notenum',
+      'unique' => [],
+      'index' => [ [ 'custnum' ], [ '_date' ], ],
+    },
+
     'cust_main_county' => { #county+state+country are checked off the
                             #cust_main_county for validation and to provide
                             # a tax rate.
@@ -578,6 +594,7 @@ sub tables_hashref {
     'pay_batch' => { #batches of payments to an external processor
       'columns' => [
         'batchnum',   'serial',    '',   '', '', '', 
+       'payby',      'char',      '',    4, '', '', # CARD/CHEK
         'status',     'char', 'NULL',     1, '', '', 
         'download',   @date_type, '', '', 
         'upload',     @date_type, '', '', 
@@ -635,6 +652,19 @@ sub tables_hashref {
       'index' => [ ['custnum'], ['pkgpart'] ],
     },
 
+    'cust_pkg_reason' => {
+      'columns' => [
+        'num',      'serial',    '',   '', '', '', 
+        'pkgnum',   'int',    '',   '', '', '', 
+        'reasonnum','int',    '',   '', '', '', 
+        'otaker',   'varchar', '', 32, '', '', 
+        'date',     @date_type, '', '', 
+      ],
+      'primary_key' => 'num',
+      'unique' => [],
+      'index' => [],
+    },
+
     'cust_refund' => {
       'columns' => [
         'refundnum',    'serial',    '',   '', '', '', 
@@ -1337,17 +1367,6 @@ sub tables_hashref {
       'index'       => [],
     },
 
-    'cancel_reason' => {
-      'columns' => [
-        'reasonnum', 'serial',  '',     '', '', '', 
-        'reason',    'varchar', '',     $char_d, '', '', 
-        'disabled',  'char',    'NULL', 1, '', '', 
-      ],
-      'primary_key' => 'reasonnum',
-      'unique' => [],
-      'index'  => [ [ 'disabled' ] ],
-    },
-
     'pkg_class' => {
       'columns' => [
         'classnum',   'serial',  '', '', '', '', 
@@ -1592,7 +1611,30 @@ sub tables_hashref {
       'index'  => [ [ 'countrycode', 'phonenum' ] ],
     },
 
-  };
+    'reason_type' => {
+      'columns' => [
+        'typenum',   'serial',  '', '', '', '', 
+        'class',     'char', '', 1, '', '', 
+        'type',     'varchar', '', $char_d, '', '', 
+      ],
+      'primary_key' => 'typenum',
+      'unique' => [],
+      'index' => [],
+    },
+
+    'reason' => {
+      'columns' => [
+        'reasonnum',     'serial',  '', '', '', '', 
+        'reason_type',   'int',  '', '', '', '', 
+        'reason',        'varchar', '', $char_d, '', '', 
+        'disabled',      'char',    'NULL', 1, '', '', 
+      ],
+      'primary_key' => 'reasonnum',
+      'unique' => [],
+      'index' => [],
+    },
+
+    # name type nullability length default local
 
     #'new_table' => {
     #  'columns' => [
@@ -1603,6 +1645,8 @@ sub tables_hashref {
     #  'index'  => [],
     #},
 
+  };
+
 }
 
 =back