aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Problem.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-11-30 22:04:33 +0000
committerStruan Donald <struan@exo.org.uk>2011-11-30 22:04:33 +0000
commit0f43cd3b8fbe82256c052aaad65c6a16e3668cbe (patch)
treee80405918a85cb8847d4a4ef3e602ff400cba4f0 /perllib/FixMyStreet/DB/Result/Problem.pm
parentd69c8404b6ca7cc3b92f3fd1d175b000f2f82e08 (diff)
parent783601d101ad0ff356921c2f3af0e8b3b9d6e24e (diff)
Merge branch 'rss-addresses'
Conflicts: db/schema.sql perllib/FixMyStreet/DB/Result/Problem.pm
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm27
1 files changed, 25 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index 9ff19efb6..7ceabf1da 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -82,6 +82,8 @@ __PACKAGE__->add_columns(
{ data_type => "text", is_nullable => 1 },
"flagged",
{ data_type => "boolean", default_value => \"false", is_nullable => 0 },
+ "geocode",
+ { data_type => "bytea", is_nullable => 1 },
);
__PACKAGE__->set_primary_key("id");
__PACKAGE__->has_many(
@@ -104,8 +106,8 @@ __PACKAGE__->has_many(
);
-# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-07-29 16:26:23
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ifvx9FOlbui66hPyzNIAPA
+# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-09-19 14:38:43
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nq8Ufn/SEoDGSrrGlHIxag
# Add fake relationship to stored procedure table
__PACKAGE__->has_one(
@@ -134,6 +136,27 @@ __PACKAGE__->filter_column(
},
}
);
+
+__PACKAGE__->filter_column(
+ geocode => {
+ filter_from_storage => sub {
+ my $self = shift;
+ my $ser = shift;
+ return undef unless defined $ser;
+ my $h = new IO::String($ser);
+ return RABX::wire_rd($h);
+ },
+ filter_to_storage => sub {
+ my $self = shift;
+ my $data = shift;
+ my $ser = '';
+ my $h = new IO::String($ser);
+ RABX::wire_wr( $data, $h );
+ return $ser;
+ },
+ }
+);
+
use DateTime::TimeZone;
use Image::Size;
use Moose;