[Jifty-commit] jifty branch, master, updated. jifty-1.01209-10-gf2b21af
Jifty commits
jifty-commit at lists.jifty.org
Thu Jan 20 12:55:21 EST 2011
The branch, master has been updated
via f2b21af2ba763a7599e469aca14b51752207ea4f (commit)
via bf391de4b60781640d5e1a1bc9c7429696eb75f0 (commit)
from e623c0e32ff779aaa58bf80990013ee992987cb0 (commit)
Summary of changes:
lib/Jifty/Handle.pm | 29 ++++++++++---------
.../ActorMetadata/Mixin/Model/ActorMetadata.pm | 2 +-
2 files changed, 16 insertions(+), 15 deletions(-)
- Log -----------------------------------------------------------------
commit bf391de4b60781640d5e1a1bc9c7429696eb75f0
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jan 20 11:34:06 2011 -0500
Spelling fix in docs
diff --git a/lib/Jifty/Plugin/ActorMetadata/Mixin/Model/ActorMetadata.pm b/lib/Jifty/Plugin/ActorMetadata/Mixin/Model/ActorMetadata.pm
index 5f174c2..7d971ef 100644
--- a/lib/Jifty/Plugin/ActorMetadata/Mixin/Model/ActorMetadata.pm
+++ b/lib/Jifty/Plugin/ActorMetadata/Mixin/Model/ActorMetadata.pm
@@ -17,7 +17,7 @@ Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata - ActorMetadata mixin
package MyApp::Model::CoffeeShop;
use Jifty::DBI::Schema;
use MyApp::Record schema {
- # custom column defrinitions
+ # custom column definitions
};
use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata; # created_by, created_on, updated_on and updated_by
commit f2b21af2ba763a7599e469aca14b51752207ea4f
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jan 20 12:47:53 2011 -0500
Fix jifty schema --setup when AutoUpgrade is off
Jifty::Script::Schema evals and matches on error messages to determine
what to do. Commit e98c8fd577 moved the relevant bits for matching from
die into warn, which meant jifty schema --setup only worked with
AutoUpgrade enabled.
diff --git a/lib/Jifty/Handle.pm b/lib/Jifty/Handle.pm
index 1cfaa88..dc6d740 100644
--- a/lib/Jifty/Handle.pm
+++ b/lib/Jifty/Handle.pm
@@ -142,16 +142,17 @@ sub check_schema_version {
my $dbv = $self->_fetch_dbv;
unless (defined $dbv) {
- warn "Application schema has no version in the database.\n";
+ my $error = "Application schema has no version in the database.\n";
# we can just create it and we'll be up to date
if ( $autoup ) {
+ warn $error;
warn "Automatically creating your database.\n";
$self->_create_original_database();
return 1;
}
- die "Please run `bin/jifty schema --setup` to create the database.\n";
+ die "${error}Please run `bin/jifty schema --setup` to create the database.\n";
}
unless ( version->new($appv) == version->new($dbv) ) {
@@ -162,15 +163,15 @@ sub check_schema_version {
if ( version->new($appv) > version->new($dbv)
|| version->new($compat) < version->new($dbv) )
{
- warn
+ my $error =
"Application schema version in database ($dbv) doesn't match application schema version ($appv)\n";
if ( $autoup ) {
+ warn $error;
warn
"Automatically upgrading your database to match the current application schema.\n";
$self->_upgrade_schema('print' => $opts{pretend});
} else {
- die
- "Please run `bin/jifty schema --setup` to upgrade the database.\n";
+ die "${error}Please run `bin/jifty schema --setup` to upgrade the database.\n";
}
}
}
@@ -187,15 +188,15 @@ sub check_schema_version {
|| '0.60426' );
my $appv = version->new($Jifty::VERSION);
unless ( $appv == $dbv ) {
- warn
+ my $error =
"Internal jifty schema version in database ($dbv) doesn't match running jifty version ($appv)\n";
if ($autoup) {
+ warn $error;
warn
"Automatically upgrading your database to match the current Jifty schema\n";
$self->_upgrade_schema('print' => $opts{pretend});
} else {
- die
- "Please run `bin/jifty schema --setup` to upgrade the database.\n";
+ die "${error}Please run `bin/jifty schema --setup` to upgrade the database.\n";
}
}
}
@@ -209,26 +210,26 @@ sub check_schema_version {
my $appv = version->new( $plugin->version );
if ( not defined $dbv ) {
- warn
+ my $error =
"$plugin_class plugin isn't installed in database\n";
if ($autoup) {
+ warn $error;
warn
"Automatically upgrading your database to match the current plugin schema\n";
$self->_upgrade_schema('print' => $opts{pretend});
} else {
- die
- "Please run `bin/jifty schema --setup` to upgrade the database.\n";
+ die "${error}Please run `bin/jifty schema --setup` to upgrade the database.\n";
}
} elsif (version->new($dbv) < $appv) {
- warn
+ my $error =
"$plugin_class plugin version in database ($dbv) doesn't match running plugin version ($appv)\n";
if ($autoup) {
+ warn $error;
warn
"Automatically upgrading your database to match the current plugin schema\n";
$self->_upgrade_schema('print' => $opts{pretend});
} else {
- die
- "Please run `bin/jifty schema --setup` to upgrade the database.\n";
+ die "${error}Please run `bin/jifty schema --setup` to upgrade the database.\n";
}
}
}
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list