aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/20190609161116_create_updates_table.js
blob: c90e9bd332e1cfd75fac3fe0f42d2c6447658740 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
exports.up = async function(knex, Promise) {
  if (! await knex.schema.hasTable('updates')) {
    await knex.schema.createTable('updates', table => {
      table.string('available_version', 16).nullable();
      table.dateTime('last_checked').nullable();
    });
  }
};

exports.down = async function(knex, Promise) {
  if (await knex.schema.hasTable('updates')) {
    await knex.schema.dropTable('updates');
  }
};