genome / ptero-workflow

Client-facing API for the PTero system
1 stars 6 forks source link

Make DB migrations separate command #190

Closed davidlmorton closed 9 years ago

davidlmorton commented 9 years ago

There are two reasons this would be prefered over the automatic migration setup we now have:

1) the database isn't migrated currently, until the first http request is sent to a web process. This means that you have to wait to find out if the DB migration is going to work properly or not.

2) when the migration fails, it makes it seem as though the request caused the failure and does not log anything useful for debugging. This could be improved without making it a separate command, but will be easier if the migration were a separate command.

I think we should still initialize empty databases, and that should happen at process launch time and not first-request time.

davidlmorton commented 9 years ago

The debugging logging has been improved. Otherwise we won't fix this because it's really convienent to have the migration script run in the exact environment that the service operates in.