Fixed broken build: migration script code moved to initial setup