Rename database already in production?

After upgrading couchbase-lite-ios, we have started seeing the warning: user.db is not a valid database name, etc.

I understand the reason for disallowing periods, but I don’t see any API for renaming a database.

Is there any alternative to closing the db and renaming the file itself?

Surprisingly no. I guess we never connected the dots between these two actions. There is a way to COPY a database but not rename it. That being said the thing you are renaming is just a folder on the filesystem so renaming it with filesystem APIs should do just fine.

1 Like