propublica / politwoops_sunlight

Politwoops web front end
Other
44 stars 30 forks source link

Migration to fix tweets.id type to big int for new databases #4

Closed modsaid closed 10 years ago

modsaid commented 11 years ago

Currently closing the project and running the migrations will fail because the migrations tries to alter tables who were not created before (by the migrations)... the only way to get the data base up quickly now is to run

rake db:reset

which will use the content of db/schema.rb file to create the schema... the missing part is that the tweets.id will be a regular integer with not enough value to hold the tweets id politwoops-tweet-collector issues #4

this pull requests adds a migration to change the tweets.id type to unsigned bigint so the system gets to work well

dvogel commented 10 years ago

To work around the issue of the schema file being unable to specify the primary key width and the migration timestamps being tied to the schema timestamps, I've added an unfortunate rake task db:fix_mysql_schema that runs after the db:schema:load task. Commit 317648a061e15935c5ae9825548b1813b7a11c9e.