diff options
author | Russ Allbery <eagle@eyrie.org> | 2020-05-17 22:17:36 -0700 |
---|---|---|
committer | Russ Allbery <eagle@eyrie.org> | 2020-05-17 22:17:36 -0700 |
commit | 4338488b0410a87b553bfa7ae54b16837b108487 (patch) | |
tree | 19ffae4753e8f216a03244a695e48e910c82a754 /perl/lib/Wallet/Admin.pm | |
parent | 47c722846ece5eb460d91c243e4358eb31e4614b (diff) |
Fix table drop order when destroying the database
Fix the table drop order for wallet-admin destroy to avoid violating
foreign key constraints. Patch from macrotex.
Diffstat (limited to 'perl/lib/Wallet/Admin.pm')
-rw-r--r-- | perl/lib/Wallet/Admin.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/perl/lib/Wallet/Admin.pm b/perl/lib/Wallet/Admin.pm index 630ac81..2b1a2f8 100644 --- a/perl/lib/Wallet/Admin.pm +++ b/perl/lib/Wallet/Admin.pm @@ -1,7 +1,7 @@ # Wallet::Admin -- Wallet system administrative interface # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2016 Russ Allbery <eagle@eyrie.org> +# Copyright 2016, 2020 Russ Allbery <eagle@eyrie.org> # Copyright 2008-2014 # The Board of Trustees of the Leland Stanford Junior University # @@ -165,9 +165,11 @@ sub destroy { # Get an actual DBI handle and use it to delete all tables. my $dbh = $self->dbh; - 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/; + my @tables = qw( + acl_entries duo object_history objects acls acl_history acl_schemes + enctypes flags keytab_enctypes keytab_sync sync_targets types + dbix_class_schema_versions + ); for my $table (@tables) { my $sql = "DROP TABLE IF EXISTS $table"; $dbh->do ($sql); |