I do not think I understand the scope of DBIx::ClassShould I manually create a database with plain SQL first and then use the schemaloader (or manually encode the schema / results)?Or is there a way to tell DBIx::Class continue and create tables from a manually encoded schema and result set?I ask b / c if I need to create a database using the SQL CREATE TABLE statement, I have a column essentially duplicated in the ResultSet code, or I need to rely on a loader block that I believe is inefficient and inappropriate for production.
DBIx::Class
CREATE TABLE
You can deploy() your schema:
deploy()
my $schema = MyApp::Schema->connect( $dsn, $user, $password, ); $schema->deploy( { add_drop_table => 1 } );
Of course, the above will lose existing tables :)
You can go on any route. You can create a schema and get DBIx :: Class to parse it , or you can get DBIx :: Class to build the schema for you .
The first should not be inefficient for production, since you can get DBIx :: Class to save the generated code so that it does not have to do an analysis of each run.