Skip to content

Commit

Permalink
Merge pull request #111 from nmcharlton/tag-uuid
Browse files Browse the repository at this point in the history
feat: add uuid to tag
  • Loading branch information
dadiorchen authored Dec 9, 2022
2 parents 3517ca2 + db2f580 commit 4d5a790
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions main/migrations/20221129195412-AddUuidToTag.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
'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;
};

exports.up = function(db) {
return db.addColumn('tag', 'uuid', { type: 'uuid', defaultValue: new String('uuid_generate_v4()')});
};

exports.down = function(db) {
return db.removeColumn('tag', 'uuid');
};

exports._meta = {
"version": 1
};

0 comments on commit 4d5a790

Please sign in to comment.