Creating controller for posts and migrating database