[Jifty-commit] r1570 - jifty/trunk/lib/Jifty/Script

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Jul 14 15:09:11 EDT 2006


Author: nelhage
Date: Fri Jul 14 15:09:11 2006
New Revision: 1570

Modified:
   jifty/trunk/lib/Jifty/Script/Schema.pm

Log:
Don't upgrade the database versions with schema --print. I'm not sure
if there's a good way to persuade JDBI to give us the SQL to print, so
we're just spitting out a warning for now, but that's better than the
old behavior.

Modified: jifty/trunk/lib/Jifty/Script/Schema.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Script/Schema.pm	(original)
+++ jifty/trunk/lib/Jifty/Script/Schema.pm	Fri Jul 14 15:09:11 2006
@@ -267,7 +267,11 @@
     my $appv = version->new( $Jifty::VERSION );
 
     return unless $self->upgrade_tables( "Jifty" => $dbv, $appv, "Jifty::Upgrade::Internal" );
-    Jifty::Model::Metadata->store( jifty_db_version => $appv );
+    if( $self->{print} ) {
+        warn "Need to upgrade jifty_db_version to $appv here!";
+    } else {
+        Jifty::Model::Metadata->store( jifty_db_version => $appv );
+    }
 }
 
 =head2 upgrade_application_tables
@@ -283,7 +287,11 @@
         = version->new( Jifty->config->framework('Database')->{'Version'} );
 
     return unless $self->upgrade_tables( $self->{_application_class} => $dbv, $appv );
-    Jifty::Model::Metadata->store( application_db_version => $appv );
+    if( $self->{print} ) {
+        warn "Need to upgrade application_db_version to $appv here!";
+    } else {
+        Jifty::Model::Metadata->store( application_db_version => $appv );
+    }
 }
 
 =head2 upgrade_tables BASECLASS, FROM, TO, [UPGRADECLASS]


More information about the Jifty-commit mailing list