-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(migration): add languages to corpora and types to projects * feat(examples): omit projectId from returned examples * chore: remove typo in integration file * test: fix tests * test: fix all test blocks
- Loading branch information
Showing
5 changed files
with
70 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ jobs: | |
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Start MongoDB | ||
uses: supercharge/mongodbw[email protected] | ||
uses: supercharge/mongodb[email protected] | ||
with: | ||
mongodb-version: ${{ matrix.mongodb-version }} | ||
- name: Install Project Dependencies | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module.exports = { | ||
async up(db) { | ||
const collections = ['corpus', 'corpussuggestions']; | ||
return collections.map((collection) => | ||
db.collection(collection).updateMany( | ||
{}, | ||
{ | ||
$set: { languages: [] }, | ||
} | ||
) | ||
); | ||
}, | ||
|
||
async down(db) { | ||
const collections = ['corpus', 'corpussuggestions']; | ||
return collections.map((collection) => | ||
db.collection(collection).updateMany( | ||
{}, | ||
{ | ||
$unset: { languages: null }, | ||
} | ||
) | ||
); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module.exports = { | ||
async up(db) { | ||
const collections = ['projects']; | ||
return collections.map((collection) => | ||
db.collection(collection).updateMany( | ||
{}, | ||
{ | ||
$set: { types: ['TEXT_AUDIO_ANNOTATION'] }, | ||
} | ||
) | ||
); | ||
}, | ||
|
||
async down(db) { | ||
const collections = ['projects']; | ||
return collections.map((collection) => | ||
db.collection(collection).updateMany( | ||
{}, | ||
{ | ||
$unset: { types: null }, | ||
} | ||
) | ||
); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters