summaryrefslogtreecommitdiff
path: root/src/migrations/20211017023049_create_shoe.js
blob: 50f6add728a5db804aa97659a3e67f073a0dfcf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/**
 * Migration: Create shoe table.
 */

exports.up = function (knex) {
  return knex.schema.createTable("shoe", function (table) {
    table.increments("shoe_id").primary().unsigned();
    table.string("shoelace", 16).nullable();
    table.string("shoebox", 16).nullable();
    table.string("type", 16).nullable();
    table.jsonb("metadata").defaultTo({});
    table.timestamp("created_at").defaultTo(knex.fn.now());
  });
};

exports.down = function (knex) {
  return knex.schema.dropTable("shoe");
};