-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetup.mongodb
More file actions
45 lines (39 loc) · 894 Bytes
/
Copy pathSetup.mongodb
File metadata and controls
45 lines (39 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// MongoDB Playground
// Use Ctrl+Space inside a snippet or a string literal to trigger completions.
const database = 'BlogProject';
// The current database to use.
use(database);
db.users.drop();
db.users.createIndex({email:1});
db.users.insertMany([
{
"name": "Luffy",
"email": "theKing@sunny.sea",
"password": "iLoveMeat",
"gender": "male",
"role": "admin",
"createdAt": new Date(),
"updatedAt": new Date(),
"__v": 0
},
{
"name": "Zoro",
"email": "im_lost@sunny.sea",
"password": "theBestSamuray",
"gender": "male",
"role": "reader",
"createdAt": new Date(),
"updatedAt": new Date(),
"__v": 0
},
{
"name": "Sanji",
"email": "whos_hungry@sunny.sea",
"password": "nammy&robin",
"gender": "male",
"role": "writer",
"createdAt": new Date(),
"updatedAt": new Date(),
"__v": 0
}
]);