fix: prettier fix
This commit is contained in:
1 parent
78f5ce180b
commit
22bcb74653
1 file changed
+11
-8
@@ -20,17 +20,20 @@ export async function migrateStatusPageTypeToArray(): Promise<void> {
|
||||
}
|
||||
|
||||
// Find all status pages where `type` is a string (not yet migrated)
|
||||
const result = await StatusPageModel.updateMany({
|
||||
$expr: {
|
||||
$eq: [{ $type: "$type" }, "string"], // only scalar string, not existing array
|
||||
}
|
||||
}, [
|
||||
const result = await StatusPageModel.updateMany(
|
||||
{
|
||||
$set: {
|
||||
type: ["$type"],
|
||||
$expr: {
|
||||
$eq: [{ $type: "$type" }, "string"], // only scalar string, not existing array
|
||||
},
|
||||
},
|
||||
]);
|
||||
[
|
||||
{
|
||||
$set: {
|
||||
type: ["$type"],
|
||||
},
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
if (result.modifiedCount === 0) {
|
||||
logger.info({ service: SERVICE_NAME, message: "No StatusPage documents needed migration" });
|
||||
|
||||
Reference in new issue
Block a user