module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('registry', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      userId: {
        type: Sequelize.INTEGER,
        references: {
          model: 'users',
          key: 'id'
        },
        allowNull: false,
        onDelete: 'cascade'
      },
      action: {
        type: Sequelize.STRING
      },
      detail: {
        type: Sequelize.TEXT
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      }
    });
  },
  down: queryInterface => {
    return queryInterface.dropTable('registry');
  }
};

@@ -97,17 +97,19 @@
 'registr
-y
+ies
 ', %7B%0A   
@@ -790,17 +790,19 @@
 'registr
-y
+ies
 ');%0A  %7D%0A

rename migration 015-2020-08-18 to create 'registries' instead of 'registry'