You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a `cve_dev` database in Compass. The collections will be automatically created when the API starts storing documents.
92
+
Create a `cve_dev` database in Compass.
93
93
94
-
You can populate the database with test data using:
94
+
You can reset the local development database, run pending database migrations, and populate Cve, Cve-Id-Range, Cve-Id, Org, BaseOrg, User, BaseUser, and Glossary seed data using:
95
95
96
96
```sh
97
97
npm run populate:dev
98
98
```
99
99
100
+
To populate without automatically applying versioned migrations, use the following command, then run the migrations manually when ready:
101
+
102
+
```sh
103
+
npm run populate:dev -- --skip-migrations
104
+
npm run db:migrate:dev
105
+
```
106
+
107
+
If the database only needs versioned data migrations without a local data reset, check the migration status and then apply pending migrations:
108
+
109
+
```sh
110
+
npm run db:migrate:status
111
+
npm run db:migrate:dev
112
+
```
113
+
114
+
Migrations are managed by `migrate-mongo` using `migrate-mongo-config.js`. The applied migration records are stored in the `migrations_changelog` collection. Existing `migrate:*` scripts are legacy data sync scripts and are separate from these versioned database migrations.
Copy file name to clipboardExpand all lines: api-docs/openapi.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3906,7 +3906,7 @@
3906
3906
"Registry Organization"
3907
3907
],
3908
3908
"summary": "Updates information about the organization specified by short name (accessible to Secretariat or same-organization Admin)",
3909
-
"description": " <h2>Access Control</h2> <p>User must belong to an organization with the <b>Secretariat</b> role or be an <b>Admin</b> of the requested organization.</p> <p>With Joint Approval required for the following fields:</p> <h2>Expected Behavior</h2> <b>This endpoint expects a full organization object in the request body.</b> <p><b>Secretariat:</b> Updates any organization's information</p> <p><b>Organization Admin:</b> Requests changes to its organization's information</p> <ul> <li>short_name</li> <li>long_name</li> <li>authority</li> <li>aliases</li> <li>oversees</li> <li>top_level_root</li> <li>charter_or_scope</li> <li>product_list</li> <li>disclosure_policy</li> <li>contact_info.websites</li> <li>contact_info.emails</li> <li>contact_info.phone</li> <li>partner_role_type</li> <li>partner_country</li> <li>advisory_locations</li> <li>advisory_location_require_credentials</li> <li>vulnerability_advisory_location_for_web_scraping</li> <li>industry</li> <li>tl_root_start_date</li> <li>is_cna_discussion_list</li> </ul>",
3909
+
"description": " <h2>Access Control</h2> <p>User must belong to an organization with the <b>Secretariat</b> role or be an <b>Admin</b> of the requested organization.</p> <p>With Joint Approval required for the following fields:</p> <h2>Expected Behavior</h2> <b>This endpoint expects a full organization object in the request body.</b> <p><b>Secretariat:</b> Updates any organization's information</p> <p><b>Organization Admin:</b> Requests changes to its organization's information</p> <ul> <li>short_name</li> <li>long_name</li> <li>authority</li> <li>aliases</li> <li>oversees</li> <li>top_level_root</li> <li>is_top_level_root</li> <li>is_last_resort</li> <li>charter_or_scope</li> <li>product_list</li> <li>disclosure_policy</li> <li>contact_info.websites</li> <li>contact_info.emails</li> <li>partner_role_type</li> <li>partner_country</li> <li>advisory_locations</li> <li>advisory_location_require_credentials</li> <li>vulnerability_advisory_location_for_web_scraping</li> <li>industry</li> <li>tl_root_start_date</li> <li>is_cna_discussion_list</li> </ul>",
Copy file name to clipboardExpand all lines: docker/README.md
+16-22Lines changed: 16 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,34 +76,34 @@ If you do not require special configuration to access the internet, you can safe
76
76
77
77
### Pre-load Data
78
78
79
-
Populate mongoDB with test data included in `datadump/pre-population/`
79
+
Populate MongoDB with local development seed data included in `datadump/pre-population/`. This resets the local development database, runs pending database migrations, and populates Cve, Cve-Id-Range, Cve-Id, Org, BaseOrg, User, BaseUser, and Glossary.
80
80
81
-
Run the command below using `populate:dev` or `populate:int` depending on your environment:
81
+
Run the command below for development environments:
2022-06-07 19:58:32 [info]: "Will try to connect to database cve_dev at docdb:27017"
94
91
2022-06-07 19:58:32 [info]: "Successfully connected to database!"
95
-
Are you sure you wish to pre-populate the database for the development environment? Doing so will drop the Cve, Cve-Id-Range, Cve-Id, User, Org collection(s) in the cve_dev database. (y/n) y
92
+
Are you sure you wish to pre-populate the database for the development environment? Doing so will drop and rebuild the database, populate the Org, BaseOrg, User, BaseUser, Glossary collection(s), and run migrations in the cve_dev database. (y/n) y
96
93
94
+
2022-06-07 19:58:37 [info]: "Dropping cve_dev database before population..."
The Mongo-only compose file overrides `GLIBC_TUNABLES` for compatibility with Docker Desktop Linux kernels 6.19 through 7.0.13. MongoDB's default TCMalloc configuration refuses to start on those kernel versions. The override can be removed after all development environments use kernel 7.0.14 or newer.
195
+
202
196
If you already created the local volumes with Mongo 5, Mongo 8 may fail to start against those files. For a fresh Mongo 8 local cluster, remove the Mongo-only volumes first. This deletes local Mongo data for this compose file:
0 commit comments