From e4113e37c5b69bd9acc3282e5844cf96ae1febc4 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: May 15 2017 07:00:39 +0000 Subject: Skip database upgrades for readonly databases This fixes upgrading setups with readonly plugin databases. Fixes: #273 Merges: #274 Signed-off-by: Patrick Uiterwijk Reviewed-by: Howard Johnson --- diff --git a/ipsilon/util/data.py b/ipsilon/util/data.py index 5266a85..e2c9220 100644 --- a/ipsilon/util/data.py +++ b/ipsilon/util/data.py @@ -860,6 +860,12 @@ class Store(Log): raise NotImplementedError() def upgrade_database(self): + if self.is_readonly: + # If the database is readonly, we cannot do anything to the + # schema. Let's just return, and assume people checked the + # upgrade notes + return + # Do whatever is needed to get schema to current version old_schema_version = self._get_schema_version() if old_schema_version is None: