[Jifty-commit] jifty branch, jifty_client, updated. 4a2e4b9e7d7a5d39b8ede026b81cb7f9c89a76ed

Jifty commits jifty-commit at lists.jifty.org
Wed May 19 04:15:14 EDT 2010


The branch, jifty_client has been updated
       via  4a2e4b9e7d7a5d39b8ede026b81cb7f9c89a76ed (commit)
      from  d6e7088ba7640cab9113b0c0fc83671169e4f329 (commit)

Summary of changes:
 lib/Jifty/Script/Schema.pm |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 4a2e4b9e7d7a5d39b8ede026b81cb7f9c89a76ed
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed May 19 17:15:33 2010 +0900

    Do not add computed columns to the database during schema migration

diff --git a/lib/Jifty/Script/Schema.pm b/lib/Jifty/Script/Schema.pm
index ec59c69..787f423 100755
--- a/lib/Jifty/Script/Schema.pm
+++ b/lib/Jifty/Script/Schema.pm
@@ -601,13 +601,17 @@ sub upgrade_tables {
                     and $col->since > $dbv )
                 {
                     unshift @{ $UPGRADES{ $col->since } }, sub {
+                        # computed columns do not live in the database
+                        return if $col->computed;
+
                         my $renamed = $upgradeclass->just_renamed || {};
 
                         # skip it if this was added by a rename
-                        $model->add_column_in_db( $col->name )
-                            unless
+                        return unless
                             defined $renamed->{ $model->table }->{'add'}
                             ->{ $col->name };
+
+                        $model->add_column_in_db( $col->name );
                     };
                 }
             }

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list