WRSC / tracking

WRSC boat tracking system with web dashboard
Other
13 stars 7 forks source link

Simplify database migrations? #45

Open takluyver opened 6 years ago

takluyver commented 6 years ago

We have a lot of database migration files. I've just added a few more which bring several columns back in a circle to states they were previously in: coordinates.latitude starts off as decimal*, is deleted, re-added as float, replaced with string, and finally converted back to float.

(* SQLite doesn't have a separate decimal type, so it's treated like float anyway.)

I suspect that we can clear up a lot of these migrations. So far, a new database has been created each year, so we're not working with one huge database which must be preserved. It feels messy to have all these redundant steps run, changing things and changing them back, rather than just setting up a database as the application now wants it.

But I don't know enough about rails or databases to remove them and be confident it won't break anything. I'm hoping that someone will.