Skip to content

Conversation

@Artuomka
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings January 22, 2026 14:21
@Artuomka Artuomka enabled auto-merge January 22, 2026 14:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the AI scan functionality to skip tables that already have settings in the database, avoiding redundant processing. The implementation fetches existing table settings for a connection, filters out tables that already have settings, and only scans new tables.

Changes:

  • Added logic to query existing table settings before scanning
  • Implemented filtering to skip tables with existing settings
  • Added early return when no new tables need scanning

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +37 to +42
connection_id: {
id: connection.id,
},
},
});

Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The query structure for finding table settings by connection_id is incorrect. The where clause uses a nested object structure connection_id: { id: connection.id }, but based on TypeORM's usage patterns in this codebase, it should directly use the connection ID. The correct structure should be where: { connection_id: connection.id } instead. This will likely cause the query to return no results, making the filtering logic ineffective.

Suggested change
connection_id: {
id: connection.id,
},
},
});
connection_id: connection.id,
},
});

Copilot uses AI. Check for mistakes.
@Artuomka Artuomka merged commit af50d73 into main Jan 22, 2026
26 of 27 checks passed
@Artuomka Artuomka deleted the backend_charts branch January 22, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants