aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2015-08-19 15:44:02 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2015-08-19 15:46:16 +0100
commitefa106c52e2668715d17b860a8afa71501691185 (patch)
tree510aba995e818f5500b980b2a904a3e790b0b1c8 /bin
parentad81d87a957b5590fbcba3f2325526a9cddcbb7f (diff)
Move "missing" handling to separate column.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/fixmystreet.com/showcouncilrates1
-rwxr-xr-xbin/update-all-reports3
-rwxr-xr-xbin/update-schema1
3 files changed, 2 insertions, 3 deletions
diff --git a/bin/fixmystreet.com/showcouncilrates b/bin/fixmystreet.com/showcouncilrates
index 1dacae597..a3465c575 100755
--- a/bin/fixmystreet.com/showcouncilrates
+++ b/bin/fixmystreet.com/showcouncilrates
@@ -38,7 +38,6 @@ my $stats = dbh()->selectall_arrayref($query, { Slice => {} });
my @councils;
foreach my $row (@$stats) {
if ($row->{council}) {
- $row->{council} =~ s/\|.*//g;
my @council_ids = split(/,/, $row->{council});
push(@councils, @council_ids);
$row->{council} = \@council_ids;
diff --git a/bin/update-all-reports b/bin/update-all-reports
index f6cd34210..0627cedc2 100755
--- a/bin/update-all-reports
+++ b/bin/update-all-reports
@@ -57,8 +57,7 @@ while ( my @problem = $problems->next ) {
$problem{bodies} = 0;
} else {
# Add to bodies it was sent to
- (my $bodies = $problem{bodies_str}) =~ s/\|.*$//;
- @bodies = split( /,/, $bodies );
+ @bodies = split( /,/, $problem{bodies_str} );
$problem{bodies} = scalar @bodies;
}
foreach my $body ( @bodies ) {
diff --git a/bin/update-schema b/bin/update-schema
index 57d1d8ad3..dff2255d5 100755
--- a/bin/update-schema
+++ b/bin/update-schema
@@ -195,6 +195,7 @@ else {
# By querying the database schema, we can see where we're currently at
# (assuming schema change files are never half-applied, which should be the case)
sub get_db_version {
+ return '0035' if column_exists('problem', 'bodies_missing');
return '0034' if ! function_exists('ms_current_timestamp');
return '0033' if ! function_exists('angle_between');
return '0032' if table_exists('moderation_original_data');