sealevelresearch/sea-level-api — pull request #89 by paulfurley (2014-09-01 16:31:46+00:00)
Title: Upgrade to Django 1.7c3, new database migrations

Not sure why but this upgrade caused database migrations - I presume the
detection code must have changed slightly. Test this on staging before
deploying to live.

See SQL generated by migrations below.

https://www.pivotaltracker.com/story/show/77381344

```
ALTER TABLE "ea_sea_levels_measurement" DROP CONSTRAINT ea_sea__station_id_767a9cb0976823bb_fk_ea_sea_levels_station_id;
ALTER TABLE "ea_sea_levels_measurement" ADD CONSTRAINT ea_sea__station_id_2d8256dcfaa2ed41_fk_ea_sea_levels_station_id FOREIGN KEY ("station_id") REFERENCES "ea_sea_levels_station" ("id") DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "ea_sea_levels_measurement" ALTER COLUMN "station_id" DROP DEFAULT;
```

```
ALTER TABLE "observations_observation" DROP CONSTRAINT observati_location_id_19ffe42145193167_fk_locations_location_id;
ALTER TABLE "observations_observation" ADD CONSTRAINT observatio_location_id_de975bee529e79b_fk_locations_location_id FOREIGN KEY ("location_id") REFERENCES "locations_location" ("id") DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "observations_observation" ALTER COLUMN "location_id" DROP DEFAULT;
ALTER TABLE "observations_observation" DROP CONSTRAINT observat_minute_id_65e38ffadfdeff28_fk_minute_in_time_minute_id;
ALTER TABLE "observations_observation" ADD CONSTRAINT observat_minute_id_1077ab418540b546_fk_minute_in_time_minute_id FOREIGN KEY ("minute_id") REFERENCES "minute_in_time_minute" ("id") DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "observations_observation" ALTER COLUMN "minute_id" DROP DEFAULT;
```

```
ALTER TABLE "predictions_surgeprediction" DROP CONSTRAINT predicti_minute_id_77fc78cec1f9b455_fk_minute_in_time_minute_id;
ALTER TABLE "predictions_surgeprediction" ADD CONSTRAINT predicti_minute_id_6e45bb2fb97c5aff_fk_minute_in_time_minute_id FOREIGN KEY ("minute_id") REFERENCES "minute_in_time_minute" ("id") DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "predictions_surgeprediction" ALTER COLUMN "minute_id" DROP DEFAULT;
ALTER TABLE "predictions_tideprediction" DROP CONSTRAINT predictio_minute_id_d39ad6e870d5eba_fk_minute_in_time_minute_id;
ALTER TABLE "predictions_tideprediction" ADD CONSTRAINT predicti_minute_id_666b02fefa03a94c_fk_minute_in_time_minute_id FOREIGN KEY ("minute_id") REFERENCES "minute_in_time_minute" ("id") DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "predictions_tideprediction" ALTER COLUMN "minute_id" DROP DEFAULT;
```

```
[empty]
```