gitmyhub

Archery

Python ★ 6.9k updated 6d ago

SQL 审核查询平台

A web-based platform where developers submit SQL queries for review and approval before they run on production databases, supporting MySQL, PostgreSQL, Oracle, and a dozen more databases through a browser interface.

PythonDjangoMySQLBootstrapjQueryDockersetup: moderatecomplexity 4/5

Archery is a web-based platform for managing and reviewing SQL queries across multiple types of databases. In many engineering teams, database changes go through a review process before they are applied, to catch mistakes or risky operations before they affect production data. Archery provides a central place where developers can submit SQL statements, have them reviewed and approved, and then execute them, all through a browser interface rather than connecting directly to the database.

The platform supports a wide range of databases including MySQL, PostgreSQL, Oracle, SQL Server, MongoDB, Redis, ClickHouse, Elasticsearch, Cassandra, Doris, and several others. The level of support varies by database: MySQL has the most complete feature set, including query execution, review and approval workflows, backup, slow query log analysis, account management, and session monitoring. Other databases support a subset of those features, typically at least querying and execution.

For MySQL specifically, Archery integrates with external tools to provide capabilities like automated SQL review rules (using goInception), index optimization advice (SQLAdvisor), query optimization suggestions (SOAR), and schema synchronization between different MySQL instances. Large table schema changes can be handled with minimal locking using gh-ost or pt-online-schema-change. MySQL binary log parsing is also available, which enables rolling back specific changes after they have been applied.

The application is built with Django on the backend and uses Bootstrap and jQuery for the frontend. It can be deployed with Docker or installed manually. A public demo is available where anyone can log in and try the interface without setting up their own instance.

The README is written primarily in Chinese. The project is open-source under the Apache 2.0 license and was built as an extended version of an earlier tool called archer.

Where it fits