import { DataTypes } from '@sequelize/core'

export async function up ({ context: queryInterface }) {
    return queryInterface.createTable('pages', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: DataTypes.INTEGER
      },
      title: DataTypes.STRING,
      content: {
        type: DataTypes.STRING
      },
      visible: DataTypes.BOOLEAN,
      slug: {
        type: DataTypes.STRING,
        index: true,
        unique: true
      },      
      createdAt: {
        allowNull: false,
        type: DataTypes.DATE
      },
      updatedAt: {
        allowNull: false,
        type: DataTypes.DATE
      }
    })
  }