Skip to content

Commit 0c28370

Browse files
committed
style: add missing alignment
1 parent b0acb77 commit 0c28370

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

adminforth/dataConnectors/mysql.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,23 +75,23 @@ class MysqlConnector extends AdminForthBaseConnector implements IAdminForthDataS
7575
}
7676

7777
private async hasPgCascadeFk(tableName: string): Promise<void> {
78-
const [fkResults] = await this.client.execute(
79-
`
80-
SELECT
81-
TABLE_NAME AS child_table,
82-
CONSTRAINT_NAME
83-
FROM information_schema.REFERENTIAL_CONSTRAINTS
84-
WHERE CONSTRAINT_SCHEMA = DATABASE()
85-
AND REFERENCED_TABLE_NAME = ?
86-
AND DELETE_RULE = 'CASCADE'
87-
`,
88-
[tableName]
89-
);
78+
const [fkResults] = await this.client.execute(
79+
`
80+
SELECT
81+
TABLE_NAME AS child_table,
82+
CONSTRAINT_NAME
83+
FROM information_schema.REFERENTIAL_CONSTRAINTS
84+
WHERE CONSTRAINT_SCHEMA = DATABASE()
85+
AND REFERENCED_TABLE_NAME = ?
86+
AND DELETE_RULE = 'CASCADE'
87+
`,
88+
[tableName]
89+
);
9090

91-
for (const fk of fkResults as any[]) {
92-
afLogger.warn(`The database has ON DELETE CASCADE, which may conflict with adminForth cascade deletion and upload logic. Please remove it.`);
91+
for (const fk of fkResults as any[]) {
92+
afLogger.warn(`The database has ON DELETE CASCADE, which may conflict with adminForth cascade deletion and upload logic. Please remove it.`);
93+
}
9394
}
94-
}
9595

9696
async discoverFields(resource) {
9797
const [results] = await this.client.execute("SHOW COLUMNS FROM " + resource.table);

0 commit comments

Comments
 (0)