migrations

This commit is contained in:
baruffaldi 2021-02-10 18:13:12 +01:00
parent 9b83d35ef4
commit 49b0f11ae7
2 changed files with 14 additions and 14 deletions

View File

@ -6,8 +6,8 @@ const logger = require('../logger').migrate;
*
* @see http://knexjs.org/#Schema
*
* @param {Object} knex
* @param {Promise} Promise
* @param {Object} knex
* @param {Promise} Promise
* @returns {Promise}
*/
exports.up = function (knex/*, Promise*/) {
@ -25,8 +25,8 @@ exports.up = function (knex/*, Promise*/) {
/**
* Undo Migrate
*
* @param {Object} knex
* @param {Promise} Promise
* @param {Object} knex
* @param {Promise} Promise
* @returns {Promise}
*/
exports.down = function (knex/*, Promise*/) {

View File

@ -6,8 +6,8 @@ const logger = require('../logger').migrate;
*
* @see http://knexjs.org/#Schema
*
* @param {Object} knex
* @param {Promise} Promise
* @param {Object} knex
* @param {Promise} Promise
* @returns {Promise}
*/
exports.up = function (knex/*, Promise*/) {
@ -17,16 +17,16 @@ exports.up = function (knex/*, Promise*/) {
return knex.schema.table('redirection_host', (table) => {
table.integer('forward_http_code').notNull().unsigned().defaultTo(302);
})
.then(function () {
logger.info('[' + migrate_name + '] redirection_host Table altered');
});
.then(function () {
logger.info('[' + migrate_name + '] redirection_host Table altered');
});
};
/**
* Undo Migrate
*
* @param {Object} knex
* @param {Promise} Promise
* @param {Object} knex
* @param {Promise} Promise
* @returns {Promise}
*/
exports.down = function (knex/*, Promise*/) {
@ -35,7 +35,7 @@ exports.down = function (knex/*, Promise*/) {
return knex.schema.table('redirection_host', (table) => {
table.dropColumn('forward_http_code');
})
.then(function () {
logger.info('[' + migrate_name + '] redirection_host Table altered');
});
.then(function () {
logger.info('[' + migrate_name + '] redirection_host Table altered');
});
};