dbdiff
dbdiff copied to clipboard
Compares two postgresql or mysql databases and prints SQL commands to modify the first one in order to match the second one
`dbdiff.describeDatabase(conn1) .then((schema) => { console.log(schema) })` prints the schema, but hangs in the terminal
same as https://github.com/gimenete/dbdiff/issues/9 will send a PR when I get around to it if nobody else has
- Installs if needed via CREATE EXTENSION - Updates if needed via UPDATE EXTENSION - Removes if needed via DROP EXTENSION
for ex: this command below is solution after diff. ALTER TABLE `table_name` ADD INDEX `matchID` USING BTREE (`column_text`); but i get error "BLOB/TEXT column {{columnname}} used in key specification without...
Source: TABLE "systemrole" CONSTRAINT "fk474jpkeb2oe23px6stixe16wh" FOREIGN KEY (id) REFERENCES role(id) ON DELETE CASCADE Target: TABLE "systemrole" CONSTRAINT "fk474jpkeb2oe23px6stixe16wh" FOREIGN KEY (id) REFERENCES role(id) Command: dbdiff -l drop $TARGET $SOURCE Result:...