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

14 lines
345 B
JavaScript
Raw Normal View History

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