replace ensuring schema