Skip to content

Commit 2ab5385

Browse files
committed
Merge branch 'bbc-release52' into feat/option-to-disable-buckets
2 parents 36bc39c + 826d602 commit 2ab5385

File tree

1 file changed

+0
-67
lines changed

1 file changed

+0
-67
lines changed

meteor/server/migration/X_X_X.ts

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -310,73 +310,6 @@ export const addSteps = addMigrationSteps(CURRENT_SYSTEM_VERSION, [
310310
}
311311
},
312312
},
313-
314-
{
315-
id: `add studio settings allowHold & allowPieceDirectPlay`,
316-
canBeRunAutomatically: true,
317-
validate: async () => {
318-
const studios = await Studios.findFetchAsync({
319-
$or: [
320-
{ 'settings.allowHold': { $exists: false } },
321-
{ 'settings.allowPieceDirectPlay': { $exists: false } },
322-
],
323-
})
324-
325-
if (studios.length > 0) {
326-
return 'studios must have settings.allowHold and settings.allowPieceDirectPlay defined'
327-
}
328-
329-
return false
330-
},
331-
migrate: async () => {
332-
const studios = await Studios.findFetchAsync({
333-
$or: [
334-
{ 'settings.allowHold': { $exists: false } },
335-
{ 'settings.allowPieceDirectPlay': { $exists: false } },
336-
],
337-
})
338-
339-
for (const studio of studios) {
340-
// Populate the settings to be backwards compatible
341-
await Studios.updateAsync(studio._id, {
342-
$set: {
343-
'settings.allowHold': true,
344-
'settings.allowPieceDirectPlay': true,
345-
},
346-
})
347-
}
348-
},
349-
},
350-
351-
{
352-
id: `add an EnableBuckets option in Studio->Settings`,
353-
canBeRunAutomatically: true,
354-
validate: async () => {
355-
const studios = await Studios.findFetchAsync({
356-
$or: [{ 'settings.enableBuckets': { $exists: false } }],
357-
})
358-
359-
if (studios.length > 0) {
360-
return 'studios needs to have settings.enableBuckets defined'
361-
}
362-
363-
return false
364-
},
365-
migrate: async () => {
366-
const studios = await Studios.findFetchAsync({
367-
$or: [{ 'settings.enableBuckets': { $exists: false } }],
368-
})
369-
370-
for (const studio of studios) {
371-
// In earlier versions buckets was enabled by default:
372-
await Studios.updateAsync(studio._id, {
373-
$set: {
374-
'settings.enableBuckets': true,
375-
},
376-
})
377-
}
378-
},
379-
},
380313
])
381314

382315
interface PartialOldICoreSystem {

0 commit comments

Comments
 (0)