summaryrefslogtreecommitdiffstats
path: root/bin/db_gen_schema_dump
diff options
context:
space:
mode:
Diffstat (limited to 'bin/db_gen_schema_dump')
-rwxr-xr-xbin/db_gen_schema_dump22
1 files changed, 22 insertions, 0 deletions
diff --git a/bin/db_gen_schema_dump b/bin/db_gen_schema_dump
new file mode 100755
index 0000000..1e84dd3
--- /dev/null
+++ b/bin/db_gen_schema_dump
@@ -0,0 +1,22 @@
+#!/usr/bin/env perl
+use v5.20;
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+use ASM::DB;
+use DBIx::Class::DeploymentHandler;
+
+my $schema = ASM::DB->clone;
+
+my $dh = DBIx::Class::DeploymentHandler->new({
+ schema => $schema,
+ schema_version => '' . $schema->schema_version,
+ sql_translator_args => { add_drop_table => 0, quote_identifiers => 1 },
+ databases => [],
+ ignore_ddl => 1,
+ });
+
+$dh->prepare_install;