Please show me how to generate SQL schema from my Perl DBIx::Class
files ?
Basically the reverse of make_schema_at in DBIx::Class::Schema::Loader
.
I have already built the Perl schema files, I just wish to recreate the schema in my SQL database.
I can't seem to find examples going from Perl -> SQL.
Many thanks in advance.
I believe you are looking for the deploy
and deployment_statements
functions in DBIx::Class::Schema.
my $statements = $schema->deployment_statements;
print "$statements\n";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With