summaryrefslogtreecommitdiff
path: root/lib/migrations/20150504155329-create-users.js
blob: 51e6b29c95ef754f1de44af3a4c5d690bc586ded (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
'use strict'
module.exports = {
  up: function (queryInterface, Sequelize) {
    return queryInterface.createTable('Users', {
      id: {
        type: Sequelize.UUID,
        primaryKey: true,
        defaultValue: Sequelize.UUIDV4
      },
      profileid: {
        type: Sequelize.STRING,
        unique: true
      },
      profile: Sequelize.TEXT,
      history: Sequelize.TEXT,
      createdAt: Sequelize.DATE,
      updatedAt: Sequelize.DATE
    })
  },

  down: function (queryInterface, Sequelize) {
    return queryInterface.dropTable('Users')
  }
}