diff options
author | Russ Allbery <rra@stanford.edu> | 2007-12-01 03:00:41 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-12-01 03:00:41 +0000 |
commit | 6bd2cd0824130bd25918e2b709d0991003d5d392 (patch) | |
tree | 700010373d671a4db8f3aae716a8da32507b1c37 /perl/Wallet | |
parent | 920e9456ee167a3edc023caa65d590d38fb90e22 (diff) |
If we're using MySQL, force all the tables to InnoDB so that we get
transactions.
Diffstat (limited to 'perl/Wallet')
-rw-r--r-- | perl/Wallet/Schema.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/perl/Wallet/Schema.pm b/perl/Wallet/Schema.pm index e39cc81..5068d03 100644 --- a/perl/Wallet/Schema.pm +++ b/perl/Wallet/Schema.pm @@ -77,6 +77,8 @@ sub create { if ($driver eq 'SQLite') { $sql =~ s{auto_increment primary key} {primary key autoincrement}; + } elsif ($driver eq 'mysql' and $sql =~ /^\s*create\s+table\s/) { + $sql =~ s/;$/ engine=InnoDB;/; } $dbh->do ($sql, { RaiseError => 1, PrintError => 0 }); } |