14 lines
345 B
JavaScript
14 lines
345 B
JavaScript
exports.up = function(knex, Promise) {
|
|
return knex.schema.createTable('countries', function(countries) {
|
|
countries.increments();
|
|
countries
|
|
.string('name', 128)
|
|
.notNullable()
|
|
.unique();
|
|
});
|
|
};
|
|
|
|
exports.down = function(knex, Promise) {
|
|
return knex.schema.dropTableIfExists('countries');
|
|
};
|