Tracks is a GTD™ web application, built with Ruby on Rails https://www.getontracks.org/
Find a file
bsag 6dc32aa83b Updated the migration files so that any updates to rows are done via ruby rather than raw SQL. With any luck at all, this might fix the various problems people encounter when trying to use rake migrate on different databases. At any rate, it should be a lot more portable between databases.
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
tracks Updated the migration files so that any updates to rows are done via ruby rather than raw SQL. With any luck at all, this might fix the various problems people encounter when trying to use rake migrate on different databases. At any rate, it should be a lot more portable between databases. 2006-05-02 21:47:30 +00:00