[Jifty-commit] jifty branch, autoversioning, created. 8437b251c864e7cb2e1b67dd23d05bd3480d8945

Jifty commits jifty-commit at lists.jifty.org
Thu Dec 10 14:09:39 EST 2009


The branch, autoversioning has been created
        at  8437b251c864e7cb2e1b67dd23d05bd3480d8945 (commit)

- Log -----------------------------------------------------------------
commit 224c47eab451c7cf5d8422c9162a5cb461fd5076
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Thu May 24 06:06:36 2007 +0000

    (empty commit message)
    
    git-svn-id: svn+ssh://svn.bestpractical.com/svn/jifty.org/jifty/branches/autoversioning@3297 e84bef0a-9b06-0410-84ba-c4c9edb13aeb

commit 23ace013fb54a8bd5cffccc614ac6abc6921e6e8
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Thu May 24 06:10:27 2007 +0000

    A first sketch of autoversioning functionality.
    
    git-svn-id: svn+ssh://svn.bestpractical.com/svn/jifty.org/jifty/branches/autoversioning@3298 e84bef0a-9b06-0410-84ba-c4c9edb13aeb

diff --git a/lib/Jifty/Schema.pm b/lib/Jifty/Schema.pm
index b567b9c..a4aa9aa 100644
--- a/lib/Jifty/Schema.pm
+++ b/lib/Jifty/Schema.pm
@@ -62,30 +62,57 @@ sub _init_model_list {
 sub serialize_current_schema {
     my $self = shift;    
    
-    my @models = $self->model_classes;
+    my @models = grep {$_->isa('Jifty::Record') && $_->table }  $self->models;
     my $serialized_models = {};
     foreach my $model (@models) {
-        $serialized_models->{$model->_class_name} = $model->serialize_metadata;
+        $serialized_models->{$model} = $model->serialize_metadata;
     }
-
     return $serialized_models;
 
 }
 
 
+sub _store_current_schema {
+    my $self = shift;
+     Jifty::Model::Metadata->store( current_schema      => Jifty::YAML::Dump($self->serialize_current_schema ));
+}
+
+sub _load_stored_schema {
+    my $self = shift;
+     my $schema =  Jifty::YAML::Load(Jifty::Model::Metadata->load( 'current_schema'));
+    return $schema;
+}
 
 
-sub upgrade_schema {
+
+sub autoupgrade_schema {
     my $self = shift;
 
+    my ( $add_tables, $add_columns, $remove_tables, $remove_columns )
+        = $self->compute_schema_diffs( $self->_load_stored_schema, $self->serialize_current_schema);
 
-    # load the database schema version
 
-    # hashref
-    my $old_tables = $self->current_db_schema;
+    # Run all "Rename" rules
+    $self->run_upgrade_rules('before_all_renames');
+    my $table_renames  = Jifty->upgrade->table_renames;
+    my $column_renames = Jifty->upgrade->column_renames;
+    $self->run_upgrade_rules('after_column_renames');
+
+    $self->_add_tables($add_tables);
+    $self->_add_columns($add_columns);
+    $self->_drop_tables($remove_tables);
+    $self->_drop_columns($remove_columns);
+
+}
+
+sub compute_schema_diffs{
+    my $self = shift;
+
+    # load the database schema version
+    my $old_tables = shift;
 
     # hashref
-    my $new_tables = $self->new_db_schema;
+    my $new_tables = shift;
 
     my $add_tables = {};
     my $remove_tables ={};
@@ -99,10 +126,12 @@ sub upgrade_schema {
             next;
         }
 
-        foreach my $column ( @{ $old_tables->{$table}->columns } ) {
+        foreach my $column_name ( keys %{ $old_tables->{$table}->{columns} } ) {
+                my $column = $old_tables->{$table}->{columns}->{$column_name};
+
 
      # if the column isn't in the new table as well, then mark it for deletion
-            unless ( $new_tables->{$table}->column($column) ) {
+            unless ( $new_tables->{$table}->{columns}->{$column_name} ) {
                 push @{ $remove_columns->{$table} }, $column;
             }
 
@@ -117,32 +146,21 @@ sub upgrade_schema {
             next;
         }
 
-        foreach my $column ( @{ $new_tables->{$table}->columns } ) {
+        foreach my $column_name ( keys %{$new_tables->{$table}->{columns}} ) {
+            my $column = $new_tables->{$table}->{columns}->{$column_name};
 
-     # if the column isn't in the old table as well, then mark it for addition
-            unless ( $old_tables->{$table}->column($column) ) {
+             # if the column isn't in the old table as well, then mark it for addition
+            unless ( $old_tables->{$table}->{columns}->{$column_name} ) {
                 push @{ $add_columns->{$table} }, $column;
             }
 
-        # XXX TODO: compare the column definitions and alter them if necessary
+            # XXX TODO: compare the column definitions and alter them if necessary
 
         }
     }
 
-    # Run all "Rename" rules
-    $self->run_upgrade_rules('before_all_renames');
-    my $table_renames  = Jifty->upgrade->table_renames;
-    my $column_renames = Jifty->upgrade->column_renames;
-    $self->run_upgrade_rules('after_column_renames');
-
-    $self->_add_tables($add_tables);
-    $self->_add_columns($add_columns);
-    $self->_drop_tables($remove_tables);
-    $self->_drop_columns($remove_columns);
-
-
-}
-
+    return ($add_tables, $add_columns, $remove_tables, $remove_columns );
+} 
 
 sub _add_tables {
     my $self = shift;
diff --git a/t/TestApp-Autoversioning/lib/TestApp/Autoversioning/Upgrade.pm b/t/TestApp-Autoversioning/lib/TestApp/Autoversioning/Upgrade.pm
new file mode 100644
index 0000000..eb3c351
--- /dev/null
+++ b/t/TestApp-Autoversioning/lib/TestApp/Autoversioning/Upgrade.pm
@@ -0,0 +1,11 @@
+package TestApp::Autoversioning::Upgrade;
+
+use base 'Jifty::Upgrade';
+
+
+rename model 'User' vo 'Participant';
+
+
+
+1;
+
diff --git a/t/TestApp-Autoversioning/t/50-insanity.t b/t/TestApp-Autoversioning/t/50-insanity.t
new file mode 100644
index 0000000..f9e4e1a
--- /dev/null
+++ b/t/TestApp-Autoversioning/t/50-insanity.t
@@ -0,0 +1,54 @@
+=head1 DESCRIPTION
+
+
+State 1:
+
+    
+    User
+        Name, Rank, FileNo
+
+    Group
+        Name
+
+
+
+State 2:
+
+
+
+    User
+        Name, Department
+
+    News
+        Summary, Body
+
+    Participant
+        Name, Rank, SerialNo
+        
+
+
+
+Upgrade rules:
+
+    Rename User to Participants
+    Rename Participants.FileNo to Participants.SerialNo
+
+
+    Create table 
+
+    Remove table Group
+
+
+
+
+
+
+    Upgrade:
+
+        Remove Group
+        Add User
+        Add News
+        Rename Users to Participants
+        Rename Participants FileNo to SerialNo 
+
+
diff --git a/t/TestApp/t/16-autoversioning.t b/t/TestApp/t/16-autoversioning.t
new file mode 100644
index 0000000..da1fdfa
--- /dev/null
+++ b/t/TestApp/t/16-autoversioning.t
@@ -0,0 +1,62 @@
+#!/usr/bin/env perl
+
+use warnings;
+use strict;
+
+=head1 DESCRIPTION
+
+This is a template for your own tests. Copy it and modify it.
+
+=cut
+
+use lib 't/lib';
+use Jifty::SubTest;
+
+use Jifty::Test tests => 1;
+
+ok(1, "Loaded the test script");
+
+Jifty->new;
+my $schema = Jifty::Schema->new();
+isa_ok($schema, 'Jifty::Schema');
+can_ok($schema, 'models');
+can_ok($schema, 'serialize_current_schema');
+
+my $serialized = $schema->serialize_current_schema;
+ok($schema->_store_current_schema);;
+my $stored = $schema->_load_stored_schema();
+is_deeply($stored,$serialized);
+{
+    my ( $add_tables, $add_columns, $remove_tables, $remove_columns )
+            = $schema->compute_schema_diffs( $stored, $serialized);
+
+is_deeply($add_tables, {});
+is_deeply($add_columns, {});
+is_deeply($remove_tables, {});
+is_deeply($remove_columns, {});
+}
+
+
+# remove a column, make sure it is picked up
+delete $serialized->{'TestApp::Model::User'}->{columns}->{tasty};
+{
+    my ( $add_tables, $add_columns, $remove_tables, $remove_columns )
+            = $schema->compute_schema_diffs( $stored, $serialized);
+
+is_deeply($add_tables, {});
+is_deeply($add_columns, {});
+is_deeply($remove_tables, {});
+is_deeply([keys %$remove_columns], ['TestApp::Model::User' ]);
+is_deeply($remove_columns->{'TestApp::Model::User'}[0]->{'name'}, 'tasty');
+}
+
+
+
+
+# remove a table, make sure it is picked up
+# add a column, make sure it is picked up
+# add a table, make sure it is picked up
+
+
+1;
+

commit a388126d373975fc24afd84b9db7d292d40bc609
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Thu May 24 06:26:42 2007 +0000

    * testing table and column add and del
    
    git-svn-id: svn+ssh://svn.bestpractical.com/svn/jifty.org/jifty/branches/autoversioning@3299 e84bef0a-9b06-0410-84ba-c4c9edb13aeb

diff --git a/t/TestApp/t/16-autoversioning.t b/t/TestApp/t/16-autoversioning.t
index da1fdfa..7124f65 100644
--- a/t/TestApp/t/16-autoversioning.t
+++ b/t/TestApp/t/16-autoversioning.t
@@ -5,14 +5,15 @@ use strict;
 
 =head1 DESCRIPTION
 
-This is a template for your own tests. Copy it and modify it.
+Right now, this test script only tests that our schema diffing tool picks up the right things.
+Next we'll want to try to apply the changes
 
 =cut
 
 use lib 't/lib';
 use Jifty::SubTest;
 
-use Jifty::Test tests => 1;
+use Jifty::Test tests => 28;
 
 ok(1, "Loaded the test script");
 
@@ -38,8 +39,9 @@ is_deeply($remove_columns, {});
 
 
 # remove a column, make sure it is picked up
-delete $serialized->{'TestApp::Model::User'}->{columns}->{tasty};
 {
+ $serialized = $schema->serialize_current_schema;
+delete $serialized->{'TestApp::Model::User'}->{columns}->{tasty};
     my ( $add_tables, $add_columns, $remove_tables, $remove_columns )
             = $schema->compute_schema_diffs( $stored, $serialized);
 
@@ -51,12 +53,56 @@ is_deeply($remove_columns->{'TestApp::Model::User'}[0]->{'name'}, 'tasty');
 }
 
 
+# remove a table, make sure it is picked up
+{
+
+ $serialized = $schema->serialize_current_schema;
+delete $serialized->{'TestApp::Model::User'};
+    my ( $add_tables, $add_columns, $remove_tables, $remove_columns )
+            = $schema->compute_schema_diffs( $stored, $serialized);
+
+is_deeply($add_tables, {});
+is_deeply([keys %$remove_tables], ['TestApp::Model::User']);
+is_deeply($remove_columns, {});
+is_deeply($add_columns,{});
+}
 
 
-# remove a table, make sure it is picked up
 # add a column, make sure it is picked up
+{
+ $serialized = $schema->serialize_current_schema;
+
+$serialized->{'TestApp::Model::User'}->{columns}->{speedy} = $serialized->{'TestApp::Model::User'}->{columns}->{tasty};
+$serialized->{'TestApp::Model::User'}->{columns}->{speedy}->{name} = 'speedy';
+    my ( $add_tables, $add_columns, $remove_tables, $remove_columns )
+            = $schema->compute_schema_diffs( $stored, $serialized);
+
+is_deeply($add_tables, {});
+is_deeply($remove_tables, {});
+is_deeply($remove_columns, {});
+is_deeply([keys %$add_columns], ['TestApp::Model::User' ]);
+is_deeply($add_columns->{'TestApp::Model::User'}[0]->{'name'}, 'speedy');
+}
+
+
+
+
 # add a table, make sure it is picked up
 
+{
+ $serialized = $schema->serialize_current_schema;
+$serialized->{'TestApp::Model::Foobar'} = $serialized->{'TestApp::Model::User'};
+$serialized->{'TestApp::Model::Foobar'}->{'class'} = "TestApp::Model::Foobar";
+$serialized->{'TestApp::Model::Foobar'}->{'table'} = "foobar";
+
+    my ( $add_tables, $add_columns, $remove_tables, $remove_columns )
+            = $schema->compute_schema_diffs( $stored, $serialized);
+
+is_deeply($remove_tables, {});
+is_deeply([keys %$add_tables], ['TestApp::Model::Foobar']);
+is_deeply($remove_columns, {});
+is_deeply($add_columns,{});
+}
 
 1;
 

commit d1f69d8b5017e37ca7bd070ff82ee20d0171ac56
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Jul 23 01:12:05 2007 +0000

     * First pass at actually computing column type changes for two versions of a schema
    
    git-svn-id: svn+ssh://svn.bestpractical.com/svn/jifty.org/jifty/branches/autoversioning@3710 e84bef0a-9b06-0410-84ba-c4c9edb13aeb

diff --git a/lib/Jifty/Schema.pm b/lib/Jifty/Schema.pm
index a4aa9aa..fa0f80d 100644
--- a/lib/Jifty/Schema.pm
+++ b/lib/Jifty/Schema.pm
@@ -113,54 +113,82 @@ sub compute_schema_diffs{
 
     # hashref
     my $new_tables = shift;
+    my ($remove_tables,$remove_columns) = $self->_columns_and_tables_removed_between($old_tables => $new_tables);
+    my ($add_tables,$add_columns) = $self->_columns_and_tables_removed_between($new_tables => $old_tables);
+    my $column_deltas = $self->_column_changes_between($old_tables => $new_tables);
 
-    my $add_tables = {};
-    my $remove_tables ={};
-    my $add_columns = {};
-    my $remove_columns = {};
+    return ($add_tables, $add_columns, $remove_tables, $remove_columns, $column_deltas );
+} 
+
+
+sub _column_changes_between {
+    my $self        = shift;
+    my $from_tables = shift;
+    my $to_tables   = shift;
+    
+    my $col_changes;
 
     # diff the current schema version and the database schema version
-    foreach my $table ( keys %$old_tables ) {
-        unless ( $new_tables->{$table} ) {
-            $remove_tables->{$table} = $old_tables->{$table};
-            next;
-        }
+    foreach my $table ( keys %$from_tables ) {
 
-        foreach my $column_name ( keys %{ $old_tables->{$table}->{columns} } ) {
-                my $column = $old_tables->{$table}->{columns}->{$column_name};
+        # Skip tables which aren't in both versions
+        next unless ( $to_tables->{$table} );
 
+        foreach my $column_name ( keys %{ $from_tables->{$table}->{columns} } ) {
+            # if the column isn't in the to table as well, then skip it
+            next unless ( $to_tables->{$table}->{columns}->{$column_name} );
+
+            my $new_col = $to_tables->{$table}->{columns}->{$column_name};
+            my $old_col = $from_tables->{$table}->{columns}->{$column_name};
 
-     # if the column isn't in the new table as well, then mark it for deletion
-            unless ( $new_tables->{$table}->{columns}->{$column_name} ) {
-                push @{ $remove_columns->{$table} }, $column;
-            }
 
-        # XXX TODO: compare the column definitions and alter them if necessary
+            # If the storage type has changed, record that
+            if ($new_col->{type} ne $old_col->{type}) {
+                push @{$col_changes->{type}}, { table => $table, old_type => $old_col->{type}, new_type => $new_col->{type}};
+            }
+            # If the default has changed record that 
+            { no warnings 'uninitialized'; # undefined for defaults is actually different than the empty string. And we _care_ about the undef.
+            if ($new_col->{default} ne $old_col->{default}) {
+                push @{$col_changes->{default}}, { table => $table, old_default => $old_col->{default}, new_default => $new_col->{default}};
+            }
+        }
 
         }
     }
+    return ( $col_changes);
+}
+
+
+sub  _columns_and_tables_removed_between {
+    my $self = shift;
+    my $from_tables = shift;
+    my $to_tables = shift;
+
+    
+    my $missing_tables = {};
+    my $missing_columns = {};
 
-    foreach my $table ( keys %$new_tables ) {
-        unless ( $old_tables->{$table} ) {
-            $add_tables->{$table} = $new_tables->{$table};
+    # diff the current schema version and the database schema version
+    foreach my $table ( keys %$from_tables ) {
+        unless ( $to_tables->{$table} ) {
+            $missing_tables->{$table} = $from_tables->{$table};
             next;
         }
 
-        foreach my $column_name ( keys %{$new_tables->{$table}->{columns}} ) {
-            my $column = $new_tables->{$table}->{columns}->{$column_name};
+        foreach my $column_name ( keys %{ $from_tables->{$table}->{columns} } ) {
+                my $column = $from_tables->{$table}->{columns}->{$column_name};
 
-             # if the column isn't in the old table as well, then mark it for addition
-            unless ( $old_tables->{$table}->{columns}->{$column_name} ) {
-                push @{ $add_columns->{$table} }, $column;
-            }
 
-            # XXX TODO: compare the column definitions and alter them if necessary
+     # if the column isn't in the to table as well, then mark it for deletion
+            unless ( $to_tables->{$table}->{columns}->{$column_name} ) {
+                push @{ $missing_columns->{$table} }, $column;
+            }
 
         }
     }
 
-    return ($add_tables, $add_columns, $remove_tables, $remove_columns );
-} 
+    return ( $missing_tables, $missing_columns);
+}
 
 sub _add_tables {
     my $self = shift;

commit 3c493c8dea0b029f0d369924deb25348792e126c
Merge: d1f69d8 950aa2b
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Jul 23 01:13:55 2007 +0000

    (empty commit message)
    
    git-svn-id: svn+ssh://svn.bestpractical.com/svn/jifty.org/jifty/branches/autoversioning@3711 e84bef0a-9b06-0410-84ba-c4c9edb13aeb

diff --cc lib/Jifty/Schema.pm
index fa0f80d,9b7fe1f..a30e1f2
--- a/lib/Jifty/Schema.pm
+++ b/lib/Jifty/Schema.pm
@@@ -72,123 -84,80 +83,130 @@@ sub serialize_current_schema 
  }
  
  
 -=head2 upgrade_schema
 +sub _store_current_schema {
 +    my $self = shift;
 +     Jifty::Model::Metadata->store( current_schema      => Jifty::YAML::Dump($self->serialize_current_schema ));
- }
++
++
 +
 +sub _load_stored_schema {
 +    my $self = shift;
 +     my $schema =  Jifty::YAML::Load(Jifty::Model::Metadata->load( 'current_schema'));
 +    return $schema;
 +}
 +
 +
 +
++=head2 autoupgrade_schema
+ 
+ Looks at the current schemas as defined by the source and the database and updates the database by adding, dropping, and renaming columns.
+ 
+ =cut
+ 
 -sub upgrade_schema {
 +sub autoupgrade_schema {
      my $self = shift;
  
 +    my ( $add_tables, $add_columns, $remove_tables, $remove_columns )
 +        = $self->compute_schema_diffs( $self->_load_stored_schema, $self->serialize_current_schema);
 +
 +
 +    # Run all "Rename" rules
 +    $self->run_upgrade_rules('before_all_renames');
 +    my $table_renames  = Jifty->upgrade->table_renames;
 +    my $column_renames = Jifty->upgrade->column_renames;
 +    $self->run_upgrade_rules('after_column_renames');
 +
 +    $self->_add_tables($add_tables);
 +    $self->_add_columns($add_columns);
 +    $self->_drop_tables($remove_tables);
 +    $self->_drop_columns($remove_columns);
 +
 +}
 +
 +sub compute_schema_diffs{
 +    my $self = shift;
  
      # load the database schema version
 +    my $old_tables = shift;
  
      # hashref
 -    my $old_tables = $self->current_db_schema;
 +    my $new_tables = shift;
 +    my ($remove_tables,$remove_columns) = $self->_columns_and_tables_removed_between($old_tables => $new_tables);
 +    my ($add_tables,$add_columns) = $self->_columns_and_tables_removed_between($new_tables => $old_tables);
 +    my $column_deltas = $self->_column_changes_between($old_tables => $new_tables);
 +
 +    return ($add_tables, $add_columns, $remove_tables, $remove_columns, $column_deltas );
 +} 
  
 -    # hashref
 -    my $new_tables = $self->new_db_schema;
  
 -    my $add_tables = {};
 -    my $remove_tables ={};
 -    my $add_columns = {};
 -    my $remove_columns = {};
 +sub _column_changes_between {
 +    my $self        = shift;
 +    my $from_tables = shift;
 +    my $to_tables   = shift;
 +    
 +    my $col_changes;
  
      # diff the current schema version and the database schema version
 -    foreach my $table ( keys %$old_tables ) {
 -        unless ( $new_tables->{$table} ) {
 -            $remove_tables->{$table} = $old_tables->{$table};
 -            next;
 -        }
 +    foreach my $table ( keys %$from_tables ) {
  
 -        foreach my $column ( @{ $old_tables->{$table}->columns } ) {
 +        # Skip tables which aren't in both versions
 +        next unless ( $to_tables->{$table} );
  
 -     # if the column isn't in the new table as well, then mark it for deletion
 -            unless ( $new_tables->{$table}->column($column) ) {
 -                push @{ $remove_columns->{$table} }, $column;
 -            }
 +        foreach my $column_name ( keys %{ $from_tables->{$table}->{columns} } ) {
 +            # if the column isn't in the to table as well, then skip it
 +            next unless ( $to_tables->{$table}->{columns}->{$column_name} );
  
 -        # XXX TODO: compare the column definitions and alter them if necessary
 +            my $new_col = $to_tables->{$table}->{columns}->{$column_name};
 +            my $old_col = $from_tables->{$table}->{columns}->{$column_name};
  
 +
 +            # If the storage type has changed, record that
 +            if ($new_col->{type} ne $old_col->{type}) {
 +                push @{$col_changes->{type}}, { table => $table, old_type => $old_col->{type}, new_type => $new_col->{type}};
 +            }
 +            # If the default has changed record that 
 +            { no warnings 'uninitialized'; # undefined for defaults is actually different than the empty string. And we _care_ about the undef.
 +            if ($new_col->{default} ne $old_col->{default}) {
 +                push @{$col_changes->{default}}, { table => $table, old_default => $old_col->{default}, new_default => $new_col->{default}};
 +            }
          }
 -    }
  
 -    foreach my $table ( keys %$new_tables ) {
 -        unless ( $old_tables->{$table} ) {
 -            $add_tables->{$table} = $new_tables->{$table};
 -            next;
          }
 +    }
 +    return ( $col_changes);
 +}
  
 -        foreach my $column ( @{ $new_tables->{$table}->columns } ) {
  
 -     # if the column isn't in the old table as well, then mark it for addition
 -            unless ( $old_tables->{$table}->column($column) ) {
 -                push @{ $add_columns->{$table} }, $column;
 -            }
 +sub  _columns_and_tables_removed_between {
 +    my $self = shift;
 +    my $from_tables = shift;
 +    my $to_tables = shift;
  
 -        # XXX TODO: compare the column definitions and alter them if necessary
 +    
 +    my $missing_tables = {};
 +    my $missing_columns = {};
  
 +    # diff the current schema version and the database schema version
 +    foreach my $table ( keys %$from_tables ) {
 +        unless ( $to_tables->{$table} ) {
 +            $missing_tables->{$table} = $from_tables->{$table};
 +            next;
          }
 -    }
  
 -    # Run all "Rename" rules
 -    $self->run_upgrade_rules('before_all_renames');
 -    my $table_renames  = Jifty->upgrade->table_renames;
 -    my $column_renames = Jifty->upgrade->column_renames;
 -    $self->run_upgrade_rules('after_column_renames');
 +        foreach my $column_name ( keys %{ $from_tables->{$table}->{columns} } ) {
 +                my $column = $from_tables->{$table}->{columns}->{$column_name};
  
 -    $self->_add_tables($add_tables);
 -    $self->_add_columns($add_columns);
 -    $self->_drop_tables($remove_tables);
 -    $self->_drop_columns($remove_columns);
  
 +     # if the column isn't in the to table as well, then mark it for deletion
 +            unless ( $to_tables->{$table}->{columns}->{$column_name} ) {
 +                push @{ $missing_columns->{$table} }, $column;
 +            }
  
 -}
 +        }
 +    }
  
 +    return ( $missing_tables, $missing_columns);
 +}
  
  sub _add_tables {
      my $self = shift;

commit 65f257cba95d939eb2f9cf3cc178a32048d99b92
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Jul 23 01:16:05 2007 +0000

    * Refactored out setup_plugins into its own method
    
    git-svn-id: svn+ssh://svn.bestpractical.com/svn/jifty.org/jifty/branches/autoversioning@3712 e84bef0a-9b06-0410-84ba-c4c9edb13aeb

diff --git a/lib/Jifty.pm b/lib/Jifty.pm
index 2ff09b1..8233f3c 100644
--- a/lib/Jifty.pm
+++ b/lib/Jifty.pm
@@ -164,33 +164,8 @@ sub new {
 
     Jifty->logger( Jifty::Logger->new( $args{'logger_component'} ) );
 
-    # Set up plugins
-    my @plugins;
-    my @plugins_to_load = @{Jifty->config->framework('Plugins')};
-    my $app_plugin = Jifty->app_class('Plugin');
-    for (my $i = 0; my $plugin = $plugins_to_load[$i]; $i++) {
-        my $plugin_name = (keys %{$plugin})[0];
-        my $class;
-        if ($plugin_name =~ /^(?:Jifty::Plugin|$app_plugin)::/) {
-            # app-specific plugins use fully qualified names, Jifty plugins may
-            $class = $plugin_name; 
-        }
-        # otherwise, assume it's a short name, qualify it
-        else {
-            $class = "Jifty::Plugin::".$plugin_name;
-        }
-        my %options = %{ $plugin->{ $plugin_name } };
-        Jifty::Util->require($class);
-        Jifty::ClassLoader->new(base => $class)->require;
-        my $plugin_obj = $class->new(%options);
-        push @plugins, $plugin_obj;
-        foreach my $name ($plugin_obj->prereq_plugins) {
-            next if grep { $_ eq $name } @plugins_to_load;
-            push @plugins_to_load, {$name => {}};
-        }
-    }
 
-    Jifty->plugins(@plugins);
+    Jifty->setup_plugins();
 
     # Now that we have the config set up and loaded plugins,
     # load the localization files.
@@ -371,6 +346,41 @@ sub bus {
     return $PUB_SUB;
 }
 
+=head2 setup_plugins
+
+Loads and initializes the application's plugins.
+
+=cut
+
+sub setup_plugins {
+    # Set up plugins
+    my @plugins;
+    my @plugins_to_load = @{Jifty->config->framework('Plugins')};
+    my $app_plugin = Jifty->app_class('Plugin');
+    for (my $i = 0; my $plugin = $plugins_to_load[$i]; $i++) {
+        my $plugin_name = (keys %{$plugin})[0];
+        my $class;
+        if ($plugin_name =~ /^(?:Jifty::Plugin|$app_plugin)::/) {
+            # app-specific plugins use fully qualified names, Jifty plugins may
+            $class = $plugin_name; 
+        }
+        # otherwise, assume it's a short name, qualify it
+        else {
+            $class = "Jifty::Plugin::".$plugin_name;
+        }
+        my %options = %{ $plugin->{ $plugin_name } };
+        Jifty::Util->require($class);
+        Jifty::ClassLoader->new(base => $class)->require;
+        my $plugin_obj = $class->new(%options);
+        push @plugins, $plugin_obj;
+        foreach my $name ($plugin_obj->prereq_plugins) {
+            next if grep { $_ eq $name } @plugins_to_load;
+            push @plugins_to_load, {$name => {}};
+        }
+    }
+
+    Jifty->plugins(@plugins);
+}
 =head2 plugins
 
 Returns a list of L<Jifty::Plugin> objects for this Jifty application.

commit 358ddc5a5ccbc5fb991933dc5d5fb2a0c631207b
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Jul 23 01:17:11 2007 +0000

    * Wired up adding tables, removing tables, adding columns, removing columns on run.
    * Record metadata about the current schema when we run.
    * We're not yet handling changed columns
    * I bet we want to unwire the removes and add a special jifty schema --flag for it
    
    git-svn-id: svn+ssh://svn.bestpractical.com/svn/jifty.org/jifty/branches/autoversioning@3713 e84bef0a-9b06-0410-84ba-c4c9edb13aeb

diff --git a/Makefile.PL b/Makefile.PL
index 620537c..97f077b 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -26,6 +26,7 @@ requires('Email::MIME');
 requires('Email::MIME::Creator');
 requires('Email::MIME::ContentType');
 requires('Email::MIME::CreateHTML');
+requires('Email::MIME::Modifier');
 requires('Email::Send' => '1.99_01'); # Email::Send::Jifty::Test
 requires('Email::Simple');
 requires('Email::Simple::Creator');
diff --git a/lib/Jifty/Handle.pm b/lib/Jifty/Handle.pm
index 1abdf70..7ee39f1 100644
--- a/lib/Jifty/Handle.pm
+++ b/lib/Jifty/Handle.pm
@@ -114,10 +114,55 @@ then error out.
 =cut
 
 sub check_schema_version {
+    my $self = shift;
     require Jifty::Model::Metadata;
 
     # Application db version check
-    {
+
+    $self->_check_app_version_in_db(); 
+    $self->_check_jifty_version_in_db();
+
+    # If there isn't a jifty version, the user needs to init their db
+
+    # If there isn't an application schema, then we know we came from a pre-versioned time.
+    #   The user needs to run jifty schema --setup to update the database to the last numbered version they have
+    #       That will write out an application schema.
+    #
+    # If there IS an application schema in the database, we can skip the stupid "run your own upgrade" bit and just call 
+    #   autoupgrade
+    require Jifty::Schema; # Require it now. we want lazy-load here 
+    my $appschema = Jifty::Schema->new();
+    unless ($appschema->load_stored_schema) {
+        die "It looks like you haven't used this application since Jifty introduced automatic upgrades. Just this once, you'll need to run\n".
+        "   jifty schema --setup\n".
+        "to load your application's current schema definition into the database.\n"
+    }
+    $appschema->autoupgrade_schema();
+
+  
+
+
+
+}
+
+sub _check_jifty_version_in_db {
+    my $self =shift;
+        # If we got here, the application had a version (somehow) so
+        # this is an upgrade.  If $dbv is undef, it's because it's
+        # from before when the _jifty_metadata table existed.
+        my $dbv
+            = version->new( Jifty::Model::Metadata->load("jifty_db_version")
+                || '0.60426' );
+        my $appv = version->new($Jifty::VERSION);
+        die
+            "Internal jifty schema version in database ($dbv) doesn't match running jifty version ($appv)\n"
+            . "Please run `bin/jifty schema --setup` to upgrade the database.\n"
+            unless $appv == $dbv;
+    }
+
+
+sub _check_app_version_in_db {
+        my $self = shift;
         my $dbv  = Jifty::Model::Metadata->load("application_db_version");
         my $appv = Jifty->config->framework('Database')->{'Version'};
 
@@ -126,8 +171,7 @@ sub check_schema_version {
             my @v;
             eval {
                 local $SIG{__WARN__} = sub { };
-                @v = Jifty->handle->fetch_result(
-                    "SELECT major, minor, rev FROM _db_version");
+                @v = Jifty->handle->fetch_result( "SELECT major, minor, rev FROM _db_version");
             };
             $dbv = join( ".", @v ) if @v == 3;
         }
@@ -135,8 +179,7 @@ sub check_schema_version {
             # It was also called the 'key' column, not the data_key column
             eval {
                 local $SIG{__WARN__} = sub { };
-                $dbv = Jifty->handle->fetch_result(
-                    "SELECT value FROM _jifty_metadata WHERE key = 'application_db_version'");
+                $dbv = Jifty->handle->fetch_result( "SELECT value FROM _jifty_metadata WHERE key = 'application_db_version'");
             } or undef($dbv);
         }
 
@@ -151,25 +194,6 @@ sub check_schema_version {
             unless version->new($appv) == version->new($dbv);
     }
 
-    # Jifty db version check
-    {
-
-        # If we got here, the application had a version (somehow) so
-        # this is an upgrade.  If $dbv is undef, it's because it's
-        # from before when the _jifty_metadata table existed.
-        my $dbv
-            = version->new( Jifty::Model::Metadata->load("jifty_db_version")
-                || '0.60426' );
-        my $appv = version->new($Jifty::VERSION);
-        die
-            "Internal jifty schema version in database ($dbv) doesn't match running jifty version ($appv)\n"
-            . "Please run `bin/jifty schema --setup` to upgrade the database.\n"
-            unless $appv == $dbv;
-    }
-
-}
-
-
 =head2 create_database MODE
 
 C<MODE> is either "print" or "execute".
@@ -221,7 +245,7 @@ sub drop_database {
 
 =head1 AUTHOR
 
-Various folks at BestPractical Solutions, LLC.
+Various folks at Best Practical Solutions, LLC.
 
 =cut
 
diff --git a/lib/Jifty/Model/Metadata.pm b/lib/Jifty/Model/Metadata.pm
index 006f1a2..9215834 100644
--- a/lib/Jifty/Model/Metadata.pm
+++ b/lib/Jifty/Model/Metadata.pm
@@ -83,8 +83,7 @@ value if it existed.
 
 sub store {
     my $self = shift;
-    $self = $self->new( current_user => Jifty::CurrentUser->superuser )
-        unless ref $self;
+    $self = $self->new( current_user => Jifty::CurrentUser->superuser ) unless ref $self;
 
     my ( $key, $value ) = @_;
     $self->load_by_cols( data_key => $key );
diff --git a/lib/Jifty/Module/Pluggable.pm b/lib/Jifty/Module/Pluggable.pm
index 3ffa5dc..dbf3a49 100644
--- a/lib/Jifty/Module/Pluggable.pm
+++ b/lib/Jifty/Module/Pluggable.pm
@@ -1,8 +1,11 @@
-package Jifty::Module::Pluggable;
 use strict;
 use warnings;
+
+package Jifty::Module::Pluggable;
 use base qw/Module::Pluggable/;
 
+our $VERSION = '0.01';
+
 =head1 NAME
 
 Jifty::Module::Pluggable - Jifty-specific helper for Module::Pluggable
diff --git a/lib/Jifty/Record.pm b/lib/Jifty/Record.pm
index 082124c..e3f0466 100644
--- a/lib/Jifty/Record.pm
+++ b/lib/Jifty/Record.pm
@@ -2,7 +2,7 @@ use warnings;
 use strict;
 
 package Jifty::Record;
-
+use Jifty::DBI::SchemaGenerator;
 use Jifty::Config;
 
 =head1 NAME
@@ -601,19 +601,20 @@ sub create_table_in_db {
 
 }
 
-=head2 drop_table_in_db 
+=head2 drop_table_in_db [TABLENAME]
 
 When called, this method will generate the SQL to remove this model's
 table in the database and execute it in the application's currently
 open database.  This method can destroy a lot of data. Be sure you
-know what you're doing.
+know what you're doing. It takes an optional table name.
 
 
 =cut
 
 sub drop_table_in_db {
     my $self = shift;
-    my $ret  = Jifty->handle->simple_query( 'DROP TABLE ' . $self->table );
+    my $table = shift || $self->table;
+    my $ret  = Jifty->handle->simple_query( 'DROP TABLE ' . $table );
     $ret or die "error removing table $self: " . $ret->error_message;
 }
 
@@ -668,7 +669,8 @@ sub drop_column_sql {
     my $column_name = shift;
 
     my $col = $self->column($column_name);
-    return "ALTER TABLE " . $self->table . " DROP COLUMN " . $col->name;
+    my $name = $col? $col->name : $column_name;
+    return "ALTER TABLE " . $self->table . " DROP COLUMN " . $name;
 }
 
 
diff --git a/lib/Jifty/Schema.pm b/lib/Jifty/Schema.pm
index a30e1f2..cfed944 100644
--- a/lib/Jifty/Schema.pm
+++ b/lib/Jifty/Schema.pm
@@ -83,13 +83,13 @@ sub serialize_current_schema {
 }
 
 
-sub _store_current_schema {
+sub store_current_schema {
     my $self = shift;
      Jifty::Model::Metadata->store( current_schema      => Jifty::YAML::Dump($self->serialize_current_schema ));
+} 
 
 
-
-sub _load_stored_schema {
+sub load_stored_schema {
     my $self = shift;
      my $schema =  Jifty::YAML::Load(Jifty::Model::Metadata->load( 'current_schema'));
     return $schema;
@@ -106,24 +106,23 @@ Looks at the current schemas as defined by the source and the database and updat
 sub autoupgrade_schema {
     my $self = shift;
 
-    my ( $add_tables, $add_columns, $remove_tables, $remove_columns )
-        = $self->compute_schema_diffs( $self->_load_stored_schema, $self->serialize_current_schema);
-
+    my ( $add_tables, $add_columns, $remove_tables, $remove_columns, $column_deltas )
+        = $self->compute_schema_diffs( $self->load_stored_schema, $self->serialize_current_schema);
 
     # Run all "Rename" rules
     $self->run_upgrade_rules('before_all_renames');
-    my $table_renames  = Jifty->upgrade->table_renames;
-    my $column_renames = Jifty->upgrade->column_renames;
+    #my $table_renames  = Jifty->upgrade->table_renames;
+    #my $column_renames = Jifty->upgrade->column_renames;
     $self->run_upgrade_rules('after_column_renames');
 
     $self->_add_tables($add_tables);
     $self->_add_columns($add_columns);
     $self->_drop_tables($remove_tables);
     $self->_drop_columns($remove_columns);
-
+    $self->store_current_schema;
 }
 
-sub compute_schema_diffs{
+sub compute_schema_diffs {
     my $self = shift;
 
     # load the database schema version
@@ -131,6 +130,7 @@ sub compute_schema_diffs{
 
     # hashref
     my $new_tables = shift;
+
     my ($remove_tables,$remove_columns) = $self->_columns_and_tables_removed_between($old_tables => $new_tables);
     my ($add_tables,$add_columns) = $self->_columns_and_tables_removed_between($new_tables => $old_tables);
     my $column_deltas = $self->_column_changes_between($old_tables => $new_tables);
@@ -144,7 +144,7 @@ sub _column_changes_between {
     my $from_tables = shift;
     my $to_tables   = shift;
     
-    my $col_changes;
+    my $col_changes = ();
 
     # diff the current schema version and the database schema version
     foreach my $table ( keys %$from_tables ) {
@@ -215,9 +215,9 @@ sub _add_tables {
 
     # add all new tables
     $self->run_upgrade_rules('before_table_adds');
-    foreach my $table ( values %$add_tables ) {
+    foreach my $table ( keys %$add_tables ) {
         $self->run_upgrade_rules( 'before_add_table_' . $table );
-        $add_tables->{$table}->create_table_in_db();
+        $table->new->create_table_in_db();
         $self->run_upgrade_rules( 'after_add_table_' . $table );
     }
     $self->run_upgrade_rules('after_table_adds');
@@ -227,15 +227,14 @@ sub _add_tables {
 sub _add_columns {
     my $self = shift;
     my $add_columns = shift;
-
     $self->run_upgrade_rules('before_column_adds');
-    foreach my $table ( values %$add_columns ) {
+    foreach my $table ( keys %$add_columns ) {
             $self->run_upgrade_rules( 'before_add_columns_to_table_' . $table );
-        my @cols = @{ $add_columns->{$table} };
+        my @cols = @{ $add_columns->{$table} ||[]};
         foreach my $col (@cols) {
-            $self->run_upgrade_rules( 'before_add_column_' . $col->name . '_to_table_' . $table );
-            $add_columns->{$table}->add_column_in_db($col);
-            $self->run_upgrade_rules( 'after_add_column_' . $col->name . '_to_table_' . $table );
+            $self->run_upgrade_rules( 'before_add_column_' . $col->{name} . '_to_table_' . $table );
+            $table->new->add_column_in_db($col->{name});
+            $self->run_upgrade_rules( 'after_add_column_' . $col->{name} . '_to_table_' . $table );
         }
             $self->run_upgrade_rules( 'after_add_columns_to_table_' . $table );
     }
@@ -253,10 +252,10 @@ sub _drop_tables {
 
     $self->run_upgrade_rules('before_drop_tables');
 
-    foreach my $table ( values %$remove_tables ) {
-        $self->run_upgrade_rules( 'before_drop_table_' . $table );
-        $remove_tables->{$table}->drop_table_in_db();
-        $self->run_upgrade_rules( 'after_drop_table_' . $table );
+    foreach my $class ( keys %$remove_tables ) {
+        $self->run_upgrade_rules( 'before_drop_table_' . $class );
+        Jifty->app_class('Record')->new->drop_table_in_db($remove_tables->{$class}->{table});
+        $self->run_upgrade_rules( 'after_drop_table_' . $class );
     }
     $self->run_upgrade_rules('after_drop_tables');
 
@@ -268,13 +267,13 @@ sub _drop_columns {
 
     $self->run_upgrade_rules('before_drop_columns');
 
-    foreach my $table ( values %$remove_columns ) {
+    foreach my $table ( keys %$remove_columns ) {
             $self->run_upgrade_rules( 'before_drop_columns_from_' . $table );
-        my @cols = @{ $remove_columns->{$table} };
+        my @cols = @{ $remove_columns->{$table} ||[] };
         foreach my $col (@cols) {
-            $self->run_upgrade_rules( 'before_drop_column' . $col->name . '_from_' . $table );
-            $remove_columns->{$table}->drop_column_in_db($col);
-            $self->run_upgrade_rules( 'after_drop_column_' . $col->name . '_from_' . $table );
+            $self->run_upgrade_rules( 'before_drop_column' . $col->{'name'} . '_from_' . $table );
+            $table->new->drop_column_in_db($col->{name});
+            $self->run_upgrade_rules( 'after_drop_column_' . $col->{'name'} . '_from_' . $table );
         }
             $self->run_upgrade_rules( 'after_drop_columns_from_' . $table );
     }
diff --git a/lib/Jifty/Script/Schema.pm b/lib/Jifty/Script/Schema.pm
index a0bb774..b41ebe5 100755
--- a/lib/Jifty/Script/Schema.pm
+++ b/lib/Jifty/Script/Schema.pm
@@ -47,10 +47,15 @@ sub run {
     $self->manage_database_existence();
     if ( $self->{create_all_tables} ) {
         $self->create_all_tables();
+         { local $SIG{__WARN__} = sub {};  # horrible evil hack to avoid idiotic warnings on sqlite init
+            Jifty::Schema->new()->store_current_schema()
+     };
     } elsif ( $self->{'setup_tables'} ) {
         $self->upgrade_jifty_tables();
         $self->upgrade_application_tables();
         $self->upgrade_plugin_tables();
+        Jifty::Schema->new()->store_current_schema();
+
     } else {
         print "Done.\n";
     }
diff --git a/lib/Jifty/Upgrade.pm b/lib/Jifty/Upgrade.pm
index 6502d2d..84202db 100644
--- a/lib/Jifty/Upgrade.pm
+++ b/lib/Jifty/Upgrade.pm
@@ -14,7 +14,7 @@ and data upgrades that happen.
 
 package Jifty::Upgrade;
 
-use base qw/Jifty::Object Exporter Class::Data::Inheritable/;
+use base qw/Jifty::Object Exporter Class::Data::Inheritable Jifty::DBI::Class::Trigger/;
 use vars qw/%UPGRADES @EXPORT/;
 @EXPORT = qw/since rename/;
 
diff --git a/t/TestApp/t/16-autoversioning.t b/t/TestApp/t/16-autoversioning.t
index 7124f65..947973d 100644
--- a/t/TestApp/t/16-autoversioning.t
+++ b/t/TestApp/t/16-autoversioning.t
@@ -24,8 +24,8 @@ can_ok($schema, 'models');
 can_ok($schema, 'serialize_current_schema');
 
 my $serialized = $schema->serialize_current_schema;
-ok($schema->_store_current_schema);;
-my $stored = $schema->_load_stored_schema();
+ok($schema->store_current_schema);;
+my $stored = $schema->load_stored_schema();
 is_deeply($stored,$serialized);
 {
     my ( $add_tables, $add_columns, $remove_tables, $remove_columns )

commit 1d84d1b74c1a0cb36ac53b333ca96b0c85f8c07e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Jul 23 01:18:12 2007 +0000

    added a todo file for the branch
    
    git-svn-id: svn+ssh://svn.bestpractical.com/svn/jifty.org/jifty/branches/autoversioning@3714 e84bef0a-9b06-0410-84ba-c4c9edb13aeb

diff --git a/TODO b/TODO
new file mode 100644
index 0000000..3a4cbfd
--- /dev/null
+++ b/TODO
@@ -0,0 +1,9 @@
+* add support for dropping columns on sqlite
+* make drop only mark things for deletion, rather than drop them immediately
+* when adding back after a drop, rescue them from the droplist, rather than creating anew
+* add a dropping action to the schema tool that REALLY drops things
+* add support for renames
+* add support for changing column types
+* tests. lots of tests
+* proper logging of database changes
+* run all our ddl changes in a transaction

commit 8437b251c864e7cb2e1b67dd23d05bd3480d8945
Merge: 1d84d1b b508a62
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Thu Aug 2 15:50:22 2007 +0000

    Merge from /jifty/trunk:3761
    
    r61117 at pinglin (orig r3705):  clkao | 2007-07-20 10:00:23 -0400
    Push milestone 1 of trimclient to trunk.
    
    r61120 at pinglin (orig r3706):  jesse | 2007-07-22 16:21:40 -0400
    
    r61121 at pinglin (orig r3707):  jesse | 2007-07-22 16:21:58 -0400
     r61112 at 106:  jesse | 2007-07-22 10:20:34 -0700
     * The warnings come from the server code after the fork. Test::Log4Perl isn't going to catch them.
    
    r61122 at pinglin (orig r3708):  jesse | 2007-07-22 16:22:02 -0400
     r61115 at 106:  jesse | 2007-07-22 12:48:51 -0700
     * added some pod to help make pod tests pass
    
    r61158 at pinglin (orig r3715):  clkao | 2007-07-24 06:09:47 -0400
    Fix a fragment update regression caused by the trimclient merge.
    
    r64873 at pinglin (orig r3723):  sterling | 2007-07-27 15:53:01 -0400
    
    r64874 at pinglin (orig r3724):  sterling | 2007-07-27 15:54:54 -0400
     r8183 at riddle:  andrew | 2007-07-27 12:49:07 -0700
     Adding a plugin for rendering charts of data.
    
    r64875 at pinglin (orig r3725):  sterling | 2007-07-27 15:56:25 -0400
     r8184 at riddle:  andrew | 2007-07-27 12:49:42 -0700
     Removing a directory that should not have committed previously.
    
    r64876 at pinglin (orig r3726):  sterling | 2007-07-27 15:58:53 -0400
    
    r64877 at pinglin (orig r3727):  sterling | 2007-07-27 16:12:43 -0400
     r8192 at riddle:  andrew | 2007-07-27 13:11:49 -0700
     Reverting mistaken revision r3723
    
    r64878 at pinglin (orig r3728):  sterling | 2007-07-27 16:17:32 -0400
     r8194 at riddle:  andrew | 2007-07-27 13:16:59 -0700
     Reverting mistaken revision r3723, take 2
    
    r64910 at pinglin (orig r3730):  jesse | 2007-07-28 20:31:47 -0400
     r64900 at pinglin:  jesse | 2007-07-28 18:18:31 -0500
     * Moniker bulletproofing. Suggested by Mikko Lapasti
    
    r64912 at pinglin (orig r3731):  sterling | 2007-07-29 16:15:59 -0400
     r8199 at dynpc145:  andrew | 2007-07-29 15:13:38 -0500
     Added documentation to the experimental Chart plugin.
    
    r64913 at pinglin (orig r3732):  sterling | 2007-07-29 16:16:07 -0400
     r8200 at dynpc145:  andrew | 2007-07-29 15:15:21 -0500
     Added the Chart::Base recommendation for the Chart plugin.
    
    r64916 at pinglin (orig r3734):  jesse | 2007-07-29 17:53:45 -0400
     r64915 at pinglin:  jesse | 2007-07-29 17:53:35 -0400
     * Resolve import conflicts now that T::D and J::V::D::Helpers have a thingy with the same name
    
    r64924 at pinglin (orig r3735):  sterling | 2007-07-29 22:16:24 -0400
     r8203 at dynpc145:  andrew | 2007-07-29 21:13:01 -0500
     Adding a test suite for Jifty::Plugin::Chart, but it is having weird troubles loading Chart::* because that seems to disconnect the server output or something.
    
    r64925 at pinglin (orig r3736):  sterling | 2007-07-29 22:16:30 -0400
     r8204 at dynpc145:  andrew | 2007-07-29 21:13:35 -0500
     Adding Image::Info dependency used during testing of Jifty::Plugin::Chart
    
    r64926 at pinglin (orig r3737):  sterling | 2007-07-29 22:16:37 -0400
     r8205 at dynpc145:  andrew | 2007-07-29 21:15:43 -0500
     Regarding Jifty::Plugin::Chart: Added better comments. Fixed some error handling. Switched to using scalar_png(). Switched to using ->require rather than an eval to load Chart classes. Eliminated the need for IO::String. Moved some processing out of View and into Dispatcher.
    
    r64927 at pinglin (orig r3738):  sartak | 2007-07-30 16:57:21 -0400
     r29652 at caladan:  sartak | 2007-07-30 16:56:47 -0400
     Add a load_by_kv to Jifty::Web::Session
    
    r64928 at pinglin (orig r3739):  sartak | 2007-07-30 16:58:18 -0400
     r29654 at caladan:  sartak | 2007-07-30 16:58:03 -0400
     add myself to AUTHORS :)
    
    r64934 at pinglin (orig r3742):  jesse | 2007-07-30 20:38:33 -0400
     r64932 at pinglin:  jesse | 2007-07-30 20:37:16 -0400
     * First cut of a UUID column plugin, with a basic test in the user model
    
    r65010 at pinglin (orig r3747):  sterling | 2007-07-31 22:32:37 -0400
    
    r65011 at pinglin (orig r3748):  sterling | 2007-07-31 22:32:48 -0400
     r8268 at dynpc145:  andrew | 2007-07-31 21:28:14 -0500
     Added a hack to chart.t (forcing an early load of GD) to avoid the segfault that was causing it to fail. Removed the TODO block from the test.
    
    r65012 at pinglin (orig r3749):  sterling | 2007-07-31 22:33:01 -0400
     r8269 at dynpc145:  andrew | 2007-07-31 21:29:42 -0500
     Fixed the way arguments are passed to the render() method in Jifty::Plugin::Chart::Web.
    
    r65013 at pinglin (orig r3750):  sterling | 2007-07-31 22:33:09 -0400
     r8270 at dynpc145:  andrew | 2007-07-31 21:31:01 -0500
     Moved the chart/* dispatch to chart/chart/* to make room for alternate charting mechanisms.
    
    r65014 at pinglin (orig r3751):  sterling | 2007-07-31 22:33:17 -0400
     r8271 at dynpc145:  andrew | 2007-07-31 21:31:21 -0500
     Added a renderer for GD::Graph
    
    r65015 at pinglin (orig r3752):  sterling | 2007-07-31 22:33:32 -0400
     r8272 at dynpc145:  andrew | 2007-07-31 21:31:41 -0500
     Updated the module recommendations for the Chart plugin.
    
    r65016 at pinglin (orig r3753):  sterling | 2007-07-31 22:47:45 -0400
     r8289 at dynpc145:  andrew | 2007-07-31 21:42:52 -0500
     Updated POD and removed an unnecessary extra subroutine call.
    
    r65017 at pinglin (orig r3754):  sterling | 2007-07-31 22:47:56 -0400
     r8290 at dynpc145:  andrew | 2007-07-31 21:44:59 -0500
     Fixed POD coverage issue.
    
    r65018 at pinglin (orig r3755):  sterling | 2007-07-31 22:48:02 -0400
     r8291 at dynpc145:  andrew | 2007-07-31 21:47:05 -0500
     Fixed an eensy POD bug.
    
    r65019 at pinglin (orig r3756):  sterling | 2007-07-31 23:03:26 -0400
     r8296 at dynpc145:  andrew | 2007-07-31 22:03:08 -0500
     Made the chart plugin test smarter and added one for the GD::Graph renderer.
    
    r65020 at pinglin (orig r3757):  trs | 2007-07-31 23:41:50 -0400
     r25774 at zot:  tom | 2007-07-31 23:40:12 -0400
     Basic PlotKit renderer for Chart plugin
    
    r65021 at pinglin (orig r3758):  trs | 2007-08-01 02:49:40 -0400
     r25776 at zot:  tom | 2007-08-01 02:49:29 -0400
     - Uncomment neccessary require
     - Make sure to handle undefined stuff
    
    r65038 at pinglin (orig r3760):  jesse | 2007-08-01 15:15:14 -0400
    
    r65039 at pinglin (orig r3761):  jesse | 2007-08-01 15:15:32 -0400
     r65037 at pinglin:  jesse | 2007-08-01 15:11:00 -0400
      * clean up load_by_kv
    
    git-svn-id: svn+ssh://svn.bestpractical.com/svn/jifty.org/jifty/branches/autoversioning@3766 e84bef0a-9b06-0410-84ba-c4c9edb13aeb


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


More information about the Jifty-commit mailing list