adding migrations for all tables and fixing models