summaryrefslogblamecommitdiffstats
path: root/server/migrations/20180715193710-create-backend.js
blob: 18b324be48fb78024a87f6f5c877bd7b6ddd13d7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
            















                                                   



                                     
                   



                                     
                    





                                     
       
      

                                        
                                               
   
 
'use strict'
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('backends', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      name: {
        type: Sequelize.STRING
      },
      type: {
        type: Sequelize.STRING
      },
      credentials: {
        allowNull: false,
        type: Sequelize.STRING(2048),
        defaultValue: '[]'
      },
      groupTypes: {
        allowNull: false,
        type: Sequelize.STRING(4096),
        defaultValue: '[]'
      },
      clientTypes: {
        allowNull: false,
        type: Sequelize.STRING(4096),
        defaultValue: '[]'
      },
      sync: {
        type: Sequelize.STRING(1024)
      }
    })
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('backends')
  }
}