aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-05-24 15:33:27 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-05-24 15:33:27 +0100
commite1444cafa50b8857bb40049a921bd388684db03f (patch)
tree08821fa7a0b4e8f62e824a8662dab938ecb017eb
parentd9395396a76ce8254fca8637d3bde9e10b7f7564 (diff)
Add InflateColumn::DateTime to all models.
-rwxr-xr-xdb/rerun_dbic_loader.pl2
-rw-r--r--perllib/FixMyStreet/DB/Result/Abuse.pm9
-rw-r--r--perllib/FixMyStreet/DB/Result/Alert.pm6
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm6
-rw-r--r--perllib/FixMyStreet/DB/Result/Contact.pm6
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm4
-rw-r--r--perllib/FixMyStreet/DB/Result/Questionnaire.pm4
-rw-r--r--perllib/FixMyStreet/DB/Result/Session.pm16
-rw-r--r--perllib/FixMyStreet/DB/Result/Token.pm33
-rw-r--r--perllib/FixMyStreet/DB/Result/User.pm6
10 files changed, 49 insertions, 43 deletions
diff --git a/db/rerun_dbic_loader.pl b/db/rerun_dbic_loader.pl
index 7c38fae58..137662026 100755
--- a/db/rerun_dbic_loader.pl
+++ b/db/rerun_dbic_loader.pl
@@ -35,7 +35,7 @@ make_schema_at(
overwrite_modifications => 1, # don't worry that the md5 is wrong
# add in some extra components
- components => ['FilterColumn'],
+ components => [ 'FilterColumn', 'InflateColumn::DateTime' ],
},
FixMyStreet->dbic_connect_info(),
diff --git a/perllib/FixMyStreet/DB/Result/Abuse.pm b/perllib/FixMyStreet/DB/Result/Abuse.pm
index c83e6ef70..df3ebe24a 100644
--- a/perllib/FixMyStreet/DB/Result/Abuse.pm
+++ b/perllib/FixMyStreet/DB/Result/Abuse.pm
@@ -8,13 +8,14 @@ use warnings;
use base 'DBIx::Class::Core';
-__PACKAGE__->load_components("FilterColumn");
+__PACKAGE__->load_components("FilterColumn", "InflateColumn::DateTime");
__PACKAGE__->table("abuse");
-__PACKAGE__->add_columns( "email", { data_type => "text", is_nullable => 0 } );
+__PACKAGE__->add_columns("email", { data_type => "text", is_nullable => 0 });
__PACKAGE__->set_primary_key("email");
-# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-04-15 12:11:26
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:J3vO9UpeoxI19WPRmEaI0w
+
+# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-24 15:32:43
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Bc0deuJiQlKyMGzLTUAIxg
# 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/Alert.pm b/perllib/FixMyStreet/DB/Result/Alert.pm
index 2bfbfa1a8..d780e91fd 100644
--- a/perllib/FixMyStreet/DB/Result/Alert.pm
+++ b/perllib/FixMyStreet/DB/Result/Alert.pm
@@ -8,7 +8,7 @@ use warnings;
use base 'DBIx::Class::Core';
-__PACKAGE__->load_components("FilterColumn");
+__PACKAGE__->load_components("FilterColumn", "InflateColumn::DateTime");
__PACKAGE__->table("alert");
__PACKAGE__->add_columns(
"id",
@@ -52,8 +52,8 @@ __PACKAGE__->belongs_to(
);
-# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-11 14:21:33
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6MMiFASvNi/pG74uxcspuQ
+# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-24 15:32:43
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MV8kPZiQVJH7coYT4FmXLg
# You can replace this text with custom code or comments, and it will be preserved on regeneration
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index 22c0fb444..8b9d1c4d1 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -8,7 +8,7 @@ use warnings;
use base 'DBIx::Class::Core';
-__PACKAGE__->load_components("FilterColumn");
+__PACKAGE__->load_components("FilterColumn", "InflateColumn::DateTime");
__PACKAGE__->table("comment");
__PACKAGE__->add_columns(
"id",
@@ -68,8 +68,8 @@ __PACKAGE__->belongs_to(
);
-# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-20 12:11:12
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3w16OBO6ExapfttNqJzjpA
+# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-24 15:32:43
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:71bSUgPf3uW607g2EGl/Vw
# 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 798edf88f..2b18e0250 100644
--- a/perllib/FixMyStreet/DB/Result/Contact.pm
+++ b/perllib/FixMyStreet/DB/Result/Contact.pm
@@ -8,7 +8,7 @@ use warnings;
use base 'DBIx::Class::Core';
-__PACKAGE__->load_components("FilterColumn");
+__PACKAGE__->load_components("FilterColumn", "InflateColumn::DateTime");
__PACKAGE__->table("contacts");
__PACKAGE__->add_columns(
"id",
@@ -39,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-05-17 14:18:03
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:l1vxwfXLgSjvE+YB/gh7iQ
+# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-24 15:32:43
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8u8S4QtIf0n7QUxVuP/Siw
1;
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index cdfe5a390..8f86bd399 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -100,8 +100,8 @@ __PACKAGE__->has_many(
);
-# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-20 12:11:12
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qY08aYo4JBAg/aVmf/IzqQ
+# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-24 15:32:43
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:U3aYCRwE4etekKaHdhEkIw
=head2 check_for_errors
diff --git a/perllib/FixMyStreet/DB/Result/Questionnaire.pm b/perllib/FixMyStreet/DB/Result/Questionnaire.pm
index e01fc15e7..a36c07535 100644
--- a/perllib/FixMyStreet/DB/Result/Questionnaire.pm
+++ b/perllib/FixMyStreet/DB/Result/Questionnaire.pm
@@ -40,8 +40,8 @@ __PACKAGE__->belongs_to(
);
-# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-20 12:11:12
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6CunhdbfTFdNnjhurkV0Gg
+# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-24 15:32:43
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BAWTYKAQ84VeOI6D2gtQOQ
# You can replace this text with custom code or comments, and it will be preserved on regeneration
diff --git a/perllib/FixMyStreet/DB/Result/Session.pm b/perllib/FixMyStreet/DB/Result/Session.pm
index a50c3780b..a10e6fa0d 100644
--- a/perllib/FixMyStreet/DB/Result/Session.pm
+++ b/perllib/FixMyStreet/DB/Result/Session.pm
@@ -8,17 +8,21 @@ use warnings;
use base 'DBIx::Class::Core';
-__PACKAGE__->load_components("FilterColumn");
+__PACKAGE__->load_components("FilterColumn", "InflateColumn::DateTime");
__PACKAGE__->table("sessions");
__PACKAGE__->add_columns(
- "id", { data_type => "char", is_nullable => 0, size => 72 },
- "session_data", { data_type => "text", is_nullable => 1 },
- "expires", { data_type => "integer", is_nullable => 1 },
+ "id",
+ { data_type => "char", is_nullable => 0, size => 72 },
+ "session_data",
+ { data_type => "text", is_nullable => 1 },
+ "expires",
+ { data_type => "integer", is_nullable => 1 },
);
__PACKAGE__->set_primary_key("id");
-# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-03-24 17:36:08
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E6SUYbAPJMQSXTrvn0x3kg
+
+# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-24 15:32:43
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tYWQtbja2nkA/2A+kaPl1g
# 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 e4ea7262a..d838e9fc2 100644
--- a/perllib/FixMyStreet/DB/Result/Token.pm
+++ b/perllib/FixMyStreet/DB/Result/Token.pm
@@ -8,26 +8,27 @@ use warnings;
use base 'DBIx::Class::Core';
-__PACKAGE__->load_components("FilterColumn");
+__PACKAGE__->load_components("FilterColumn", "InflateColumn::DateTime");
__PACKAGE__->table("token");
__PACKAGE__->add_columns(
- "scope",
- { data_type => "text", is_nullable => 0 },
- "token",
- { data_type => "text", is_nullable => 0 },
- "data",
- { data_type => "bytea", is_nullable => 0 },
- "created",
- {
- data_type => "timestamp",
- default_value => \"ms_current_timestamp()",
- is_nullable => 0,
- },
+ "scope",
+ { data_type => "text", is_nullable => 0 },
+ "token",
+ { data_type => "text", is_nullable => 0 },
+ "data",
+ { data_type => "bytea", is_nullable => 0 },
+ "created",
+ {
+ data_type => "timestamp",
+ default_value => \"ms_current_timestamp()",
+ is_nullable => 0,
+ },
);
-__PACKAGE__->set_primary_key( "scope", "token" );
+__PACKAGE__->set_primary_key("scope", "token");
-# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-03-24 17:36:08
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tClh4Spd63IpCeiGVHfrEQ
+
+# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-24 15:32:43
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ET4L1y6yWmEUDKPKa7wJiw
# Trying not to use this
# use mySociety::DBHandle qw(dbh);
diff --git a/perllib/FixMyStreet/DB/Result/User.pm b/perllib/FixMyStreet/DB/Result/User.pm
index 956deaa56..c2a652dc6 100644
--- a/perllib/FixMyStreet/DB/Result/User.pm
+++ b/perllib/FixMyStreet/DB/Result/User.pm
@@ -8,7 +8,7 @@ use warnings;
use base 'DBIx::Class::Core';
-__PACKAGE__->load_components("FilterColumn");
+__PACKAGE__->load_components("FilterColumn", "InflateColumn::DateTime");
__PACKAGE__->table("users");
__PACKAGE__->add_columns(
"id",
@@ -49,8 +49,8 @@ __PACKAGE__->has_many(
);
-# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-18 10:55:41
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PsK+O4EefB4wywX6VZYNuw
+# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-24 15:32:43
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Vo92xIsCQTLF6lBugzhHcA
use mySociety::EmailUtil;