chore: show constraints query path
This commit is contained in:
parent
130fe22704
commit
f82be2a207
@ -89,7 +89,13 @@ export function patchSequelizeQueryInterface(db: Database) {
|
||||
//@ts-ignore
|
||||
const queryGenerator = db.sequelize.dialect.queryGenerator;
|
||||
|
||||
const originalShowConstraintsQuery = queryGenerator.showConstraintsQuery;
|
||||
|
||||
queryGenerator.showConstraintsQuery = (tableName, constraintName) => {
|
||||
if (!constraintName) {
|
||||
return originalShowConstraintsQuery.call(queryGenerator, tableName, constraintName);
|
||||
}
|
||||
|
||||
const lines = [
|
||||
'SELECT constraint_catalog AS "constraintCatalog",',
|
||||
'constraint_schema AS "constraintSchema",',
|
||||
|
Loading…
Reference in New Issue
Block a user