diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-07-13 09:51:00 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2017-08-09 17:03:48 +0100 |
commit | e00c75d7f19bc45879c254ea77dce32df825f3a7 (patch) | |
tree | 7fd42ffd93fa244f81a84d8a5ace4f7be03b81c7 /db | |
parent | 46b9d8989d5ac2f8eedd196d11ceb4baf57728dd (diff) |
Move FixMyStreet::DB to FixMyStreet::DB::Schema.
Store a schema object on FixMyStreet::DB instead.
Diffstat (limited to 'db')
-rwxr-xr-x | db/rerun_dbic_loader.pl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/db/rerun_dbic_loader.pl b/db/rerun_dbic_loader.pl index 958b28241..cf6e89ab2 100755 --- a/db/rerun_dbic_loader.pl +++ b/db/rerun_dbic_loader.pl @@ -3,6 +3,13 @@ use strict; use warnings; +BEGIN { + use File::Basename qw(dirname); + use File::Spec; + my $d = dirname(File::Spec->rel2abs($0)); + require "$d/../setenv.pl"; +} + # This script inspects the current state of the database and then amends the # FixMyStreet::DB::Result::* files to suit. After running the changes should be # inspected before the code is commited. @@ -20,13 +27,15 @@ my @tables_to_ignore = ( my $exclude = '^(?:' . join( '|', @tables_to_ignore ) . ')$'; make_schema_at( - 'FixMyStreet::DB', + 'FixMyStreet::DB::Schema', { debug => 0, # switch on to be chatty dump_directory => './perllib', # edit files in place exclude => qr{$exclude}, # ignore some tables generate_pod => 0, # no need for pod overwrite_modifications => 1, # don't worry that the md5 is wrong + result_namespace => '+FixMyStreet::DB::Result', + resultset_namespace => '+FixMyStreet::DB::ResultSet', # add in some extra components components => [ 'FilterColumn', 'InflateColumn::DateTime', 'EncodedColumn' ], |