mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
migrations
This commit is contained in:
parent
9b83d35ef4
commit
49b0f11ae7
@ -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*/) {
|
||||
|
@ -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');
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user