SchemaSync - Generate the SQL necessary to migrate the schema of a source database to a target database
SchemaSync 使用方式如下: schemas # source/target format: mysql://user:pass@host:port/database # output format: [_].YYYYMMDD.(patch|revert)[_].sql -h, --help show this help message and exit -V, --version show version and exit. -r, --revision increment the migration script version number if a file with the same name already exists. -a, --sync-auto-inc sync the AUTO_INCREMENT value for each table. -c, --sync-comments sync the COMMENT field for all tables AND columns --tag=TAG tag the migration scripts as _. Valid characters include [A-Za-z0-9-_] --output-directory=OUTPUT_DIRECTORY directory to write the migration scrips. The default is current working directory. Must use absolute path if provided. --log-directory=LOG_DIRECTORY set the directory to write the log to. Must use absolute path if provided. Default is output directory. Log filename is schemasync.log 簡單的說就是帶入來源資料庫位置與目的資料庫位置,SchemaSync 即會連入來源與目的資料庫進行比對,產生對應的腳本檔案。 ...