forked from opengovsg/FormSG
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit-mongo.js
More file actions
32 lines (30 loc) · 733 Bytes
/
init-mongo.js
File metadata and controls
32 lines (30 loc) · 733 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
/* eslint-disable */
sleep(5000)
conn = new Mongo()
db = conn.getDB('formsg')
db.createCollection('agencies')
// Upsert if not exist
db.agencies.update(
{ shortName: 'govtech' },
{
$setOnInsert: {
shortName: 'govtech',
fullName: 'Government Technology Agency',
logo: 'https://s3-ap-southeast-1.amazonaws.com/agency-logo.form.sg/govtech.jpg',
emailDomain: ['tech.gov.sg', 'data.gov.sg', 'form.sg', 'open.gov.sg'],
},
},
{ upsert: true },
)
db.agencies.update(
{ shortName: 'was' },
{
$setOnInsert: {
shortName: 'was',
fullName: 'Work Allocation Singapore',
logo: 'https://logos.demos.sg/was.svg',
emailDomain: ['was.gov.sg'],
},
},
{ upsert: true },
)