Changing editor sql when table is renamed

When a table is renamed, if a sql in the editor is not applied, it should change and apply the default one.