Sri | Fixing upsert and emptyMigrations sql