Fixed database migration errors due copy-paste bugs