on changing packages, don't set setup date unless old package has one
[freeside.git] / FS / FS / Schema.pm
index adc32a2..b7e7545 100644 (file)
@@ -746,24 +746,28 @@ sub tables_hashref {
 
     'cust_pkg' => {
       'columns' => [
-        'pkgnum',    'serial',    '',   '', '', '', 
-        'custnum',   'int',    '',   '', '', '', 
-        'pkgpart',   'int',    '',   '', '', '', 
-        'otaker',    'varchar', '', 32, '', '', 
-        'setup',     @date_type, '', '', 
-        'bill',      @date_type, '', '', 
-        'last_bill', @date_type, '', '', 
-        'susp',      @date_type, '', '', 
-        'adjourn',   @date_type, '', '', 
-        'cancel',    @date_type, '', '', 
-        'expire',    @date_type, '', '', 
-        'manual_flag', 'char', 'NULL', 1, '', '', 
+        'pkgnum',         'serial',    '',   '', '', '', 
+        'custnum',        'int',    '',   '', '', '', 
+        'pkgpart',        'int',    '',   '', '', '', 
+        'otaker',         'varchar', '', 32, '', '', 
+        'setup',          @date_type, '', '', 
+        'bill',           @date_type, '', '', 
+        'last_bill',      @date_type, '', '', 
+        'susp',           @date_type, '', '', 
+        'adjourn',        @date_type, '', '', 
+        'cancel',         @date_type, '', '', 
+        'expire',         @date_type, '', '', 
+        'change_date',    @date_type, '', '',
+        'change_pkgnum',  'int', 'NULL', '', '', '',
+        'change_pkgpart', 'int', 'NULL', '', '', '',
+        'manual_flag',    'char', 'NULL', 1, '', '', 
       ],
       'primary_key' => 'pkgnum',
       'unique' => [],
       'index' => [ ['custnum'], ['pkgpart'],
                    ['setup'], ['last_bill'], ['bill'], ['susp'], ['adjourn'],
-                   ['expire'], ['cancel']
+                   ['expire'], ['cancel'],
+                   ['change_date'],
                  ],
     },