Skip to content

Conversation

@MisakaVan
Copy link
Owner

This pull request introduces a comprehensive auditing system for database changes and enhances the script execution framework to support both DDL and trigger scripts. The most significant changes include the addition of an AuditLog table, new triggers for auditing changes in key tables, and updates to the script execution logic to handle triggers separately.

Auditing System Enhancements:

Script Execution Framework Updates:

  • Separation of DDL and Trigger Scripts: Updated the script execution logic to distinguish between DDL scripts (ddl_scripts_dir) and trigger scripts (trigger_scripts_dir), allowing for independent execution. (src/backend/scripts/reset.py, [1]; src/backend/scripts/run_all_ddls.py, [2]

  • New Flags for Script Execution:

    • Added --no-ddl and --no-trigger flags to the main function, enabling selective execution of DDL and trigger scripts. (src/backend/scripts/run_all_ddls.py, [1] [2] [3]
  • Improved Script Handling:

    • Enhanced the execute_sql_script function to support optional splitting of SQL statements, which is useful for handling trigger scripts that require execution as a single block. (src/backend/scripts/run_all_ddls.py, src/backend/scripts/run_all_ddls.pyL12-R49)
    • Updated logging and error handling for better visibility during script execution. (src/backend/scripts/run_all_ddls.py, [1] [2]

@MisakaVan MisakaVan merged commit c2b294d into main May 25, 2025
1 check passed
@MisakaVan MisakaVan deleted the dev/add_trigger branch May 25, 2025 14:13
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