aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB
diff options
context:
space:
mode:
authorDave Whiteland <dave@mysociety.org>2012-10-03 17:47:25 +0100
committerDave Whiteland <dave@mysociety.org>2012-10-03 17:47:25 +0100
commit272dba7ce6d59d81b52579dd4c5fc7d65e9bec20 (patch)
treecabbefec7823061781050ffb002a38ce53d68f56 /perllib/FixMyStreet/DB
parent39c1b648b30e67ceb8912a35b386eb4ee23857b8 (diff)
parentf16a3e96b65394089d10c46c1d67cf82c67e72dd (diff)
Merge branch 'fmb-read-only'
Conflicts: db/schema.sql perllib/FixMyStreet/DB/Result/Contact.pm perllib/FixMyStreet/DB/Result/Problem.pm
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm12
-rw-r--r--perllib/FixMyStreet/DB/Result/Contact.pm8
-rw-r--r--perllib/FixMyStreet/DB/Result/Open311conf.pm6
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm6
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Problem.pm6
5 files changed, 27 insertions, 11 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index 91695d7d0..8c9fea282 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -54,10 +54,6 @@ __PACKAGE__->add_columns(
{ data_type => "boolean", default_value => \"false", is_nullable => 0 },
"problem_state",
{ data_type => "text", is_nullable => 1 },
- "external_id",
- { data_type => "text", is_nullable => 1 },
- "extra",
- { data_type => "text", is_nullable => 1 },
"send_fail_count",
{ data_type => "integer", default_value => 0, is_nullable => 0 },
"send_fail_reason",
@@ -66,6 +62,10 @@ __PACKAGE__->add_columns(
{ data_type => "timestamp", is_nullable => 1 },
"whensent",
{ data_type => "timestamp", is_nullable => 1 },
+ "external_id",
+ { data_type => "text", is_nullable => 1 },
+ "extra",
+ { data_type => "text", is_nullable => 1 },
);
__PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to(
@@ -82,8 +82,8 @@ __PACKAGE__->belongs_to(
);
-# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-03-26 15:44:18
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nvkElEgSU6XcLd9znSqhmQ
+# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-07-11 18:53:26
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tSejJzLxHD/fMWjpa10lfA
__PACKAGE__->filter_column(
extra => {
diff --git a/perllib/FixMyStreet/DB/Result/Contact.pm b/perllib/FixMyStreet/DB/Result/Contact.pm
index cad12f1fc..993e3524b 100644
--- a/perllib/FixMyStreet/DB/Result/Contact.pm
+++ b/perllib/FixMyStreet/DB/Result/Contact.pm
@@ -38,6 +38,14 @@ __PACKAGE__->add_columns(
{ data_type => "text", is_nullable => 1 },
"non_public",
{ data_type => "boolean", default_value => \"false", is_nullable => 1 },
+ "endpoint",
+ { data_type => "text", is_nullable => 1 },
+ "jurisdiction",
+ { data_type => "text", default_value => "", is_nullable => 1 },
+ "api_key",
+ { data_type => "text", default_value => "", is_nullable => 1 },
+ "send_method",
+ { data_type => "text", is_nullable => 1 },
);
__PACKAGE__->set_primary_key("id");
__PACKAGE__->add_unique_constraint("contacts_area_id_category_idx", ["area_id", "category"]);
diff --git a/perllib/FixMyStreet/DB/Result/Open311conf.pm b/perllib/FixMyStreet/DB/Result/Open311conf.pm
index c95b0c8f2..8051e27de 100644
--- a/perllib/FixMyStreet/DB/Result/Open311conf.pm
+++ b/perllib/FixMyStreet/DB/Result/Open311conf.pm
@@ -34,6 +34,8 @@ __PACKAGE__->add_columns(
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"suppress_alerts",
{ data_type => "boolean", default_value => \"false", is_nullable => 0 },
+ "can_be_devolved",
+ { data_type => "boolean", default_value => \"false", is_nullable => 0 },
);
__PACKAGE__->set_primary_key("id");
__PACKAGE__->add_unique_constraint("open311conf_area_id_key", ["area_id"]);
@@ -50,8 +52,8 @@ __PACKAGE__->belongs_to(
);
-# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-05-11 13:30:31
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ByJbRe/Y/9Z1WHdG8kaIHg
+# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-08-29 14:04:20
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Yoult8K/ldH6DMAKURtr3Q
# You can replace this text with custom code or comments, and it will be preserved on regeneration
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index a1cf107a9..761f57b01 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -94,6 +94,12 @@ __PACKAGE__->add_columns(
{ data_type => "text", is_nullable => 1 },
"non_public",
{ data_type => "boolean", default_value => \"false", is_nullable => 1 },
+ "external_source",
+ { data_type => "text", is_nullable => 1 },
+ "external_source_id",
+ { data_type => "text", is_nullable => 1 },
+ "interest_count",
+ { data_type => "integer", is_nullable => 1 },
);
__PACKAGE__->set_primary_key("id");
__PACKAGE__->has_many(
diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm
index 2f426e8ca..f7f88edf0 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm
@@ -310,8 +310,8 @@ sub send_reports {
foreach my $council (@councils) {
my $name = $areas_info->{$council}->{name};
- my $sender = $cobrand->get_council_sender( $council, $areas_info->{$council} );
- $sender = "FixMyStreet::SendReport::$sender";
+ my $sender_info = $cobrand->get_council_sender( $council, $areas_info->{$council}, $row->category );
+ my $sender = "FixMyStreet::SendReport::" . $sender_info->{method};
if ( ! exists $senders->{ $sender } ) {
warn "No such sender [ $sender ] for council $name ( $council )";
@@ -324,7 +324,7 @@ sub send_reports {
$reporters{ $sender }->skipped;
} else {
push @dear, $name;
- $reporters{ $sender }->add_council( $council, $areas_info->{$council} );
+ $reporters{ $sender }->add_council( $council, $areas_info->{$council}, $sender_info->{config} );
}
}