Skip to content

Commit

Permalink
fix: add created_at to wallet table
Browse files Browse the repository at this point in the history
  • Loading branch information
ZavenArra committed Oct 7, 2021
1 parent c170940 commit 769bc63
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions database/migrations/20211007223144-AddCreatedAtWallet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
'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('wallet', 'created_at', {
type: 'timestamp',
notNull: true,
defaultValue: new String('now()')
});
};

exports.down = function(db) {
return db.removeColumn('wallet', 'created_at');
};

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

0 comments on commit 769bc63

Please sign in to comment.