drop h_access_user_log if it exists from a previous beta, RT#75160
authorIvan Kohler <ivan@freeside.biz>
Sat, 18 Mar 2017 18:58:09 +0000 (11:58 -0700)
committerIvan Kohler <ivan@freeside.biz>
Sat, 18 Mar 2017 18:58:09 +0000 (11:58 -0700)
FS/FS/Upgrade.pm
FS/FS/access_user_log.pm

index 8f751ee..da74555 100644 (file)
@@ -561,6 +561,9 @@ sub upgrade_schema_data {
     'cust_bill_pkg_detail' => [],
     #add necessary columns to RT schema
     'TicketSystem' => [],
+    #remove h_access_user_log if it exists (since our regular auto schema
+    # upgrade doesn't have the drop tables flag turned on) 
+    'access_user_log' => [],
     #remove possible dangling records
     'password_history' => [],
     'cust_pay_pending' => [],
index 563f3ce..026670c 100644 (file)
@@ -135,6 +135,17 @@ sub check {
 
 =back
 
+=cut
+
+sub _upgrade_schema {
+  my ($class, %opts) = @_;
+
+  my $sql = 'DROP TABLE IF EXISTS h_access_user_log';
+
+  my $sth = dbh->prepare($sql) or die dbh->errstr;
+  $sth->execute or die $sth->errstr;
+}
+
 =head1 BUGS
 
 =head1 SEE ALSO