text: 'use strict';
  
  module.exports = {
    async up(queryInterface, Sequelize) {
      return await queryInterface.createTable('Categories', {
        id: {
          type: Sequelize.INTEGER,
          allowNull: false,
          autoIncrement: true,
          unique: true,
          primaryKey: true,
        },
        name: {
          allowNull: false,
          type: Sequelize.STRING,
        },
        mpath: {
          allowNull: false,
          type: Sequelize.STRING,
        },
        parentCategoryId: {
          type: Sequelize.INTEGER,
        },
        userId: {
          type: Sequelize.INTEGER,
        },
        createdAt: {
          type: Sequelize.DATE,
          defaultValue: Sequelize.NOW,
        },
        updatedAt: {
          type: Sequelize.DATE,
          defaultValue: Sequelize.NOW,
        },
      });
    },
  
    async down(queryInterface, Sequelize) {
      return await queryInterface.dropTable('Categories');
    },
  };
  