soundcloud/lhm — pull request #44 by durran (2013-07-05 12:45:11+00:00)
Title: Conditional migrations

This allows migrations to supply a filter for the data to be copied over to the new table. The syntax would be like so:

```ruby
Lhm.migrate_data(:permissions, :atomic_switch => false) do |t|
t.filter("inner join tracks on tracks.`id` = permissions.`track_id` and tracks.`public` = 1")
end
```

The filter currently would be applied to the initial copy, but the triggers are currently excluded due to the complexity of having the join in the trigger and the conditions in the trigger would not be the same as the filter that is specified. I think this is acceptable for now, but for some feedback maybe we have to supply 2 sets of conditions - 1 for the copy and 1 for the trigger?