Resolved bug MRN-719

Rewritten all migrations to named FK
Fixed column types for few migrations from text to string

Change-Id: Ifcf98caaa1b80f73ebf9739ebe7daf4f3206a534
Merge "Resolved bug MRN-719"