diff options
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Contact.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Session.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Token.pm | 18 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/User.pm | 46 |
5 files changed, 42 insertions, 37 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Contact.pm b/perllib/FixMyStreet/DB/Result/Contact.pm index dd5d1f579..5a993a773 100644 --- a/perllib/FixMyStreet/DB/Result/Contact.pm +++ b/perllib/FixMyStreet/DB/Result/Contact.pm @@ -8,6 +8,7 @@ use warnings; use base 'DBIx::Class::Core'; +__PACKAGE__->load_components("FilterColumn"); __PACKAGE__->table("contacts"); __PACKAGE__->add_columns( "area_id", @@ -38,7 +39,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->add_unique_constraint( "contacts_area_id_category_idx", [ "area_id", "category" ] ); -# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-03-21 16:25:05 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zuvUDlmZI74jTjrSCb1RTQ +# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-03-24 17:36:08 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:u6kRlRfgwAiCqmGhj6io5A 1; diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index cc009ee81..bf05bd7bd 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -8,6 +8,7 @@ use warnings; use base 'DBIx::Class::Core'; +__PACKAGE__->load_components("FilterColumn"); __PACKAGE__->table("problem"); __PACKAGE__->add_columns( "id", @@ -80,8 +81,8 @@ __PACKAGE__->belongs_to( { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-03-23 12:42:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hXAYqPHjda6+DoSiQexpEg +# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-03-24 17:36:08 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+a9n7IKg3yFdgxNIbo3SGg =head2 check_for_errors diff --git a/perllib/FixMyStreet/DB/Result/Session.pm b/perllib/FixMyStreet/DB/Result/Session.pm index dd9496d8c..a50c3780b 100644 --- a/perllib/FixMyStreet/DB/Result/Session.pm +++ b/perllib/FixMyStreet/DB/Result/Session.pm @@ -8,6 +8,7 @@ use warnings; use base 'DBIx::Class::Core'; +__PACKAGE__->load_components("FilterColumn"); __PACKAGE__->table("sessions"); __PACKAGE__->add_columns( "id", { data_type => "char", is_nullable => 0, size => 72 }, @@ -16,8 +17,8 @@ __PACKAGE__->add_columns( ); __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07009 @ 2011-03-01 15:43:43 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DrIweLdjIbsiss6MQRZM8A +# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-03-24 17:36:08 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E6SUYbAPJMQSXTrvn0x3kg # You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/perllib/FixMyStreet/DB/Result/Token.pm b/perllib/FixMyStreet/DB/Result/Token.pm index 2bdd8f90b..e4ea7262a 100644 --- a/perllib/FixMyStreet/DB/Result/Token.pm +++ b/perllib/FixMyStreet/DB/Result/Token.pm @@ -8,6 +8,7 @@ use warnings; use base 'DBIx::Class::Core'; +__PACKAGE__->load_components("FilterColumn"); __PACKAGE__->table("token"); __PACKAGE__->add_columns( "scope", @@ -25,8 +26,8 @@ __PACKAGE__->add_columns( ); __PACKAGE__->set_primary_key( "scope", "token" ); -# Created by DBIx::Class::Schema::Loader v0.07009 @ 2011-03-02 16:14:01 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UfM8itc52wy22+YsRKuxmw +# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-03-24 17:36:08 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tClh4Spd63IpCeiGVHfrEQ # Trying not to use this # use mySociety::DBHandle qw(dbh); @@ -52,16 +53,17 @@ ms_current_timestamp. =cut -__PACKAGE__->inflate_column( - 'data', - { - inflate => sub { - my $ser = shift; +__PACKAGE__->filter_column( + data => { + 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); }, - deflate => sub { + filter_to_storage => sub { + my $self = shift; my $data = shift; my $ser = ''; my $h = new IO::String($ser); diff --git a/perllib/FixMyStreet/DB/Result/User.pm b/perllib/FixMyStreet/DB/Result/User.pm index 6f6514902..32361ca48 100644 --- a/perllib/FixMyStreet/DB/Result/User.pm +++ b/perllib/FixMyStreet/DB/Result/User.pm @@ -8,36 +8,36 @@ use warnings; use base 'DBIx::Class::Core'; +__PACKAGE__->load_components("FilterColumn"); __PACKAGE__->table("users"); __PACKAGE__->add_columns( - "id", - { - data_type => "integer", - is_auto_increment => 1, - is_nullable => 0, - sequence => "users_id_seq", - }, - "email", - { data_type => "text", is_nullable => 0 }, - "name", - { data_type => "text", is_nullable => 1 }, - "phone", - { data_type => "text", is_nullable => 1 }, - "password", - { data_type => "text", default_value => "", is_nullable => 0 }, + "id", + { + data_type => "integer", + is_auto_increment => 1, + is_nullable => 0, + sequence => "users_id_seq", + }, + "email", + { data_type => "text", is_nullable => 0 }, + "name", + { data_type => "text", is_nullable => 1 }, + "phone", + { data_type => "text", is_nullable => 1 }, + "password", + { data_type => "text", default_value => "", is_nullable => 0 }, ); __PACKAGE__->set_primary_key("id"); -__PACKAGE__->add_unique_constraint("users_email_key", ["email"]); +__PACKAGE__->add_unique_constraint( "users_email_key", ["email"] ); __PACKAGE__->has_many( - "problems", - "FixMyStreet::DB::Result::Problem", - { "foreign.user_id" => "self.id" }, - { cascade_copy => 0, cascade_delete => 0 }, + "problems", + "FixMyStreet::DB::Result::Problem", + { "foreign.user_id" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, ); - -# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-03-23 12:42:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:z+QRbRAIyy2omaKVfRFTMA +# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-03-24 17:36:08 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:36KVfhjrygEEmpmWm/vZBg use mySociety::EmailUtil; |