reuse from schema editor
(from redmine: issue id 428, created on 2018-01-22tgradl, closed on 2018-01-22)