Skip to content

sec(editor): add confirmation modal for destructive DDL and DML operations (DROP, TRUNCATE) #608

Description

@ZhuchkaTriplesix

Motivation & Goal

Prevent accidental data loss and catastrophic schema destruction when executing queries containing destructive DDL or DML statements (DROP DATABASE, DROP TABLE, DROP SCHEMA, TRUNCATE) in the SQL editor.

Proposed Scope

  • Implement an AST/Lexer heuristic in the SQL editor execution pipeline to detect destructive commands (DROP, TRUNCATE).
  • Display a high-visibility confirmation modal requiring explicit user action (e.g. typing the target table/database name or clicking 'Confirm Execution') before sending the statement to the database server.
  • Allow users to toggle or configure strict safety guards per connection (e.g. strict protection on production connections vs demo/local databases).
  • Add unit and widget tests for destructive query detection and confirmation dialog flow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    editorCode/SQL editorenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions