import { DataTypes } from '@sequelize/core'

export function up ({ context: queryInterface }) {
    return queryInterface.createTable('instances', {
      domain: {
        allowNull: false,
        primaryKey: true,
        type: DataTypes.STRING
      },
      name: {
        type: DataTypes.STRING
      },
      blocked: {
        type: DataTypes.BOOLEAN
      },
      data: {
        type: DataTypes.JSON
      },
      createdAt: {
        allowNull: false,
        type: DataTypes.DATE
      },
      updatedAt: {
        allowNull: false,
        type: DataTypes.DATE
      }
    })
  }


export function down ({ context: queryInterface }) {
    return queryInterface.dropTable('instances')
}
