On Thu, Mar 15 '07 at 22:38, Matija Grabnar wrote:
> [ ... sqlt / SQL::Translator does not work for me ... ]

Been there, failed there and unable to send mails to the ml...

On IRC I was told to use $schema->deploy or
$schema->storage->deploy_statement. From my 01deploy.t:

-----------------------------------------------------------------------
my $db_file = "test.db";

unlink($db_file) if -e $db_file;
unlink($db_file . "-journal") if -e $db_file . "-journal";

my $dsn    = $ENV{"DWA_DSN"} || "dbi:SQLite:${db_file}";
my $dbuser = $ENV{"DWA_DBUSER"} || '';
my $dbpass = $ENV{"DWA_DBPASS"} || '';

my $schema 
    = MyCom::DB::MyApp::Schema->connection( $dsn, $dbuser, $dbpass );

eval{ $schema->deploy() };
ok( !$@, "Deploy ok." );
-----------------------------------------------------------------------

BTW: Do _not_ test the return code of deploy(), just don't ;-)
--  
/"\ Goetz Bock at blacknet dot de  --  secure mobile Linux everNETting
\ /       (c) 2006 Creative Commons, Attribution-ShareAlike 2.0 de
 X   [ 1. Use descriptive subjects - 2. Edit a reply for brevity -  ]
/ \  [ 3. Reply to the list - 4. Read the archive *before* you post ]

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to