aboutsummaryrefslogtreecommitdiff
path: root/libpod/errors.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-11-29 14:37:35 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-11-30 18:05:56 +0000
commit7eb5ce940c8145ef57920ef90b52857e9716ffc9 (patch)
tree0a9d90a27d87820f8c08c802ad6c0a1859e614fb /libpod/errors.go
parented5d686076b9b01ce5da7ed0bd37faeed216ae75 (diff)
downloadpodman-7eb5ce940c8145ef57920ef90b52857e9716ffc9.tar.gz
podman-7eb5ce940c8145ef57920ef90b52857e9716ffc9.tar.bz2
podman-7eb5ce940c8145ef57920ef90b52857e9716ffc9.zip
Add schema validation to DB
This ensures we don't open a DB with an earlier schema or a config that differs from ours Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #86 Approved by: rhatdan
Diffstat (limited to 'libpod/errors.go')
-rw-r--r--libpod/errors.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpod/errors.go b/libpod/errors.go
index 180ca51db..782104cf0 100644
--- a/libpod/errors.go
+++ b/libpod/errors.go
@@ -59,6 +59,9 @@ var (
// ErrDBClosed indicates that the connection to the state database has
// already been closed
ErrDBClosed = errors.New("database connection already closed")
+ // ErrDBBadConfig indicates that the database has a different schema or
+ // was created by a libpod with a different config
+ ErrDBBadConfig = errors.New("database configuration mismatch")
// ErrNotImplemented indicates that the requested functionality is not
// yet present