Lambda-School-Labs/allay-be

View on GitHub
data/migrations/20200420172059_users_table.js

Summary

Maintainability
A
0 mins
Test Coverage
exports.up = function (knex) {
  return knex.schema.alterTable('users', tbl => {
    tbl.boolean('admin').notNullable().defaultTo(false);
    tbl.boolean('blocked').notNullable().defaultTo(false);
  });
};
exports.down = function (knex) {
  return knex.schema.alterTable('users', tbl => {
    tbl.dropColumn('blocked');
    tbl.dropColumn('admin');
  });
};