[Jifty-commit] r3161 - jifty/trunk/lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Apr 20 01:36:56 EDT 2007
Author: audreyt
Date: Fri Apr 20 01:36:55 2007
New Revision: 3161
Modified:
jifty/trunk/lib/Jifty/Upgrade.pm
Log:
* Jifty::Upgrade - Defensive programming against tables that did
not have "create table" in its schema for SQLite column renaming.
(This really shouldn't happen.)
Modified: jifty/trunk/lib/Jifty/Upgrade.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Upgrade.pm (original)
+++ jifty/trunk/lib/Jifty/Upgrade.pm Fri Apr 20 01:36:55 2007
@@ -94,7 +94,7 @@
# Convert columns
my ($schema) = Jifty->handle->fetch_result("SELECT sql FROM sqlite_master WHERE tbl_name = '$table_name' AND type = 'table'");
- $schema =~ s/(.*create\s+table\s+)\S+(.*?\(\s*)//i;
+ $schema =~ s/(.*create\s+table\s+)\S+(.*?\(\s*)//i or die "Cannot find 'CREATE TABLE' statement in schema for '$table_name': $schema";
my $new_table_name = join( '_', $table_name, 'new', $$ );
my $new_create_clause = "$1$new_table_name$2";
More information about the Jifty-commit
mailing list