aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rwxr-xr-xdb/rerun_dbic_loader.pl11
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' ],