How to generate SQL schema from Perl DBIx :: Class files?

Please show me how to generate the SQL schema from my Perl file DBIx::Class?

Basically the reverse side of make_schema_at's DBIx::Class::Schema::Loader.

I already created Perl schema files, I just want to recreate the schema in my SQL database.

I can not find examples from Perl -> SQL.

Thank you very much in advance.

+4
source share
1 answer

I believe that you are looking for deployand deployment_statementsin DBIx :: :: Class Schema .

my $statements = $schema->deployment_statements;
print "$statements\n";
+4
source

Source: https://habr.com/ru/post/1543061/


All Articles