hm, actually I think it'll best to remove this SQL. Upgrade is not in the scope of this PR. This is trying to fix one problem but many others are left there.