Permalink
Browse files

Don't die if the settings table already exists

settings was contained in the original database file we had in the repo, so it may already exist.
  • Loading branch information...
1 parent 2319bc6 commit 2fe2f73b7e028cc1af8aac928f54bbf69cc79530 @niner committed Jun 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/CiderWebmail/Model/DB.pm
@@ -33,7 +33,7 @@ after BUILD => sub {
if ($version < 2) {
print STDERR "upgrading database schema to version 2\n";
- $dbh->do('create table settings (user varchar not null primary key, from_address varchar, sent_folder varchar, sort_order varchar)');
+ $dbh->do('create table if not exists settings (user varchar not null primary key, from_address varchar, sent_folder varchar, sort_order varchar)');
$dbh->do('update db_version set version = 2');
}

0 comments on commit 2fe2f73

Please sign in to comment.