Updates
This commit is contained in:
@@ -91,7 +91,8 @@ export default async function handleDBSchemaTables(
|
||||
schemaTableNames.includes(row.TABLE_NAME) ||
|
||||
!tablesToDrop.includes(row.TABLE_NAME)
|
||||
) {
|
||||
const list = referencedByRemaining.get(row.REFERENCED_TABLE_NAME) || [];
|
||||
const list =
|
||||
referencedByRemaining.get(row.REFERENCED_TABLE_NAME) || [];
|
||||
if (!list.includes(row.TABLE_NAME)) {
|
||||
list.push(row.TABLE_NAME);
|
||||
}
|
||||
@@ -118,6 +119,7 @@ export default async function handleDBSchemaTables(
|
||||
}
|
||||
|
||||
await runSchemaQuery({ query: `SET FOREIGN_KEY_CHECKS = 0`, config });
|
||||
|
||||
try {
|
||||
for (const tableName of safeToDrop) {
|
||||
console.log(`Dropping table: ${tableName}`);
|
||||
|
||||
Reference in New Issue
Block a user