diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-02-07 19:17:16 +0000 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-02-07 19:17:16 +0000 |
commit | f49a896d6e8f1b83d055fa7f19f709ccdfacbfc6 (patch) | |
tree | 46193a547de62ce56fc8f6b5aa26038ca76c450c /db | |
parent | de2165bd794bd5148f3ff5b68062b7ed284ae446 (diff) |
Make lat, lon NOT NULL
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate_from_osgb36_to_wgs84.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/db/migrate_from_osgb36_to_wgs84.pl b/db/migrate_from_osgb36_to_wgs84.pl index 462061281..7ea8fd419 100644 --- a/db/migrate_from_osgb36_to_wgs84.pl +++ b/db/migrate_from_osgb36_to_wgs84.pl @@ -77,6 +77,11 @@ sub migrate_problem_table { $dbh->commit; # every batch of updates } + print "make latitude, longitude columns not null\n"; + $dbh->do("ALTER TABLE problem ALTER COLUMN $_ SET NOT NULL") + for qw(latitude longitude); + $dbh->commit; + # drop old index, create new one print "drop and create indexes\n"; $dbh->do("DROP INDEX problem_state_easting_northing_idx"); |