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

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');
};