# Bytebase
**Repository Path**: mirrors/Bytebase
## Basic Information
- **Project Name**: Bytebase
- **Description**: Bytebase 是一款聚焦在 Database schema change and version control 的工具
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: main
- **Homepage**: https://www.oschina.net/p/bytebase
- **GVP Project**: No
## Statistics
- **Stars**: 107
- **Forks**: 22
- **Created**: 2021-07-12
- **Last Updated**: 2025-05-16
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
⚙️ Install •
📚 Docs •
💬 Discord •
🙋♀️ Book Demo
Different database development tasks
Multiple database systems
Unified process
Single tool
🪜
Change
Want to formalize the database change process but don't know how?
| | |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Standard Operating Procedure (SOP)
Standardize the database schema and data change process across different database systems, small or [large tables](https://docs.bytebase.com/change-database/online-schema-migration-for-mysql) and [different tenants](https://docs.bytebase.com/change-database/batch-change/#change-databases-from-multiple-tenants).
SQL Review
[100+ lint rules](https://docs.bytebase.com/sql-review/review-rules) to detect SQL anti-patterns and enforce consistent SQL style in the organization.
GitOps
[Point-and-click GitHub and GitLab integration](https://docs.bytebase.com/vcs-integration/overview) to enable GitOps workflow for changing database. |
|
🔮
Query
Want to control the data access but don't know how?
| | |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| All-in-one SQL Editor
Web-based IDE specifically for performing SQL specific tasks.
Data Masking
State-of-the-art [column level masking](https://docs.bytebase.com/sql-editor/mask-data) engine to cover complex situations like subquery, CTE.
Data Access Control
Organization level policy to centralize the [database permission](https://docs.bytebase.com/security/database-permission/overview). |
|
🔒
Secure
Want to avoid data leakage, change outage and detect malicious behavior but don't know how?
| | |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- |
| Centralize Change, Query and Admin Tasks
A single place to perform different tasks on different databases, thus enforce policy and monitor activity accordingly.
RBAC
[Two-level RBAC model](https://docs.bytebase.com/concepts/roles-and-permissions) mapping to the organization wide privileges and application team privileges respectively.
Drift detection and Audit Logging
Capture all database schema drifts, user actions and system events and present them in a holistic view. |
|
👩💼
Govern
Want to enforce organization policy but don't know how?
| | |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| Manage Database Resources
A single place to manage environments, database instances, database users for application development, with optional [Terraform integration](https://registry.terraform.io/providers/bytebase/bytebase/latest/docs).
Policy Enforcement
Enforce organization wide SQL Review policy, backup policy and data access policy.
SQL Editor Admin mode
[CLI like experience](https://docs.bytebase.com/sql-editor/admin-mode) without setting up bastion. |
|
# 🖖 Intro
[](https://www.youtube.com/watch?v=7UE78BufSLM)
Bytebase is a Database CI/CD solution for the Developers and DBAs. It's the **only database CI/CD project** included by the [CNCF Landscape](https://landscape.cncf.io/?selected=bytebase) and [Platform Engineering](https://platformengineering.org/tools/bytebase). The Bytebase family consists of these tools:
- [Bytebase Console](https://www.bytebase.com/?source=github): A web-based GUI for developers and DBAs to manage the database development lifecycle.
- [Bytebase API](https://docs.bytebase.com/api/overview): Provide both gRPC and RESTful API to manipulate every aspect of Bytebase.
- [SQL Review GitHub Action](https://github.com/bytebase/sql-review-action): The GitHub Action to detect SQL anti-patterns and enforce a consistent SQL style guide during Pull Request.
- [Terraform Bytebase Provider](https://registry.terraform.io/providers/bytebase/bytebase/latest/docs): The Terraform
provider enables team to manage Bytebase resources via Terraform. A typical setup involves teams using
Terraform to provision database instances from Cloud vendors, followed by using Bytebase provider to
prepare those instances ready for application use.
| | Topic |
| --- | :------------------------------------------------------------------ |
| 🔧 | [Installation](#-installation) |
| 🎮 | [Demo](#-demo) |
| 👩🏫 | [Tutorials](#-tutorials) |
| 💎 | [Design Principles](#-design-principles) |
| 🧩 | [Data Model](#-data-model) |
| 🎭 | [Roles](#-roles) |
| 🕊 | [Developing and Contributing](#-developing-and-contributing) |
| 🤺 | [Bytebase vs Alternatives](#-bytebase-vs-alternatives) |
# 🔧 Installation
- [Docker](https://docs.bytebase.com/get-started/self-host/)
- [Kubernetes](https://docs.bytebase.com/get-started/install/deploy-to-kubernetes)
- [Build from source](https://docs.bytebase.com/get-started/install/build-from-source-code)
# 🎮 Demo
Live demo at https://demo.bytebase.com
You can also [book a 30min product walkthrough](https://cal.com/bytebase/product-walkthrough) with one of
our product experts.
# 👩🏫 Tutorials
Product tutorials are available at https://docs.bytebase.com/tutorials.
## Integrations
- [Manage Supabase PostgreSQL](https://docs.bytebase.com/integrations/supabase)
- [Manage render PostgreSQL](https://docs.bytebase.com/integrations/render)
- [Manage Neon database](https://docs.bytebase.com/integrations/neon)
- [Deploy to sealos](https://docs.bytebase.com/get-started/install/deploy-to-sealos)
- [Deploy to Rainbond](https://docs.bytebase.com/get-started/install/deploy-to-rainbond)
# 💎 Design Principles
| | | |
| --- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 🪶 | Dependency Free | Start with a single command `./bytebase` without any external dependency. External PostgreSQL data store and others are optional. |
| 🔗 | Integration First | Solely focus on database management and leave the rest to others. We have native VCS integration with [GitHub/GitLab](https://docs.bytebase.com/vcs-integration/overview), [Terraform Provider](https://registry.terraform.io/providers/bytebase/bytebase/latest/docs), [webhook](https://docs.bytebase.com/change-database/webhook), and etc. |
| 💂♀️ | Engineering Disciplined | Disciplined [bi-weekly release](https://docs.bytebase.com/changelog) and [engineering practice](https://github.com/bytebase/bytebase/blob/main/docs/life-of-a-feature.md). |
# 🧩 Data Model
More details in [Data Model Doc](https://docs.bytebase.com/concepts/data-model).
# 🎭 Roles
More details in [Roles and Permissions Doc](https://docs.bytebase.com/concepts/roles-and-permissions).
Bytebase employs RBAC (role based access control) and provides two role sets at the workspace and project level:
- Workspace roles: `Admin`, `DBA`, `Member`. The workspace role maps to the role in an organization.
- Project roles: `Owner`, `Developer`, `Releaser`, `SQL Editor User`, `Exporter`, `Viewer`. The project level role maps to the role in a specific team or project.
Every user is assigned a workspace role, and if a particular user is involved in a particular project, then she will also be assigned a project role accordingly.
Below diagram describes a typical mapping between an engineering org and the corresponding roles in the Bytebase workspace
# 🕊 Developing and Contributing
- Bytebase is built with a curated tech stack. It is optimized for **developer experience** and is very easy to start
working on the code:
1. It has no external dependency.
1. It requires zero config.
1. 1 command to start backend and 1 command to start frontend, both with live reload support.
- Interactive code walkthrough
- [Life of a schema change](https://sourcegraph.com/github.com/bytebase/bytebase/-/blob/docs/design/life-of-a-schema-change.snb.md)
- [SQL Review](https://sourcegraph.com/github.com/bytebase/bytebase/-/blob/docs/design/sql-review-source-code-tour.snb.md)
- Follow [Life of a Feature](https://github.com/bytebase/bytebase/blob/main/docs/life-of-a-feature.md).
## Dev Environment Setup
### Prerequisites
- [Go](https://golang.org/doc/install)
- [pnpm](https://pnpm.io/installation)
### Steps
1. Pull source.
```bash
git clone https://github.com/bytebase/bytebase
```
1. Create an external Postgres database on localhost.
```sql
CREATE USER bbdev SUPERUSER;
CREATE DATABASE bbdev;
```
1. Start backend.
```bash
PG_URL=postgresql://bbdev@localhost/bbdev
go build -ldflags "-w -s" -p=16 -o ./bytebase-build/bytebase ./backend/bin/server/main.go && ./bytebase-build/bytebase --port 8080 --data . --debug --disable-sample
```
1. Start frontend (with live reload).
```bash
pnpm --dir frontend i && pnpm --dir frontend dev
```
Bytebase should now be running at http://localhost:3000 and change either frontend or backend code would trigger live reload.
### Tips
- Use [Code Inspector](https://en.inspector.fe-dev.cn/guide/start.html#method1-recommend) to locate
frontend code from UI. Hold `Option + Shift` on Mac or `Alt + Shift` on Windows
# 🤺 Bytebase vs Alternatives
## Bytebase vs Flyway, Liquibase
- [Bytebase vs Liquibase](https://www.bytebase.com/blog/bytebase-vs-liquibase/)
- [Bytebase vs Flyway](https://www.bytebase.com/blog/bytebase-vs-flyway/)
Either Flyway or Liquibase is a library and CLI focusing on schema change. While Bytebase is an one-stop
solution covering the entire database development lifecycle for Developers and DBAs to collaborate through a GUI-based workspace.
Bytebase offers broad database support and provides a more comprehensive platform beyond schema migration, including features for security, governance, and observability. Many of our users tell us Bytebase is by far the best (and sometimes the only) database tool that can support their PostgreSQL and ClickHouse use cases, highlighting our robust tooling across various database systems.
[](https://star-history.com/#bytebase/bytebase&liquibase/liquibase&flyway/flyway&Date)
## Bytebase vs Yearning, Archery
Either Yearning or Archery provides a DBA operation portal. While Bytebase provides a collaboration
workspace for DBAs and Developers, and brings DevOps practice to the Database Change Management (DCM).
Bytebase has the similar `Project` concept seen in GitLab/GitHub and provides native GitOps integration
with GitLab/GitHub.
Another key difference is Yearning, Archery are open source projects maintained by the individuals part-time. While Bytebase is open-sourced, it adopts an open-core model and is a commercialized product, supported
by a [fully staffed team](https://www.bytebase.com/about#team) [releasing new version every 2 weeks](https://docs.bytebase.com/changelog).
[](https://star-history.com/#bytebase/bytebase&cookieY/Yearning&hhyo/Archery&Date)
## Bytebase vs Metabase
Metabase is a data visualization and business intelligence (BI) tool. It's built for data teams and business analysts to make sense of the data.
Bytebase is a database development platform. It's built for the developer teams to perform database operations during the application development lifecycle.
- [Bytebase vs Metabase](https://www.bytebase.com/blog/bytebase-vs-metabase/)
[](https://star-history.com/#bytebase/bytebase&metabase/metabase&Date)
## Bytebase vs CloudBeaver
Both have web-based SQL clients. Additionally, Bytebase offers review workflow, more collaboration and security features.
- [Bytebase vs CloudBeaver](https://www.bytebase.com/blog/bytebase-vs-cloudbeaver/)
[](https://star-history.com/#bytebase/bytebase&dbeaver/cloudbeaver&Date)
## Bytebase vs DBeaver / Navicat
SQL GUI Client such as MySQL Workbench, pgAdmin, DBeaver, Navicat provide a GUI to interact with the database. Bytebase not only provides a GUI client, it can also enforce centralized data access control for data security and governance.
- [Bytebase vs DBeaver](https://www.bytebase.com/blog/bytebase-vs-dbeaver/)
- [Bytebase vs Navicat](https://www.bytebase.com/blog/bytebase-vs-navicat/)
## Bytebase vs Jira
Jira is a general-purpose issue ticketing system. Bytebase is a database domain-specific change management system. Bytebase provides an integrated experience to plan, review, and deploy database changes.
- [Bytebase vs Jira](https://www.bytebase.com/blog/use-jira-for-database-change/)
# 👨👩👧👦 Community
[](https://discord.gg/huyw7gRsyA)
[](https://twitter.com/Bytebase)
# 🤔 Frequently Asked Questions (FAQs)
Check out our [FAQ](https://docs.bytebase.com/faq).
# 🙋 Contact Us
- Interested in joining us? Check out our [jobs page](https://www.bytebase.com/jobs?source=github) for openings.
- Want to solve your schema change and database management headache? Book a [30min demo](https://cal.com/bytebase/product-walkthrough) with one of our product experts.