/[Frey]/trunk/lib/Frey/DBI/Sponge.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/DBI/Sponge.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 950 by dpavlin, Tue Jan 6 11:56:28 2009 UTC revision 951 by dpavlin, Tue Jan 6 23:43:59 2009 UTC
# Line 34  sub to_database_as_markup { Line 34  sub to_database_as_markup {
34    
35          my $create_sql = qq{          my $create_sql = qq{
36                  create table $table (                  create table $table (
37          } . join( ",\n", map { s/%//; "$_ text" } @columns ) . qq{          } . join( ",\n",
38                    map {
39                            s/%//;  # stip invalid characters from column names
40                            my $type = 'text';
41                            $type = 'timestamp' if $_ =~ m{(date|time)};
42                            "$_ $type"
43                    } @columns ) . qq{
44                  );                  );
45          };          };
46          eval { $dbh->do( $create_sql ); };          eval { $dbh->do( $create_sql ); };

Legend:
Removed from v.950  
changed lines
  Added in v.951

  ViewVC Help
Powered by ViewVC 1.1.26