I agree, this kind of thing should only be run with Support on the line, and only after taking full backups of both the root server and the database.
That said, the sql statement
DELETE * FROM WebUI.SCHEMA_VERSION doesn’t look right to me. The SQL’s DELETE statement doesn’t take a ‘*’ parameter.
A SQL delete is more like
DELETE FROM <table> WHERE <condition>
…and anyone who’s accidentally run a DELETE FROM and forgot to put the ‘WHERE’ on the end, can tell you it deletes every record in the table.