| 12345678910111213141516171819202122232425262728293031323334353637 |
- import { migrate as logger } from "../logger.js";
- const migrateName = "custom_locations";
- /**
- * Migrate
- * Extends proxy_host table with locations field
- *
- * @see http://knexjs.org/#Schema
- *
- * @param {Object} knex
- * @returns {Promise}
- */
- const up = (knex) => {
- logger.info(`[${migrateName}] Migrating Up...`);
- return knex.schema
- .table("proxy_host", (proxy_host) => {
- proxy_host.json("locations");
- })
- .then(() => {
- logger.info(`[${migrateName}] proxy_host Table altered`);
- });
- };
- /**
- * Undo Migrate
- *
- * @param {Object} knex
- * @returns {Promise}
- */
- const down = (_knex) => {
- logger.warn(`[${migrateName}] You can't migrate down this one.`);
- return Promise.resolve(true);
- };
- export { up, down };
|