contrib/schema: update generator to rewrite imports