fixed db migration to use integer instead of string for foreign keys