/** * Licensed Materials - Property of IBM * IBM Watson Analytics (C) Copyright IBM Corp. 2016 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. * */ /* jshint ignore:start */ if (typeof define !== 'function') { // NOSONAR var define = require('amdefine')(module); // NOSONAR } /* jshint ignore:end */ define([ 'bluebird' ], function(Promise) { 'use strict'; var Upgrade = function() { /** * This is an integer value. The higher the value the higher the version. i.e. 3 < 500 * @type {integer} */ this.VERSION = null; }; /** * This performs a migration from an older version to a newer version * @param {obj} obj - The javascript object to perform migration on * @return {promise} - resolved with the upgraded object */ Upgrade.prototype.up = function (obj) { return Promise.resolve(obj); }; /** * This performs a migration from a newer version to a older version * It is important not to remove any data, otherwise downgrades are not possible * @param {obj} obj - The javascript object to perform migration on * @return {promise} - resolved with the downgraded object */ Upgrade.prototype.down = function (obj) { return Promise.resolve(obj); }; return Upgrade; });