Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/Options/Definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports.SchemaOptions = {
keepUnknownIndexes: {
env: 'PARSE_SERVER_SCHEMA_KEEP_UNKNOWN_INDEXES',
help:
'Keep indexes that are not defined in the schema and are present in the database. Set this to true if you are adding indexes manually so that it wont be dropped when you run schema migration',
"(Optional) Keep indexes that are present in the database but not defined in the schema. Set this to `true` if you are adding indexes manually, so that they won't be removed when running schema migration. Default is `false`.",
action: parsers.booleanParser,
default: false,
},
Expand Down Expand Up @@ -1083,6 +1083,11 @@ module.exports.DatabaseOptions = {
action: parsers.booleanParser,
default: false,
},
ignoreUndefined: {
env: 'PARSE_SERVER_DATABASE_IGNORE_UNDEFINED',
help: 'The MongoDB driver option to set whether to ignore undefined values in BSON documents.',
action: parsers.booleanParser,
},
Comment on lines +1086 to +1090
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

I see that ignoreUndefined has been moved here to maintain alphabetical order, which is great for readability. This is likely due to the build script that generates this file. To improve consistency and prevent noisy diffs in the future, it would be beneficial to also reorder the properties within the DatabaseOptions interface in src/Options/index.js to be alphabetical. This would make the source and generated files consistent.

maxPoolSize: {
env: 'PARSE_SERVER_DATABASE_MAX_POOL_SIZE',
help:
Expand Down Expand Up @@ -1124,11 +1129,6 @@ module.exports.DatabaseOptions = {
'The MongoDB driver option to specify the amount of time, in milliseconds, spent attempting to send or receive on a socket before timing out. Specifying 0 means no timeout.',
action: parsers.numberParser('socketTimeoutMS'),
},
ignoreUndefined: {
env: 'PARSE_SERVER_DATABASE_IGNORE_UNDEFINED',
help: 'The MongoDB driver option to set whether to ignore undefined values in BSON documents.',
action: parsers.booleanParser,
},
};
module.exports.AuthAdapter = {
enabled: {
Expand Down
4 changes: 2 additions & 2 deletions src/Options/docs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Options/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface SchemaOptions {
/* Is true if Parse Server will reject any attempts to modify the schema while the server is running.
:DEFAULT: false */
lockSchemas: ?boolean;
/* Keep indexes that are not defined in the schema and are present in the database. Set this to true if you are adding indexes manually so that it wont be dropped when you run schema migration
/* (Optional) Keep indexes that are present in the database but not defined in the schema. Set this to `true` if you are adding indexes manually, so that they won't be removed when running schema migration. Default is `false`.
:DEFAULT: false */
keepUnknownIndexes: ?boolean;
Comment on lines +28 to 30
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This pull request adds the configuration option keepUnknownIndexes, but the implementation that actually uses this option seems to be missing. Without the corresponding logic changes to the schema migration process, this option will have no effect. This is critical for the feature to be complete. Could you please add the implementation?

/* Execute a callback before running schema migrations. */
Expand Down
Loading