src/services/schema/update/analyzer/mysql-table-constraints-getter.js
Function MysqlTableConstraintsGetter
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function MysqlTableConstraintsGetter(databaseConnection) {
const queryInterface = databaseConnection.getQueryInterface();
// NOTICE: provide an array of array. Each inner array representing a (possibly composite) unique
// index
Function perform
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.perform = async table => {
const replacements = { table, schemaName: queryInterface.sequelize.config.database };
const query = `
SELECT DISTINCT
tableConstraints.constraint_type AS columnType,