Catalyst 5.8 the Perl MVC Framework Notes--Creating a Database Model
The command for creating a database model is as the following:
1
perl script/myapp_create.pl model TestDatabase DBIC::Schema MyApp::Schema::TestDatabase create=dynamic dbi:SQLite:tmp/database
The first argument is the name of the Catalyst Model (TestDatabase). DBIC::Schema is what sort of model we’re creating. MyApp::Schema::TestDatabase is where the schema definition will be stored (we won’t use the Schema in this example, but real applications will). create=dynamic tells DBIC to read the database every time theapplication is started to determine the schema (layout of tables, foreign key relations, and so on.). The final argument is the DBI connect string for the database.