revise migrations and setup views table