Add initial values support - values to feed the shared database on first startup.
[platform/core/security/key-manager.git] / data / scripts / drop_all.sql
1 /*
2  *  Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *  Licensed under the Apache License, Version 2.0 (the "License");
5  *  you may not use this file except in compliance with the License.
6  *  You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *  Unless required by applicable law or agreed to in writing, software
11  *  distributed under the License is distributed on an "AS IS" BASIS,
12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *  See the License for the specific language governing permissions and
14  *  limitations under the License
15  *
16  *
17  * @file        drop_all.sql
18  * @author      Maciej Karpiuk (m.karpiuk2@samsung.com)
19  * @version     1.0
20  * @brief       DB script to drop all current and historical objects.
21  */
22
23
24 -- drop tables
25 -- SQLite does not provide DROP ALL TABLES construction.
26 -- the SQLite-way is to remove the whole database file,
27 -- which would require expensive changes to the service code
28 -- (re-establishing the DB connection).
29 DROP TABLE IF EXISTS SCHEMA_INFO;
30 DROP TABLE IF EXISTS CKM_TABLE;
31 DROP TABLE IF EXISTS NAME_TABLE;
32 DROP TABLE IF EXISTS KEY_TABLE;
33 DROP TABLE IF EXISTS OBJECT_TABLE;
34 DROP TABLE IF EXISTS PERMISSION_TABLE;
35 DROP TABLE IF EXISTS OLD_PERMISSION_TABLE;
36
37
38 -- drop views
39 DROP VIEW IF EXISTS [join_name_object_tables];
40 DROP VIEW IF EXISTS [join_name_permission_tables];
41 DROP VIEW IF EXISTS [join_all_tables];
42