Advertisement
Guest User

Untitled

a guest
Apr 15th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. v = Vela::DB.new
  2. v.src_connection(user: 'root', password: 'pass', host: '127.0.0.1', database: 'testdb', adapter: 'mysql')
  3. v.dst_connection(user: 'user', password: 'pass', host: '127.0.0.1', database: 'testpdb', adapter: 'postgresql')
  4. v.dbsync("src_tbl", "dst_tbl") # destination table should already been exist
  5.  
  6. # if your destination tables' columns are different than the source table (e.g; clonse `col1` data to m_col1 column):
  7. 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