Schema Migration with Bytebase
使用Docker拉起Bytebase,对PG的模式进行版本化管理
公开Demo地址:<http://ddl.pigsty.cc>
默认用户名与密码: admin / pigsty

Bytebase概览
Schema Migrator for PostgreSQL
1. cd app/bytebase; make up
Visit <http://ddl.pigsty> or <http://10.10.10.10:8887>
1. make up # pull up bytebase with docker-compose in minimal mode
2. make run # launch bytebase with docker , local data dir and external PostgreSQL
3. make view # print bytebase access point
4. make log # tail -f bytebase logs
5. make info # introspect bytebase with jq
6. make stop # stop bytebase container
7. make clean # remove bytebase container
8. make pull # pull latest bytebase image
9. make rmi # remove bytebase image
10. make save # save bytebase image to /tmp/bytebase.tgz
11. make load # load bytebase image from /tmp
使用外部的PostgreSQL
Bytebase use its internal PostgreSQL database by default, You can use external PostgreSQL for higher durability.
1. # postgres://dbuser_bytebase:DBUser.Bytebase@10.10.10.10:5432/bytebase
2. db: { name: bytebase, owner: dbuser_bytebase, comment: bytebase primary database }
3. user: { name: dbuser_bytebase , password: DBUser.Bytebase, roles: [ dbrole_admin ] }
if you wish to user an external PostgreSQL, drop monitor extensions and views & pg_repack
1. DROP SCHEMA monitor CASCADE;
2. DROP EXTENSION pg_repack;
After bytebase initialized, you can create them back with /pg/tmp/pg-init-template.sql
1. psql bytebase < /pg/tmp/pg-init-template.sql
Last modified 2022-06-03: add scaffold for en docs (6a6eded)
