Simultaneous access to 1.4 and 2.0 databases

Can I open 1.4 and 2.x db’s simultaneously in the same app.
Thanks,
nat

No. Couchbase Lite 2.0 requires the CBL DB to be in 2.0 compatible format. If you try to open a 1.4 DB with CBL 2.0 app, the system will automatically attempt to migrate it to 2.0
You can learn about that here :
https://developer.couchbase.com/documentation/mobile/2.0/couchbase-lite/swift.html#migrating-from-1.x-databases

Thanks for the comeback(s).
Now, although the 2.x api will try to migrate the 1.4 db, per docs you outlined, the question is;
Can I somehow use BOTH CBL api’s, 1.4 & 2.x, in the same app? Then I can ‘manually’ migrate the 1.4 db.

You’d have to link both CBL 1.4 and CBL 2.0 into your app, and I can think of some serious problems with doing that. On iOS/Mac you’ll definitely run into class name conflicts. The same may happen in Java or C# if we’ve used the same package name (I don’t know if we have.) There are also serious SQLite problems that can arise if two versions of SQLite are linked into the same binary.

Can you explain why you’d want to manually migrate?

Can I explain? Of course: ForestDB.

Ah, right. There’s been some internal team discussion about that today … maybe you brought it up on another thread?

I don’t know what platform you’re using, but you could work around the link issues by creating a separate executable that links with 1.4, and run it as a background process. Then you just need to rig up a way to send the documents from that process to your main app to insert into the 2.0 database.

Indeed.

Am using Android/Java. [Background process is] Not a bad idea. One app using 1.4 api launches a global background service, and another app with 2.x api receives messages from the service. The message would be the document map and some metadata about it. For this to work , the data would need to be Serializable. We shall see…
Thanks
nat