couchdb-bootstrap
                                
                                 couchdb-bootstrap copied to clipboard
                                
                                    couchdb-bootstrap copied to clipboard
                            
                            
                            
                        Order of operation error
In my bootstrap folder I'm creating a document in _replicator to replicate from one database setup via bootstrap to another database setup via bootstrap. It seems because _replicator comes first alphabetically it's parsed by couchdb-bootstrap first before the other databases are setup. This is causing the replication document created to fail.
The replicator document shows _replication_state is error and _replication_state_reason is
Couldn't open document
_design/myddocnamefrom source databasemodels: {error,<<"not_found">>}
I either have to run setup twice or re-save the replicator document to fix the error.
Hi @cboden, a possible workaround could also be to add create_target:true to the replication document. That way the database will be created if needed. The CouchDB Bootstrap suite only creates the database if it does not exist.
I will have a look at #40. I see your point that system databases should be handled differently.
Unfortunately create_target: true did not work as my replication is filtered. The replicator is looking for the design doc in the source database that does not exist yet.
I see.