Rails 4 migration

found bugs:

 - [x] fixed? #201 
 - [x] fixed? #202
 - [x] fixed? #203
 - [x] fixed? #204
 - [ ] fixed? #205
 - [ ] fixed? #206