summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2017-03-18 11:58:09 -0700
committerIvan Kohler <ivan@freeside.biz>2017-03-18 11:58:09 -0700
commit1a2bd8688493c5bf950fd6af5c2835b9753f8c0f (patch)
tree542658417e0543064f79334e89f3ce71285344a8
parent691e990886ec62d387833fa74a860946682fcf26 (diff)
drop h_access_user_log if it exists from a previous beta, RT#75160
-rw-r--r--FS/FS/Upgrade.pm3
-rw-r--r--FS/FS/access_user_log.pm11
2 files changed, 14 insertions, 0 deletions
diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm
index 8f751eef6..da74555a5 100644
--- a/FS/FS/Upgrade.pm
+++ b/FS/FS/Upgrade.pm
@@ -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' => [],
diff --git a/FS/FS/access_user_log.pm b/FS/FS/access_user_log.pm
index 563f3cef0..026670caf 100644
--- a/FS/FS/access_user_log.pm
+++ b/FS/FS/access_user_log.pm
@@ -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