setup database and migrated