summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>2015-05-15 11:59:27 +0200
committerBartlomiej Grzelewski <b.grzelewski@samsung.com>2015-05-19 01:21:59 -0700
commit94cd4b238acc09261439071cf5e7a9be114eee93 (patch)
treebaba930d1411224f4fa6efffcaca71d809abbe39 /data
parent2c86e0b2cd70a09169c59bba5c4e45cc670a4a36 (diff)
downloadkey-manager-94cd4b238acc09261439071cf5e7a9be114eee93.tar.gz
key-manager-94cd4b238acc09261439071cf5e7a9be114eee93.tar.bz2
key-manager-94cd4b238acc09261439071cf5e7a9be114eee93.zip
Add backend id to database scheme
[Issue#] N/A [Feature/Bug] N/A [Problem] N/A [Cause] We have to keep backend id in database. [Solution] Schema updated [Verification] Run migration tests: ckm-tests-internal --run_test=DBCRYPTO_MIGRATION_TEST ckm-tests-internal --run_test=DBCRYPTO_TEST/DBtestBackend Change-Id: Ib33d6c360d655f7c7a01164385e284ec8f759837
Diffstat (limited to 'data')
-rw-r--r--data/scripts/create_schema.sql1
-rw-r--r--data/scripts/migrate_3.sql25
2 files changed, 26 insertions, 0 deletions
diff --git a/data/scripts/create_schema.sql b/data/scripts/create_schema.sql
index 2628d38c..dac4bc0c 100644
--- a/data/scripts/create_schema.sql
+++ b/data/scripts/create_schema.sql
@@ -39,6 +39,7 @@ CREATE TABLE IF NOT EXISTS OBJECTS(exportable INTEGER NOT NULL,
data BLOB NOT NULL,
tag BLOB NOT NULL,
idx INTEGER NOT NULL,
+ backendId INTEGER NOT NULL DEFAULT 1,
FOREIGN KEY(idx) REFERENCES NAMES(idx) ON DELETE CASCADE,
PRIMARY KEY(idx, dataType));
diff --git a/data/scripts/migrate_3.sql b/data/scripts/migrate_3.sql
new file mode 100644
index 00000000..14a63c3a
--- /dev/null
+++ b/data/scripts/migrate_3.sql
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ *
+ *
+ * @file migrate_3.sql
+ * @author Krzysztof Jackiewicz (k.jackiewicz@samsung.com)
+ * @version 1.0
+ * @brief DB migration script from schema version 3 to schema version 4.
+ */
+
+
+-- update schema
+ALTER TABLE NAMES ADD COLUMN backendId INTEGER NOT NULL DEFAULT 1;