mirror of
https://github.com/NixOS/nix
synced 2025-07-01 04:18:00 +02:00
Throw error instead of silently skipping CA migration.
This commit is contained in:
parent
d55e38b98a
commit
8ffeb1c4e5
1 changed files with 6 additions and 2 deletions
|
@ -355,8 +355,12 @@ LocalStore::LocalStore(const Params & params)
|
||||||
|
|
||||||
else openDB(*state, false);
|
else openDB(*state, false);
|
||||||
|
|
||||||
if (!readOnly && experimentalFeatureSettings.isEnabled(Xp::CaDerivations)) {
|
if (experimentalFeatureSettings.isEnabled(Xp::CaDerivations)) {
|
||||||
migrateCASchema(state->db, dbDir + "/ca-schema", globalLock);
|
if (!readOnly) {
|
||||||
|
migrateCASchema(state->db, dbDir + "/ca-schema", globalLock);
|
||||||
|
} else {
|
||||||
|
throw Error("need to migrate to CA schema, but this cannot be done in read-only mode");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Prepare SQL statements. */
|
/* Prepare SQL statements. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue