ForestAdmin/toolbelt

View on GitHub
src/services/schema/update/analyzer/mysql-table-constraints-getter.js

Summary

Maintainability
A
3 hrs
Test Coverage
A
95%

Function MysqlTableConstraintsGetter has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function MysqlTableConstraintsGetter(databaseConnection) {
  const queryInterface = databaseConnection.getQueryInterface();

  // NOTICE: provide an array of array. Each inner array representing a (possibly composite) unique
  //         index
Severity: Minor
Found in src/services/schema/update/analyzer/mysql-table-constraints-getter.js - About 2 hrs to fix

    Function perform has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      this.perform = async table => {
        const replacements = { table, schemaName: queryInterface.sequelize.config.database };
        const query = `
            SELECT DISTINCT
                tableConstraints.constraint_type AS columnType,

      There are no issues that match your filters.

      Category
      Status