From f8980ca9680dcc449919dfa6424fc52ffac9bb93 Mon Sep 17 00:00:00 2001 From: franck cuny Date: Sun, 3 Oct 2010 11:37:07 +0200 Subject: script to deploy new schema --- scripts/deploy_schema | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 scripts/deploy_schema (limited to 'scripts/deploy_schema') diff --git a/scripts/deploy_schema b/scripts/deploy_schema new file mode 100644 index 0000000..aa31811 --- /dev/null +++ b/scripts/deploy_schema @@ -0,0 +1,14 @@ +use strict; +use warnings; +use jitterbug::Schema; +use YAML qw/LoadFile/; + +my $config = shift; +die "need configuration file" unless $config; + +my $dancer_conf = LoadFile($config); + +my $dbix_conf = $dancer_conf->{plugins}->{DBIC}->{schema}; +my $schema = jitterbug::Schema->connect( @{ $dbix_conf->{connect_info} } ); +$schema->deploy; +print "done!\n"; \ No newline at end of file -- cgit v1.2.3