perl - Mojolicious Deploying database schema -
i working through this tutorial on building mojolicious web app project. in tutorial talks using in script create database schema.
my $schema = moblo::schema->connect('dbi:sqlite:moblo.db'); $schema->deploy();
and have tried running perl -e '...'
, putting in different files , else can think of, no success.
here code on github.
i pretty lost on how thing create schema appreciated.
it's not clear why author wrote part of deployment script. perhaps thought obvious needed use moblo::schema
in there. perhaps right.
this program works fine. call like—say deploy.pl
—and put in moblo/lib
directory.
use strict; use warnings; use moblo::schema; $schema = moblo::schema->connect('dbi:sqlite:moblo.db'); $schema->deploy();
Comments
Post a Comment