Unfortunately, I couldn't seem to create a migration to revert the fields, so I had to alter the older migration files. This means that if you're using the trunk you need to export your data, delete the database, create it again, run rake db:migrate and then reimport your data. Make sure you backup the whole database first, just in case!
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@261 a4c988fc-2ded-0310-b66e-134b36920a42
Also added some ruby code to the fixture files so that boolean columns will be set correctly depending on database adapter, and also the created_at and other date or datetime fields are set dynamically.
Finally, I also changed the names of the old migration files to match the new naming convention (001_filename.rb, 002_filename.rb etc.)
With the new rake syntax, you can run:
rake db:migrate
to create the tables (for MySQL create the db first, but with sqlite/sqlite3 you just have to list the name in database.yml, but you don't need to create the db itself). Then,
rake db:fixtures:load
if you want some example contents.
I'm HOPING that this fixes#261, #268 and even #205 which I closed because I gave up. I've tested rake db:migrate and rake db:fixtures:load by creating new mysql and sqlite3 databases, and that works fine on my system.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@233 a4c988fc-2ded-0310-b66e-134b36920a42
2006-05-02 21:47:30 +00:00
Renamed from tracks/db/migrate/5_add_project_description.rb (Browse further)