db controller and migration