Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- v = Vela::DB.new
- v.src_connection(user: 'root', password: 'pass', host: '127.0.0.1', database: 'testdb', adapter: 'mysql')
- v.dst_connection(user: 'user', password: 'pass', host: '127.0.0.1', database: 'testpdb', adapter: 'postgresql')
- v.dbsync("src_tbl", "dst_tbl") # destination table should already been exist
- # if your destination tables' columns are different than the source table (e.g; clonse `col1` data to m_col1 column):
- v.dbsync("your_src_tbl", "your_dst_tbl", {"col1" => "m_col1", "col2" => "m_col2"}) # you can add as much as column as you want
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement