We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa82f2c commit db4de1fCopy full SHA for db4de1f
apps/core/src/migration/version/v9.7.5.ts
@@ -5,6 +5,13 @@ import { defineMigration } from '../helper'
5
const OWNER_UNIQUE_INDEX = 'readers_owner_unique_role'
6
7
export default defineMigration('v9.7.5-owner-uniqueness', async (db: Db) => {
8
+ const collections = await db
9
+ .listCollections({ name: AUTH_JS_USER_COLLECTION })
10
+ .toArray()
11
+ if (collections.length === 0) {
12
+ return
13
+ }
14
+
15
const readers = db.collection(AUTH_JS_USER_COLLECTION)
16
17
await readers.updateMany(
0 commit comments