Skip to content

Commit b834335

Browse files
committed
remove deprecation warning options
1 parent 0608c95 commit b834335

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

server/migrations/emailConsolidation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ mongoose.connect(mongoConnectionString, {
1818
useNewUrlParser: true,
1919
useUnifiedTopology: true
2020
});
21-
mongoose.set('useCreateIndex', true);
21+
mongoose.set('strictQuery', true);
2222
mongoose.connection.on('error', () => {
2323
console.error(
2424
'MongoDB Connection Error. Please make sure that MongoDB is running.'

server/previewServer.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ const connectToMongoDB = async () => {
2121
try {
2222
await mongoose.connect(mongoConnectionString, {
2323
useNewUrlParser: true,
24-
useUnifiedTopology: true,
25-
useCreateIndex: true,
26-
useFindAndModify: false
24+
useUnifiedTopology: true
2725
});
2826
} catch (error) {
2927
console.error('Failed to connect to MongoDB: ', error);
@@ -33,7 +31,7 @@ const connectToMongoDB = async () => {
3331

3432
connectToMongoDB();
3533

36-
mongoose.set('useCreateIndex', true);
34+
mongoose.set('strictQuery', true);
3735
mongoose.connection.on('error', () => {
3836
console.error(
3937
'MongoDB Connection Error. Please make sure that MongoDB is running.'

server/scripts/examples-gg-latest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ mongoose.connect(mongoConnectionString, {
6363
useNewUrlParser: true,
6464
useUnifiedTopology: true
6565
});
66-
mongoose.set('useCreateIndex', true);
66+
mongoose.set('strictQuery', true);
6767
mongoose.connection.on('error', () => {
6868
console.error(
6969
'MongoDB Connection Error. Please make sure that MongoDB is running.'

server/scripts/examples.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ mongoose.connect(mongoConnectionString, {
1818
useNewUrlParser: true,
1919
useUnifiedTopology: true
2020
});
21-
mongoose.set('useCreateIndex', true);
21+
mongoose.set('strictQuery', true);
2222
mongoose.connection.on('error', () => {
2323
console.error(
2424
'MongoDB Connection Error. Please make sure that MongoDB is running.'

server/server.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,7 @@ const connectToMongoDB = async () => {
156156
try {
157157
await mongoose.connect(mongoConnectionString, {
158158
useNewUrlParser: true,
159-
useUnifiedTopology: true,
160-
useCreateIndex: true,
161-
useFindAndModify: false
159+
useUnifiedTopology: true
162160
});
163161
} catch (error) {
164162
console.error('Failed to connect to MongoDB: ', error);
@@ -168,7 +166,7 @@ const connectToMongoDB = async () => {
168166

169167
connectToMongoDB();
170168

171-
mongoose.set('useCreateIndex', true);
169+
mongoose.set('strictQuery', true);
172170
mongoose.connection.on('error', () => {
173171
console.error(
174172
'MongoDB Connection Error. Please make sure that MongoDB is running.'

0 commit comments

Comments
 (0)