Skip to content

Commit

Permalink
Merge pull request #2749 from lmcnulty/2024-04_update-gmf-taxonomy
Browse files Browse the repository at this point in the history
Update GMF Taxonomy
  • Loading branch information
lmcnulty authored Apr 30, 2024
2 parents 05d1ba6 + 0d0b693 commit 19e11c4
Show file tree
Hide file tree
Showing 8 changed files with 819 additions and 138 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const config = require('../config');

const { readFile } = require('fs/promises');

/** @type {import('umzug').MigrationFn<any>} */
exports.up = async ({ context: { client } }) => {
await client.connect();

const taxaCollection = client.db(config.realm.production_db.db_name).collection('taxa');

let gmfDescriptionText = await readFile('./taxa/descriptions/gmf.md', 'utf8');

await taxaCollection.updateOne(
{ namespace: 'GMF' },
{ $set: { description: gmfDescriptionText } }
);
};

/** @type {import('umzug').MigrationFn<any>} */
exports.down = async () => {};
Loading

0 comments on commit 19e11c4

Please sign in to comment.