summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS5
-rw-r--r--TODO2
-rw-r--r--perl/lib/Wallet/Admin.pm6
3 files changed, 8 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 4cf12b0..40efd3a 100644
--- a/NEWS
+++ b/NEWS
@@ -59,6 +59,11 @@ wallet 1.1 (unreleased)
would just ignore the time. Now wallet-backend correctly requires the
date and time be passed as a single argument.
+ 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.
+
The initial creation and membership of the ADMIN ACL during database
initialization or reinitialization is no longer recorded in the
acl_history table. (This is fallout from making a specific type of
diff --git a/TODO b/TODO
index da526c6..a8d0aef 100644
--- a/TODO
+++ b/TODO
@@ -143,8 +143,6 @@ Database:
* WALLET-31: On upgrades, support adding new object types and ACL
verifiers to the class tables.
- * WALLET-76: Fix wallet-admin destroy with MySQL.
-
Objects:
* WALLET-32: Check whether we can just drop the realm restriction on
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);