1. We didn’t actually start the database in irb (sqlite is file based so doesn’t need ‘starting’ like server based databases), we only used irb for the migrations. You can put the migration code into main.rb if you want, but I just prefer to keep it separate as it shouldn’t happen all that often.

2. You can use the auto_upgrade! method instead of auto_migrate! this will keep the current data that is already in your database intact. Be aware though that this could cause problems because the tasks that were already in your database would not have a list_id set, so you’d have to go and manually update this data retrospectively. I often use auto_upgrade! even in development to avoid having to enter data repeatedly, but auto_migrate! is also useful as a way of wiping the database in one swoop.

1. Why did we start the database in irb? Is this standard practice?
2. We wiped the database when we added the new lists feature/model. On a live application i’m sure we wouldn’t want to do this so how would we handle this? As a simple example if we had a list of cities but added a new countries model and wanted to associate cities with countries?
3. I really want to master the Ruby interaction between DataMapper/Slim/Sinatra – are there any resources you can recommend apart from their websites?