samlown / couch_tap

CouchDB to RDMS synchroniser. Listens to _changes feed and automatically inserts or updates records.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when following multiple CouchDB sources

awilliams opened this issue · comments

The
Changes#find_or_create_sequence_number will fail if there already exists the couch_sequence table, but the source.name row does not exist. This happens when following changes from multiple CouchDB databases.

I think it should first check for the existence of the source row, and if not found, create the row with seq = 0.