You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-8Lines changed: 2 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -12,22 +12,16 @@ There is also a WYSIWYG editor available in our [Mintlify dashboard](https://das
12
12
13
13
### Development
14
14
15
-
Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command
16
-
17
-
```
18
-
npm i -g mintlify
19
-
```
20
-
21
15
Run the following command at the root of your documentation (where mint.json is)
22
16
23
17
```
24
-
mintlify dev
18
+
npx mintlify dev
25
19
```
26
20
27
21
Regularly check for broken links by running
28
22
29
23
```
30
-
mintlify broken-links
24
+
npx mintlify broken-links
31
25
```
32
26
33
27
Navigation (and other global settings) is defined in `mint.json`. Learn more about these in [Mintlify's docs](https://mintlify.com/docs/settings/global).
For self-hosted MongoDB, or for creating custom roles on MongoDB Atlas, PowerSync requires the following privileges/granted actions:
369
372
370
-
For self-hosted MongoDB, PowerSync requires the `find`, `changeStream` and `listCollections` permissions on the database being replicated.
373
+
* On the database being replicated: `listCollections`.
374
+
* On all collections in the database: `changeStream`.
375
+
* This must apply to the entire database, not individual collections, `collection: ""`.
376
+
* If replicating from multiple databases, this must apply to the entire cluster, `db: ""`.
377
+
* On each collection being replicated: `find`.
378
+
* On the `_powersync_checkpoints` collection: `createCollection`, `dropCollection`, `find`, `changeStream`, `insert`, `update`, and `remove`.
379
+
* To allow PowerSync to automatically enable [`changeStreamPreAndPostImages`](#post-images) on
380
+
replicated collections, additionally add the `collMod` permission on all replicated collections.
371
381
372
-
PowerSync also requires `createCollection`, `dropCollection`, `insert`, `update`, and `remove` permissions to the `_powersync_checkpoints` collection.
373
382
374
383
### Post-Images
375
384
@@ -381,11 +390,11 @@ PowerSync supports three configuration options for post-images:
381
390
382
391
1.`post_images: off`: Uses `fullDocument: 'updateLookup'` for backwards compatibility. This was the default for older instances. However, this may lead to consistency issues, so we strongly recommend enabling post-images instead.
383
392
384
-
2.`post_images: auto_configure` (Default for new instances): Automatically enables the `changeStreamPreAndPostImages` option on collections as needed.
393
+
2.`post_images: auto_configure` (Default for new instances): Automatically enables the `changeStreamPreAndPostImages` option on collections as needed. Requires the permissions/privileges mentioned above.
385
394
386
395
3.`post_images: read_only`: Uses `fullDocument: 'required'` and requires `changeStreamPreAndPostImages: { enabled: true }` to be set on every collection referenced in Sync Rules. Replication will error if this is not configured. This option is ideal when permissions are restricted.
387
396
388
-
*To manually configure collections for `read_only` mode, run this on each collection:
397
+
To manually configure collections for `read_only` mode, run this on each collection:
389
398
390
399
```js
391
400
db.runCommand( {
@@ -394,7 +403,7 @@ db.runCommand( {
394
403
} )
395
404
```
396
405
397
-
*You can view which collections have the option enabled using:
406
+
You can view which collections have the option enabled using:
0 commit comments