[Jifty-commit] jifty-dbi branch, computed-columns, created. 0.60-9-g0978a6b

Jifty commits jifty-commit at lists.jifty.org
Wed May 19 03:32:51 EDT 2010


The branch, computed-columns has been created
        at  0978a6b8f87270bbe928e300ac0acb3b0c5a4701 (commit)

- Log -----------------------------------------------------------------
commit 83fc29d86863e2480dcc74ba44e870218a72c21f
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed May 19 16:27:50 2010 +0900

    Add a "computed" attribute to columns

diff --git a/lib/Jifty/DBI/Column.pm b/lib/Jifty/DBI/Column.pm
index 4f9fd16..d7c7d2d 100644
--- a/lib/Jifty/DBI/Column.pm
+++ b/lib/Jifty/DBI/Column.pm
@@ -16,6 +16,7 @@ my @attrs = qw/
     max_length
     mandatory
     virtual
+    computed
     distinct
     sort_order
     refers_to by

commit 0978a6b8f87270bbe928e300ac0acb3b0c5a4701
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed May 19 16:32:57 2010 +0900

    Do not add computed columns to the schema

diff --git a/lib/Jifty/DBI/SchemaGenerator.pm b/lib/Jifty/DBI/SchemaGenerator.pm
index 86c6669..3b56b4f 100644
--- a/lib/Jifty/DBI/SchemaGenerator.pm
+++ b/lib/Jifty/DBI/SchemaGenerator.pm
@@ -259,6 +259,9 @@ sub _db_schema_table_from_model {
         # Skip "Virtual" columns - (foreign keys to collections)
         next if $column->virtual;
 
+        # Skip computed columns
+        next if $column->computed;
+
         # If schema_version is defined, make sure columns are for that version
         if ($model->can('schema_version') and defined $model->schema_version) {
 

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


More information about the Jifty-commit mailing list