aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm6
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm2
-rw-r--r--perllib/FixMyStreet/DB/Result/Body.pm (renamed from perllib/FixMyStreet/DB/Result/Open311conf.pm)14
-rw-r--r--perllib/FixMyStreet/DB/Result/Contact.pm4
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm6
-rw-r--r--perllib/FixMyStreet/DB/Result/User.pm16
-rw-r--r--perllib/FixMyStreet/SendReport/Barnet.pm2
-rw-r--r--perllib/Open311/GetServiceRequestUpdates.pm2
-rw-r--r--perllib/Open311/PopulateServiceList.pm2
9 files changed, 27 insertions, 27 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 4999d16f2..a96562cd6 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -349,7 +349,7 @@ sub update_contacts : Private {
my %params = map { $_ => $c->req->param($_) || '' } qw/open311_id endpoint jurisdiction api_key area_id send_method send_comments suppress_alerts comment_user_id devolved/;
if ( $params{open311_id} ) {
- my $conf = $c->model('DB::Open311Conf')->find( { id => $params{open311_id} } );
+ my $conf = $c->model('DB::Body')->find( { id => $params{open311_id} } );
$conf->endpoint( $params{endpoint} );
$conf->jurisdiction( $params{jurisdiction} );
@@ -364,7 +364,7 @@ sub update_contacts : Private {
$c->stash->{updated} = _('Configuration updated');
} else {
- my $conf = $c->model('DB::Open311Conf')->find_or_new( { area_id => $params{area_id} } );
+ my $conf = $c->model('DB::Body')->find_or_new( { area_id => $params{area_id} } );
$conf->endpoint( $params{endpoint} );
$conf->jurisdiction( $params{jurisdiction} );
@@ -399,7 +399,7 @@ sub display_contacts : Private {
my @methods = map { $_ =~ s/FixMyStreet::SendReport:://; $_ } keys %{ FixMyStreet::SendReport->get_senders };
$c->stash->{send_methods} = \@methods;
- my $open311 = $c->model('DB::Open311Conf')->search(
+ my $open311 = $c->model('DB::Body')->search(
{ area_id => $area_id }
);
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index 86ea693b7..46ec47d9e 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -652,7 +652,7 @@ sub get_council_sender {
my $send_method;
- my $council_config = FixMyStreet::App->model("DB::Open311conf")->search( { area_id => $area_id } )->first;
+ my $council_config = FixMyStreet::App->model("DB::Body")->search( { area_id => $area_id } )->first;
$send_method = $council_config->send_method if $council_config;
if ( $council_config && $council_config->can_be_devolved ) {
diff --git a/perllib/FixMyStreet/DB/Result/Open311conf.pm b/perllib/FixMyStreet/DB/Result/Body.pm
index 8051e27de..76835cbde 100644
--- a/perllib/FixMyStreet/DB/Result/Open311conf.pm
+++ b/perllib/FixMyStreet/DB/Result/Body.pm
@@ -1,5 +1,5 @@
use utf8;
-package FixMyStreet::DB::Result::Open311conf;
+package FixMyStreet::DB::Result::Body;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
@@ -9,19 +9,19 @@ use warnings;
use base 'DBIx::Class::Core';
__PACKAGE__->load_components("FilterColumn", "InflateColumn::DateTime", "EncodedColumn");
-__PACKAGE__->table("open311conf");
+__PACKAGE__->table("body");
__PACKAGE__->add_columns(
"id",
{
data_type => "integer",
is_auto_increment => 1,
is_nullable => 0,
- sequence => "open311conf_id_seq",
+ sequence => "body_id_seq",
},
"area_id",
{ data_type => "integer", is_nullable => 0 },
"endpoint",
- { data_type => "text", is_nullable => 0 },
+ { data_type => "text", is_nullable => 1 },
"jurisdiction",
{ data_type => "text", is_nullable => 1 },
"api_key",
@@ -38,7 +38,7 @@ __PACKAGE__->add_columns(
{ data_type => "boolean", default_value => \"false", is_nullable => 0 },
);
__PACKAGE__->set_primary_key("id");
-__PACKAGE__->add_unique_constraint("open311conf_area_id_key", ["area_id"]);
+__PACKAGE__->add_unique_constraint("body_area_id_key", ["area_id"]);
__PACKAGE__->belongs_to(
"comment_user",
"FixMyStreet::DB::Result::User",
@@ -52,8 +52,8 @@ __PACKAGE__->belongs_to(
);
-# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-08-29 14:04:20
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Yoult8K/ldH6DMAKURtr3Q
+# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-12-12 16:29:16
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7G4lkjrgUBXKmadSuK8emA
# You can replace this text with custom code or comments, and it will be preserved on regeneration
diff --git a/perllib/FixMyStreet/DB/Result/Contact.pm b/perllib/FixMyStreet/DB/Result/Contact.pm
index 993e3524b..0fef2f56b 100644
--- a/perllib/FixMyStreet/DB/Result/Contact.pm
+++ b/perllib/FixMyStreet/DB/Result/Contact.pm
@@ -51,8 +51,8 @@ __PACKAGE__->set_primary_key("id");
__PACKAGE__->add_unique_constraint("contacts_area_id_category_idx", ["area_id", "category"]);
-# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-08-31 10:29:17
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:t6yOPhZmedV/eH6AUvHI6w
+# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-12-10 15:33:48
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T1jcv40rbTqZbwDziGTYCA
__PACKAGE__->filter_column(
extra => {
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index ce197076b..ae5815143 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -99,7 +99,7 @@ __PACKAGE__->add_columns(
"external_source_id",
{ data_type => "text", is_nullable => 1 },
"interest_count",
- { data_type => "integer", is_nullable => 1 },
+ { data_type => "integer", default_value => 0, is_nullable => 1 },
);
__PACKAGE__->set_primary_key("id");
__PACKAGE__->has_many(
@@ -122,8 +122,8 @@ __PACKAGE__->belongs_to(
);
-# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-08-31 10:25:34
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mudIAiLAUdmK8gGWIPiq6g
+# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-12-10 15:33:48
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YZzkUjX7Dsxcsm4bXZjIYg
# Add fake relationship to stored procedure table
__PACKAGE__->has_one(
diff --git a/perllib/FixMyStreet/DB/Result/User.pm b/perllib/FixMyStreet/DB/Result/User.pm
index 7f43d1a52..1baf15ad1 100644
--- a/perllib/FixMyStreet/DB/Result/User.pm
+++ b/perllib/FixMyStreet/DB/Result/User.pm
@@ -42,15 +42,15 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
__PACKAGE__->has_many(
- "comments",
- "FixMyStreet::DB::Result::Comment",
- { "foreign.user_id" => "self.id" },
+ "bodies",
+ "FixMyStreet::DB::Result::Body",
+ { "foreign.comment_user_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
__PACKAGE__->has_many(
- "open311confs",
- "FixMyStreet::DB::Result::Open311conf",
- { "foreign.comment_user_id" => "self.id" },
+ "comments",
+ "FixMyStreet::DB::Result::Comment",
+ { "foreign.user_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
__PACKAGE__->has_many(
@@ -61,8 +61,8 @@ __PACKAGE__->has_many(
);
-# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-05-01 16:20:29
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LKi8u5IYnHW1+Mez64nvGg
+# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-12-10 15:34:40
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6KOp2hcVLqx28Po7uENTnA
__PACKAGE__->add_columns(
"password" => {
diff --git a/perllib/FixMyStreet/SendReport/Barnet.pm b/perllib/FixMyStreet/SendReport/Barnet.pm
index 9a92686ec..4bee50e57 100644
--- a/perllib/FixMyStreet/SendReport/Barnet.pm
+++ b/perllib/FixMyStreet/SendReport/Barnet.pm
@@ -80,7 +80,7 @@ sub send {
? $h{query} : $nearest_postcode; # use given postcode if available
# note: endpoint can be of form 'https://username:password@url'
- my $council_config = FixMyStreet::App->model("DB::Open311conf")->search( { area_id => COUNCIL_ID_BARNET} )->first;
+ my $council_config = FixMyStreet::App->model("DB::Body")->search( { area_id => COUNCIL_ID_BARNET} )->first;
if ($council_config and $council_config->endpoint) {
$interface->set_proxy($council_config->endpoint);
# Barnet web service doesn't like namespaces in the elements so use a prefix
diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm
index 0b4e037fd..0b71907a0 100644
--- a/perllib/Open311/GetServiceRequestUpdates.pm
+++ b/perllib/Open311/GetServiceRequestUpdates.pm
@@ -15,7 +15,7 @@ has verbose => ( is => 'ro', default => 0 );
sub fetch {
my $self = shift;
- my $councils = FixMyStreet::App->model('DB::Open311Conf')->search(
+ my $councils = FixMyStreet::App->model('DB::Body')->search(
{
send_method => 'Open311',
send_comments => 1,
diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm
index e8ae56833..8637e8431 100644
--- a/perllib/Open311/PopulateServiceList.pm
+++ b/perllib/Open311/PopulateServiceList.pm
@@ -14,7 +14,7 @@ has _current_council => ( is => 'rw' );
has _current_open311 => ( is => 'rw' );
has _current_service => ( is => 'rw' );
-my $council_list = FixMyStreet::App->model('DB::Open311conf');
+my $council_list = FixMyStreet::App->model('DB::Body');
sub process_councils {
my $self = shift;