summaryrefslogtreecommitdiff
path: root/migrations/20170628233613_createFiles.js
blob: 65319791864424cce924075dd1b2de849671088a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
exports.up = function(knex, Promise) {
  return knex.schema.createTable('files', function (table) {
    table.increments()
    table.integer('folder_id')
    table.string('username')
    table.string('name')
    table.string('url')
    table.string('mime')
    table.string('datatype')
    table.float('duration')
    table.text('analysis')
    table.integer('size')
    table.integer('stars').defaultTo(0)
    table.string('activity')
    table.string('module')
    table.string('checkpoint')
    table.string('dataset')
    table.integer('epoch')
    table.boolean('processed')
    table.boolean('generated')
    table.json('opt')
    table.timestamps()
  })
};

exports.down = function(knex, Promise) {
  return knex.schema.dropTable('files')
};