Hermes
Database synchronisation tool for MySQL
Usage
Select a source and destination table. The source table needs to contain a timestamp column which gets updated on each modification (common practice). e.g
(id int auto_increment not null primary key,data_1 varchar(30) not null,data_2 int,data_3 int,lastUpdated timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP););
You will need a 'lastSync' table to control the synchronisation.
(id int auto_increment not null primary key,tableName varchar(100) not null unique,lastSync timestamp);
Now you just need to setup the tables.
var Hermes = ;// Create source tablevar source =;// Create dest tablevar dest =;// configure column mappingdestconfigmapping =dest: "identifierField1"src: "identifierField"id: truedest: "dataField1"src: "dataField"dest: "dataField2"src: "name";// connect to MySQLsource;dest;
After creating the tables, you can get a Readable or Writable stream - so you can pipe() them.
source;