mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-25 00:11:32 +00:00
Merge pull request #19132 from overleaf/jdt-ai-policy-migration
feat: add migration for adding new policy to all existing groupPolicies GitOrigin-RevId: ea3188b6059c2e96afd0058a191d18b26d68adbd
This commit is contained in:
parent
e0c879bd9a
commit
b0344ec550
2 changed files with 18 additions and 0 deletions
|
@ -61,6 +61,7 @@ async function setupDb() {
|
|||
db.githubSyncUserCredentials = internalDb.collection(
|
||||
'githubSyncUserCredentials'
|
||||
)
|
||||
db.grouppolicies = internalDb.collection('grouppolicies')
|
||||
db.institutions = internalDb.collection('institutions')
|
||||
db.messages = internalDb.collection('messages')
|
||||
db.migrations = internalDb.collection('migrations')
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
exports.tags = ['saas']
|
||||
|
||||
exports.migrate = async client => {
|
||||
const { db } = client
|
||||
await db.grouppolicies.updateMany(
|
||||
{},
|
||||
{ $set: { userCannotUseAIFeatures: true } }
|
||||
)
|
||||
}
|
||||
|
||||
exports.rollback = async client => {
|
||||
const { db } = client
|
||||
await db.grouppolicies.updateMany(
|
||||
{},
|
||||
{ $unset: { userCannotUseAIFeatures: '' } }
|
||||
)
|
||||
}
|
Loading…
Reference in a new issue