'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('payment', '"createdAt"', {
    type: 'bigint'
  });
};

exports.down = function(db) {
  return db.removeColumn('payment', '"createdAt"');
};

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

@@ -306,32 +306,123 @@
  function(db) %7B%0A
+  return db.runSql('SELECT createdAt FROM payment', (err) =%3E %7B%0A    if (err !== null) %7B%0A    
   return db.addC
@@ -431,33 +431,32 @@
 umn('payment', '
-%22
 createdAt%22', %7B%0A 
@@ -452,14 +452,17 @@
 edAt
-%22
 ', %7B%0A
+    
     
@@ -482,11 +482,26 @@
 '%0A  
+    %7D);%0A    %7D%0A  
 %7D)
-;
 %0A%7D;%0A
@@ -568,17 +568,16 @@
 ment', '
-%22
 createdA
@@ -577,17 +577,16 @@
 reatedAt
-%22
 ');%0A%7D;%0A%0A

Fix error when column exists.