@@ -42,9 +42,9 @@ exports.up = async function (db) {
42
42
for ( const item of activities ) {
43
43
// Which project?
44
44
if ( item . url . startsWith ( '/project/1' ) ) {
45
- promises . push ( createActivityRecord ( item , '588511c4aaecd9001b825604' , nrptiCollection ) ) ;
46
- } else {
47
45
promises . push ( createActivityRecord ( item , '588510cdaaecd9001b815f84' , nrptiCollection ) ) ;
46
+ } else {
47
+ promises . push ( createActivityRecord ( item , '588511c4aaecd9001b825604' , nrptiCollection ) ) ;
48
48
}
49
49
}
50
50
@@ -53,10 +53,10 @@ exports.up = async function (db) {
53
53
case 'Letter' :
54
54
case 'Report' :
55
55
case 'Certificate' :
56
- promises . push ( createCertificateRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
56
+ promises . push ( createCertificateRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
57
57
break ;
58
58
case 'Permit' :
59
- promises . push ( createPermitRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
59
+ promises . push ( createPermitRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
60
60
break ;
61
61
default :
62
62
console . log ( '-------------------' )
@@ -69,21 +69,21 @@ exports.up = async function (db) {
69
69
for ( const item of project1Compliances ) {
70
70
switch ( item . complianceDocumentType ) {
71
71
case 'Inspection' :
72
- promises . push ( createInspectionRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
72
+ promises . push ( createInspectionRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
73
73
break ;
74
74
case 'Memo' :
75
75
case 'Letter' :
76
76
case 'Self Report' :
77
77
case 'Compliance Self-Report' :
78
- promises . push ( createComplianceSelfReportRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
78
+ promises . push ( createComplianceSelfReportRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
79
79
break ;
80
80
case 'Enforcement Action' :
81
81
case 'Order' :
82
- promises . push ( createOrderRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
82
+ promises . push ( createOrderRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
83
83
break ;
84
84
case 'Warning Letter' :
85
85
case 'Warning' :
86
- promises . push ( createWarningRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
86
+ promises . push ( createWarningRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
87
87
break ;
88
88
default :
89
89
console . log ( '-------------------' )
@@ -94,18 +94,18 @@ exports.up = async function (db) {
94
94
}
95
95
96
96
for ( const item of project1Nations ) {
97
- promises . push ( createAgreementRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
97
+ promises . push ( createAgreementRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
98
98
}
99
99
100
100
for ( const item of project1Plans ) {
101
101
switch ( item . complianceDocumentType || item . type ) {
102
102
case 'Construction' :
103
103
case 'Construction Plan' :
104
- promises . push ( createConstructionPlanRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
104
+ promises . push ( createConstructionPlanRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
105
105
break ;
106
106
case 'Management' :
107
107
case 'Management Plan' :
108
- promises . push ( createManagementPlanRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
108
+ promises . push ( createManagementPlanRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
109
109
break ;
110
110
default :
111
111
console . log ( '-------------------' )
@@ -120,10 +120,10 @@ exports.up = async function (db) {
120
120
case 'Letter' :
121
121
case 'Report' :
122
122
case 'Certificate' :
123
- promises . push ( createCertificateRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
123
+ promises . push ( createCertificateRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
124
124
break ;
125
125
case 'Permit' :
126
- promises . push ( createPermitRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
126
+ promises . push ( createPermitRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
127
127
break ;
128
128
default :
129
129
console . log ( '-------------------' )
@@ -136,21 +136,21 @@ exports.up = async function (db) {
136
136
for ( const item of project2Compliances ) {
137
137
switch ( item . complianceDocumentType ) {
138
138
case 'Inspection' :
139
- promises . push ( createInspectionRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
139
+ promises . push ( createInspectionRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
140
140
break ;
141
141
case 'Memo' :
142
142
case 'Letter' :
143
143
case 'Self Report' :
144
144
case 'Compliance Self-Report' :
145
- promises . push ( createComplianceSelfReportRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
145
+ promises . push ( createComplianceSelfReportRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
146
146
break ;
147
147
case 'Enforcement Action' :
148
148
case 'Order' :
149
- promises . push ( createOrderRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
149
+ promises . push ( createOrderRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
150
150
break ;
151
151
case 'Warning Letter' :
152
152
case 'Warning' :
153
- promises . push ( createWarningRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
153
+ promises . push ( createWarningRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
154
154
break ;
155
155
default :
156
156
console . log ( '-------------------' )
@@ -161,19 +161,19 @@ exports.up = async function (db) {
161
161
}
162
162
163
163
for ( const item of project2Nations ) {
164
- promises . push ( createAgreementRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
164
+ promises . push ( createAgreementRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
165
165
}
166
166
167
167
for ( const item of project2Plans ) {
168
168
switch ( item . complianceDocumentType || item . type ) {
169
169
case 'Permit' :
170
170
case 'Construction' :
171
171
case 'Construction Plan' :
172
- promises . push ( createConstructionPlanRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
172
+ promises . push ( createConstructionPlanRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
173
173
break ;
174
174
case 'Management' :
175
175
case 'Management Plan' :
176
- promises . push ( createManagementPlanRecord ( item , '588510cdaaecd9001b815f84 ' , nrptiCollection ) ) ;
176
+ promises . push ( createManagementPlanRecord ( item , '588511c4aaecd9001b825604 ' , nrptiCollection ) ) ;
177
177
break ;
178
178
default :
179
179
console . log ( '-------------------' )
@@ -207,7 +207,7 @@ let createActivityRecord = async function (item, project, nrptiCollection) {
207
207
title : item . title ,
208
208
url : item . url ,
209
209
description : item . description ,
210
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
210
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
211
211
// Prefer to store dates in the DB as ISO, not some random format.
212
212
date : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null
213
213
}
@@ -236,7 +236,7 @@ let createAgreementRecord = async function (item, project, nrptiCollection) {
236
236
// Prefer to store dates in the DB as ISO, not some random format.
237
237
dateIssued : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null ,
238
238
nationName : item . nation ,
239
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
239
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
240
240
documents : documents ,
241
241
242
242
description : item . description ,
@@ -272,7 +272,7 @@ let createAgreementRecord = async function (item, project, nrptiCollection) {
272
272
// Prefer to store dates in the DB as ISO, not some random format.
273
273
dateIssued : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null ,
274
274
nationName : item . nation ,
275
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
275
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
276
276
documents : documents ,
277
277
278
278
dateAdded : new Date ( ) ,
@@ -310,7 +310,7 @@ let createManagementPlanRecord = async function (item, project, nrptiCollection)
310
310
// Prefer to store dates in the DB as ISO, not some random format.
311
311
dateIssued : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null ,
312
312
issuingAgency : item . agency ,
313
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
313
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
314
314
documents : documents ,
315
315
316
316
relatedPhase : item . phase || item . complianceDocumentSubtype ,
@@ -347,7 +347,7 @@ let createManagementPlanRecord = async function (item, project, nrptiCollection)
347
347
// Prefer to store dates in the DB as ISO, not some random format.
348
348
dateIssued : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null ,
349
349
issuingAgency : item . agency ,
350
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
350
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
351
351
documents : documents ,
352
352
353
353
dateAdded : new Date ( ) ,
@@ -385,7 +385,7 @@ let createConstructionPlanRecord = async function (item, project, nrptiCollectio
385
385
// Prefer to store dates in the DB as ISO, not some random format.
386
386
dateIssued : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null ,
387
387
issuingAgency : item . agency ,
388
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
388
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
389
389
documents : documents ,
390
390
391
391
relatedPhase : item . phase || item . complianceDocumentSubtype ,
@@ -423,7 +423,7 @@ let createConstructionPlanRecord = async function (item, project, nrptiCollectio
423
423
dateIssued : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null ,
424
424
issuingAgency : item . agency ,
425
425
documents : documents ,
426
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
426
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
427
427
428
428
dateAdded : new Date ( ) ,
429
429
dateUpdated : new Date ( ) ,
@@ -461,7 +461,7 @@ let createWarningRecord = async function (item, project, nrptiCollection) {
461
461
dateIssued : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null ,
462
462
issuingAgency : item . agency ,
463
463
author : item . author ,
464
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
464
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
465
465
documents : documents ,
466
466
467
467
description : item . description ,
@@ -500,7 +500,7 @@ let createWarningRecord = async function (item, project, nrptiCollection) {
500
500
issuingAgency : item . agency ,
501
501
documents : documents ,
502
502
author : item . author ,
503
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
503
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
504
504
505
505
dateAdded : new Date ( ) ,
506
506
dateUpdated : new Date ( ) ,
@@ -538,7 +538,7 @@ let createComplianceSelfReportRecord = async function (item, project, nrptiColle
538
538
dateIssued : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null ,
539
539
issuingAgency : item . agency ,
540
540
author : item . author ,
541
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
541
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
542
542
documents : documents ,
543
543
544
544
relatedPhase : item . phase ,
@@ -577,7 +577,7 @@ let createComplianceSelfReportRecord = async function (item, project, nrptiColle
577
577
issuingAgency : item . agency ,
578
578
documents : documents ,
579
579
author : item . author ,
580
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
580
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
581
581
582
582
dateAdded : new Date ( ) ,
583
583
dateUpdated : new Date ( ) ,
@@ -615,7 +615,7 @@ let createCertificateRecord = async function (item, project, nrptiCollection) {
615
615
// Prefer to store dates in the DB as ISO, not some random format.
616
616
dateIssued : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null ,
617
617
issuingAgency : item . agency ,
618
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
618
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
619
619
documents : documents ,
620
620
621
621
description : item . description ,
@@ -653,7 +653,7 @@ let createCertificateRecord = async function (item, project, nrptiCollection) {
653
653
dateIssued : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null ,
654
654
issuingAgency : item . agency ,
655
655
documents : documents ,
656
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
656
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
657
657
658
658
dateAdded : new Date ( ) ,
659
659
dateUpdated : new Date ( ) ,
@@ -691,7 +691,7 @@ let createPermitRecord = async function (item, project, nrptiCollection) {
691
691
// Prefer to store dates in the DB as ISO, not some random format.
692
692
dateIssued : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null ,
693
693
issuingAgency : item . agency ,
694
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
694
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
695
695
documents : documents ,
696
696
697
697
description : item . description ,
@@ -729,7 +729,7 @@ let createPermitRecord = async function (item, project, nrptiCollection) {
729
729
dateIssued : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null ,
730
730
issuingAgency : item . agency ,
731
731
documents : documents ,
732
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
732
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
733
733
734
734
dateAdded : new Date ( ) ,
735
735
dateUpdated : new Date ( ) ,
@@ -768,7 +768,7 @@ let createOrderRecord = async function (item, project, nrptiCollection) {
768
768
dateIssued : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null ,
769
769
issuingAgency : item . agency ,
770
770
author : item . author ,
771
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
771
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
772
772
documents : documents ,
773
773
774
774
description : item . description ,
@@ -807,7 +807,7 @@ let createOrderRecord = async function (item, project, nrptiCollection) {
807
807
issuingAgency : item . agency ,
808
808
documents : documents ,
809
809
author : item . author ,
810
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
810
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
811
811
812
812
dateAdded : new Date ( ) ,
813
813
dateUpdated : new Date ( ) ,
@@ -844,7 +844,7 @@ let createInspectionRecord = async function (item, project, nrptiCollection) {
844
844
dateIssued : item . date && moment ( item . date , 'DD-MM-YYYY' ) . toDate ( ) || null ,
845
845
issuingAgency : item . agency ,
846
846
author : item . author ,
847
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
847
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
848
848
documents : documents ,
849
849
850
850
description : item . description ,
@@ -882,7 +882,7 @@ let createInspectionRecord = async function (item, project, nrptiCollection) {
882
882
issuingAgency : item . agency ,
883
883
documents : documents ,
884
884
author : item . author ,
885
- projectName : project === '588511c4aaecd9001b825604' ? 'LNG Canada ' : 'Coastal Gaslink ' ,
885
+ projectName : project === '588511c4aaecd9001b825604' ? 'Coastal Gaslink ' : 'LNG Canada ' ,
886
886
887
887
dateAdded : new Date ( ) ,
888
888
dateUpdated : new Date ( ) ,
0 commit comments