20190109123752_v0.6.11.js
837 Bytes
exports.up = function(knex, Promise) {
return Promise.all([
knex.schema.createTable('login', function(table) {
table.increments();
table.string('username');
table.string('password');
table.boolean('activo');
}).table('VENDEDORES', function(table) {
table.bigInteger('idLogin').unsigned();
}).table('chofer', function(table) {
table.bigInteger('idLogin').unsigned();
})
]);
};
exports.down = function(knex, Promise) {
return Promise.all([
knex.schema
.dropTable('login')
.table('vendedores', function(table) {
table.dropColumn('idLogin');
})
.table('chofer', function(table) {
table.dropColumn('idLogin');
})
]);
};