summaryrefslogtreecommitdiffstats
path: root/server/migrations/20180717132333-create-client.js
blob: d374b229d8686d31834a1dbf2d6e57b9e247664e (plain) (blame)
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
30
31
'use strict'
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('clients', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      name: {
        type: Sequelize.STRING
      },
      description: {
        type: Sequelize.STRING(2048)
      },
      ip: {
        type: Sequelize.STRING
      },
      mac: {
        type: Sequelize.STRING
      },
      uuid: {
        type: Sequelize.STRING
      }
    })
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('clients')
  }
}