[Jifty-commit] r1985 - in jifty/trunk: lib/Jifty lib/Jifty/Script

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Mon Sep 18 03:19:58 EDT 2006


Author: jesse
Date: Mon Sep 18 03:19:58 2006
New Revision: 1985

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Config.pm
   jifty/trunk/lib/Jifty/Handle.pm
   jifty/trunk/lib/Jifty/Script/Schema.pm

Log:
 r27638 at 77:  jesse | 2006-09-18 09:19:35 +0200
 * Add a CheckSchema option to the config file to govern the SQL Schema keyword checking


Modified: jifty/trunk/lib/Jifty/Config.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Config.pm	(original)
+++ jifty/trunk/lib/Jifty/Config.pm	Mon Sep 18 03:19:58 2006
@@ -75,7 +75,7 @@
 After loading the vendor configuration file (if it exists), the
 framework will look for a site configuration file, specified in either
 the framework's C<SiteConfig> or the C<JIFTY_SITE_CONFIG> environment
-variable.
+variable. (Usually in C<etc/site_config.yml>.)
 
 After loading the site configuration file (if it exists), the
 framework will look for a test configuration file, specified in either
@@ -248,7 +248,8 @@
                 Password => "",
                 User     => "",
                 Version  => "0.0.1",
-                RecordBaseClass => 'Jifty::DBI::Record::Cachable'
+                RecordBaseClass => 'Jifty::DBI::Record::Cachable',
+                CheckSchema => '1'
             },
             Mailer     => 'Sendmail',
             MailerArgs => [],

Modified: jifty/trunk/lib/Jifty/Handle.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Handle.pm	(original)
+++ jifty/trunk/lib/Jifty/Handle.pm	Mon Sep 18 03:19:58 2006
@@ -86,7 +86,7 @@
 
     my %lc_db_config;
     # Skip the non-dsn keys, but not anything else
-    for (grep {!/^version|recordbaseclass$/i} keys %db_config) {
+    for (grep {!/^checkschema|version|recordbaseclass$/i} keys %db_config) {
         $lc_db_config{lc($_)} = $db_config{$_};
     }
     $self->SUPER::connect( %lc_db_config , %args);

Modified: jifty/trunk/lib/Jifty/Script/Schema.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Script/Schema.pm	(original)
+++ jifty/trunk/lib/Jifty/Script/Schema.pm	Mon Sep 18 03:19:58 2006
@@ -232,7 +232,8 @@
         $log->info("Using $model");
         my $ret = $self->{'_schema_generator'}->add_model( $model->new );
         $ret or die "couldn't add model $model: " . $ret->error_message;
-        unless ($self->{'ignore_reserved'}) {
+        unless ($self->{'ignore_reserved'} or
+         !Jifty->config->framework('Database')->{'CheckSchema'} ) {
                 $self->_check_reserved($model);
         }
 


More information about the Jifty-commit mailing list