Added database migration code