Skip to content

Commit

Permalink
MAUI-1064: Change project entity name (#4063)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-pollard authored Aug 8, 2022
1 parent 9ca901c commit c59815d
Showing 1 changed file with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { codeToId, updateValues } from '../utilities';

('use strict');

var dbm;
var type;
var seed;

/**
* We receive the dbmigrate dependency from dbmigrate initially.
* This enables us to not have to rely on NODE_PATH.
*/
exports.setup = function (options, seedLink) {
dbm = options.dbmigrate;
type = dbm.dataType;
seed = seedLink;
};

const PROJECT_CODE = 'covid_samoa';

const NEW_PROJECT_ENTITY_NAME = 'Samoa Health';

exports.up = async function (db) {
const projectEntityId = await codeToId(db, 'entity', PROJECT_CODE);
return updateValues(db, 'entity', { name: NEW_PROJECT_ENTITY_NAME }, { id: projectEntityId });
};

exports.down = function (db) {
return null;
};

exports._meta = {
version: 1,
};

0 comments on commit c59815d

Please sign in to comment.