aboutsummaryrefslogtreecommitdiff
path: root/perl/lib/Wallet/Admin.pm
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2014-07-15 22:07:48 -0700
committerRuss Allbery <rra@stanford.edu>2014-07-15 22:58:35 -0700
commitee79913831be70fc51c193ea4118a15abb038a67 (patch)
treed228d126605e2a8dd6aa92fca35fca3e6bac24e7 /perl/lib/Wallet/Admin.pm
parent2d1e12169c416b8ba84f38bfd53b3c81cadc9dbc (diff)
Fix ordering of table drops on wallet-admin destroy
Fix the ordering of table drops during a wallet-admin destroy action to remove tables with foreign key references before the tables they are referencing. Should fix destroy in MySQL and other database engines that enforce referential integrity. Change-Id: I9b37c516f67acdf1d9e25222f067df6749e8c769 Reviewed-on: https://gerrit.stanford.edu/1558 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'perl/lib/Wallet/Admin.pm')
-rw-r--r--perl/lib/Wallet/Admin.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl/lib/Wallet/Admin.pm b/perl/lib/Wallet/Admin.pm
index b07c7d1..8481979 100644
--- a/perl/lib/Wallet/Admin.pm
+++ b/perl/lib/Wallet/Admin.pm
@@ -170,9 +170,9 @@ sub destroy {
# Get an actual DBI handle and use it to delete all tables.
my $dbh = $self->dbh;
- my @tables = qw/acls acl_entries acl_history acl_schemes duo enctypes
- flags keytab_enctypes keytab_sync objects object_history
- sync_targets types dbix_class_schema_versions/;
+ my @tables = qw/acl_entries object_history objects acls acl_history
+ acl_schemes enctypes flags keytab_enctypes keytab_sync sync_targets
+ duo types dbix_class_schema_versions/;
for my $table (@tables) {
my $sql = "DROP TABLE IF EXISTS $table";
$dbh->do ($sql);