Adding/updating fields

Hi,

I’m trying to apply database changes, but I got this message. How can I make the proper changes to save everything?

Screenshot_333

Fields I’m using:

Screenshot_335

Here’s the code for it as well:

exports.up = function(knex) {
  return knex.schema
.table('users', function (table) {
  table.renameColumn('id', 'user_id');
  table.dropPrimary();
  table.increments('user_id');
  table.string('pass_hash', 255);
  table.string('pass_salt', 15);
  table.string('role', 25);
  table.datetime('most_recent_login');
  table.string('email', 254).alter();
})
};

exports.down = function(knex) {
  return knex.schema
.table('users', function (table) {
  table.renameColumn('user_id', 'id');
  table.increments('id').primary().alter();
  table.dropColumn('pass_hash');
  table.dropColumn('pass_salt');
  table.dropColumn('role');
  table.dropColumn('most_recent_login');
  table.string('email', 50).alter();
})
};
Community Page
Last updated: