You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
572 B
JavaScript
17 lines
572 B
JavaScript
|
|
exports.up = function(knex, Promise) {
|
|
return knex.schema.createTable('users', function (table) {
|
|
table.increments().primary();
|
|
table.string('name').notNullable();
|
|
table.string('email').notNullable();
|
|
table.string('password').notNullable();
|
|
table.string('about').notNullable();
|
|
table.string('created_at').notNullable().defaultTo(knex.raw('CURRENT_TIMESTAMP'));
|
|
table.timestamp('updated_at').notNullable().defaultTo(knex.raw('CURRENT_TIMESTAMP'));
|
|
})
|
|
};
|
|
|
|
exports.down = function(knex, Promise) {
|
|
return knex.schema.dropTable('users');
|
|
};
|