34 lines
829 B
JavaScript
34 lines
829 B
JavaScript
/**
|
|
* @param { import("knex").Knex } knex
|
|
* @returns { Promise<void> }
|
|
*/
|
|
exports.up = function(knex) {
|
|
return knex.schema
|
|
.alterTable('places', function (table) {
|
|
table.string('country', 2);
|
|
table.string('county');
|
|
table.string('district');
|
|
table.string('city');
|
|
table.string('street');
|
|
table.string('house');
|
|
table.string('postalCode');
|
|
});
|
|
};
|
|
|
|
/**
|
|
* @param { import("knex").Knex } knex
|
|
* @returns { Promise<void> }
|
|
*/
|
|
exports.down = function(knex) {
|
|
return knex.schema
|
|
.alterTable('places', function (table) {
|
|
table.dropColumn('country');
|
|
table.dropColumn('county');
|
|
table.dropColumn('district');
|
|
table.dropColumn('city');
|
|
table.dropColumn('street');
|
|
table.dropColumn('house');
|
|
table.dropColumn('postalCode')
|
|
});
|
|
};
|