Show
Ignore:
Timestamp:
02/04/08 22:09:56 (2 years ago)
Author:
eevee
Message:

Bit of a shoutbox test. Not particularly amazing. For the life of me I can't figure out how to log in and stay that way. (#152)
Tossing in my schema cleanup script, too. Ugh dirty mixed commits~

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/lib/Vee/Model/DBIC.pm

    r186 r404  
    88 
    99sub new { 
     10    # For testing purposes, allow use of a temporary SQLite db 
     11    if ($ENV{VEEKUN_USE_TEMP_DB}) { 
     12        # Use Catalyst's global config override and an in-memory db 
     13        $_[-1]->{connect_info} = ["dbi:SQLite:dbname=:memory:"]; 
     14    } 
     15 
    1016    my $self = shift->NEXT::new(@_); 
    1117 
     18    if ($ENV{VEEKUN_USE_TEMP_DB}) { 
     19        $self->schema->add_simple_column_types; 
     20        $self->schema->deploy({ producer => 'SQLite' }); 
     21    } 
     22 
     23    # TODO: What to do here?  Temp db won't have any data! 
    1224    Vee::Dex::initialize( $self ); 
    1325