dijkstra-backend/data/migrations/20200207155645_countries.js

14 lines
345 B
JavaScript
Raw Normal View History

2020-02-07 16:55:43 +00:00
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');
};