mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
Migrations hotfix
This commit is contained in:
parent
1f122e9145
commit
eb20add0c7
@ -1,5 +1,5 @@
|
||||
const migrate_name = 'redirection_scheme';
|
||||
const logger = require('../logger').migrate;
|
||||
const logger = require('../logger').migrate;
|
||||
|
||||
/**
|
||||
* Migrate
|
||||
@ -15,15 +15,11 @@ exports.up = function (knex, Promise) {
|
||||
logger.info('[' + migrate_name + '] Migrating Up...');
|
||||
|
||||
return knex.schema.table('redirection_host', (table) => {
|
||||
table.string('forward_scheme').notNull().defaultTo("$scheme");
|
||||
})
|
||||
.then(function () {
|
||||
table.string('forward_scheme').notNull().defaultTo('$scheme');
|
||||
})
|
||||
.then(function () {
|
||||
logger.info('[' + migrate_name + '] redirection_host Table altered');
|
||||
});
|
||||
|
||||
logger.info('[' + migrate_name + '] Migrating Up Complete');
|
||||
|
||||
return Promise.resolve(true);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
@ -37,13 +33,9 @@ exports.down = function (knex, Promise) {
|
||||
logger.info('[' + migrate_name + '] Migrating Down...');
|
||||
|
||||
return knex.schema.table('redirection_host', (table) => {
|
||||
table.dropColumn('forward_scheme');
|
||||
})
|
||||
.then(function () {
|
||||
table.dropColumn('forward_scheme');
|
||||
})
|
||||
.then(function () {
|
||||
logger.info('[' + migrate_name + '] redirection_host Table altered');
|
||||
});
|
||||
|
||||
logger.info('[' + migrate_name + '] Migrating Down Complete');
|
||||
|
||||
return Promise.resolve(true);
|
||||
});
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
const migrate_name = 'redirection_status_code';
|
||||
const logger = require('../logger').migrate;
|
||||
const logger = require('../logger').migrate;
|
||||
|
||||
/**
|
||||
* Migrate
|
||||
@ -15,15 +15,11 @@ exports.up = function (knex, Promise) {
|
||||
logger.info('[' + migrate_name + '] Migrating Up...');
|
||||
|
||||
return knex.schema.table('redirection_host', (table) => {
|
||||
table.integer('forward_http_code').notNull().unsigned().defaultTo(302);
|
||||
})
|
||||
.then(function () {
|
||||
table.integer('forward_http_code').notNull().unsigned().defaultTo(302);
|
||||
})
|
||||
.then(function () {
|
||||
logger.info('[' + migrate_name + '] redirection_host Table altered');
|
||||
});
|
||||
|
||||
logger.info('[' + migrate_name + '] Migrating Up Complete');
|
||||
|
||||
return Promise.resolve(true);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
@ -37,13 +33,9 @@ exports.down = function (knex, Promise) {
|
||||
logger.info('[' + migrate_name + '] Migrating Down...');
|
||||
|
||||
return knex.schema.table('redirection_host', (table) => {
|
||||
table.dropColumn('forward_http_code');
|
||||
})
|
||||
.then(function () {
|
||||
table.dropColumn('forward_http_code');
|
||||
})
|
||||
.then(function () {
|
||||
logger.info('[' + migrate_name + '] redirection_host Table altered');
|
||||
});
|
||||
|
||||
logger.info('[' + migrate_name + '] Migrating Down Complete');
|
||||
|
||||
return Promise.resolve(true);
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user