From a4fa58013a97344a4af431c64b471211b020bea0 Mon Sep 17 00:00:00 2001 From: Azul Date: Sat, 11 Jan 2014 19:26:36 +0100 Subject: Revisions sometimes start at 2 - work around this This is an intermediate fix. There's a user record that never had it's database created. The first time it shows up in the changes feed the revision starts with 2-. Not sure why this is. But we loose this user record if we rely on CouchRest::Changes.created which checks for a revision starting with 1-. --- lib/tapicero/user_database.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/tapicero') diff --git a/lib/tapicero/user_database.rb b/lib/tapicero/user_database.rb index 5266b4a..cf43d98 100644 --- a/lib/tapicero/user_database.rb +++ b/lib/tapicero/user_database.rb @@ -9,6 +9,13 @@ module Tapicero @name = name end + def prepare(config) + db.create + db.secure(config.options[:security]) + db.add_design_docs + logger.info "Prepared storage " + name + end + def create retry_request_once "Creating database" do create_db -- cgit v1.2.3