mysqldiff shows difference between database and sql file, sql files and databases.
original mysqldiff is created by @onishi.
mysqldiff get two args , one is "source" and the other is "destination". Schmea has two types:
- database
- sql.file
% mysqldiff "-hlocalhost current" ./sql/newschema.sql
ALTER TABLE sushi ADD COLUMN `freshness` INT NOT NULL AFTER `price`;
CREATE TABLE yakizakana (
id INT UNSIGNED ...,
name VARCHAR(255),
...
)
- database - database
mysqldiff "-hproduction sample" "-hlocalhost sample"
- database - sql file
mysqldiff "-hproduction sample" ./new.sql
- sql file - sql file
mysqldiff ./old.sql ./new.sql
mysqldiff detects one from two shcema type by existance of given file.
- write tests.
- use goroutin/channel to read schemas.