All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scripts.3.18.0.clientRegistrationProvider-set-environmentId.js Maven / Gradle / Ivy

The newest version!
// Override this variable if you use prefix
const prefix = "";

print(`Add 'environmentId' columns in 'client_registration_providers' table`);

const clientRegistrationProviders = db.getCollection(`${prefix}client_registration_providers`);
clientRegistrationProviders.updateMany({}, { $set: { environmentId: "DEFAULT" } });

print(`Create new indexes in 'client_registration_providers' table`);

clientRegistrationProviders.createIndex({ environmentId: 1 }, { name: "e1" });
clientRegistrationProviders.reIndex();




© 2015 - 2024 Weber Informatics LLC | Privacy Policy