With this command `sls offline start --httpPort 12012 -s local` server is started successfully on local env.

But this command result is error `sls offline migrations --httpPort 12012 -s local`

```
  Serverless Error ---------------------------------------

  "migrations" is not a valid sub command. Run "serverless offline" to see a more helpful error message for this command.

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          linux
     Node Version:              14.4.0
     Framework Version:         1.75.1
     Plugin Version:            3.6.16
     SDK Version:               2.3.1
     Components Version:        2.32.0

```

If I run `serverless migrations up` an error occurs.

```
Serverless: Setting up connections...
Serverless: Looking for pending migrations...
Executing (default): CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE , PRIMARY KEY (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci;
Executing (default): SHOW INDEX FROM `SequelizeMeta`
Executing (default): SELECT `name` FROM `SequelizeMeta` AS `SequelizeMeta` ORDER BY `SequelizeMeta`.`name` ASC;
Serverless: Applying pending migrations...
Executing (default): CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE , PRIMARY KEY (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci;
Executing (default): SHOW INDEX FROM `SequelizeMeta`
Executing (default): SELECT `name` FROM `SequelizeMeta` AS `SequelizeMeta` ORDER BY `SequelizeMeta`.`name` ASC;
Executing (default): CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE , PRIMARY KEY (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci;
Executing (default): SHOW INDEX FROM `SequelizeMeta`
Executing (default): SELECT `name` FROM `SequelizeMeta` AS `SequelizeMeta` ORDER BY `SequelizeMeta`.`name` ASC;
Serverless: Error while applying migrations
Serverless: Looking for migration that has problems...
Executing (default): CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE , PRIMARY KEY (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci;
Executing (default): SHOW INDEX FROM `SequelizeMeta`
Executing (default): SELECT `name` FROM `SequelizeMeta` AS `SequelizeMeta` ORDER BY `SequelizeMeta`.`name` ASC;
Serverless: Something wrong with 20200728165728-init.js

```

Currently, DB is updated by using sequelize sync which sometimes locks tables.

```
import Sequelize from 'sequelize';
import mysql2 from 'mysql2';

const db = new Sequelize(
  process.env.DB_NAME,
  process.env.DB_USERNAME,
  process.env.DB_PASSWORD,
  {
    omitNull: true,
    dialect: process.env.DB_DIALECT,
    dialectModule: mysql2,
    dialectOptions: {
        supportBigNumbers: true
    },
    host: process.env.DB_HOST,
});

let synced = false;
const getSequelize = () => {
    if (!synced) {
        db.sync({ alter: true })
          .then(() => {
              console.log(`Database & tables synchronised!`)
          });

        synced = true;
    }

    return db;
}

export default getSequelize();

```

These are the plugins that are included in the configuration file

```
plugins:
  - serverless-webpack
  - serverless-offline
  - serverless-pseudo-parameters
  - serverless-prune-plugin
  - serverless-sequelize-migrations

```