DB Schema Management

https://github.com/skeema/skeema

统一控制dev/test/staging/prod等环境的scheme

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$skeema
Skeema is a MySQL schema management tool. It allows you to export a database
schema to the filesystem, and apply online schema changes by modifying files.
Usage:
skeema [<options>] <command>
Commands:
add-environment Add a new named environment to an existing host directory
diff Compare a DB instance's schemas and tables to the filesystem
help Display usage information
init Save a DB instance's schemas and tables to the filesystem
lint Verify table files and reformat them in a standardized way
pull Update the filesystem representation of schemas and tables
push Alter tables on DBs to reflect the filesystem representation
version Display program version

mysql在线alter table设计不同,它是higher level的,底层仍旧需要OSC支持:

1
alter-wrapper="/usr/local/bin/pt-online-schema-change --execute --alter {CLAUSES} D={SCHEMA},t={TABLE},h={HOST},P={PORT},u={USER},p={PASSWORDX}"

References

https://www.percona.com/live/17/sessions/automatic-mysql-schema-management-skeema

Share Comments