Fix wrong rua_stat_init parameter
[platform/core/appfw/librua.git] / include / db-schema.h
1 /*
2  * Copyright (c) 2000 - 2016 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 #ifndef __RUA_SCHEMA_H__
18 #define __RUA_SCHEMA_H__
19
20 #define CREATE_RUA_HISTORY_TABLE " \
21 PRAGMA journal_mode = PERSIST; \
22 \
23 CREATE TABLE IF NOT EXISTS rua_history ( \
24         id INTEGER PRIMARY KEY, \
25         pkg_name TEXT, \
26         app_path TEXT, \
27         arg TEXT, \
28         launch_time INTEGER \
29 );"
30
31
32 #define CREATE_RUA_STAT_TABLE " \
33 CREATE TABLE if not exists rua_panel_stat ( \
34 caller_panel TEXT NOT NULL, \
35 rua_stat_tag TEXT NOT NULL, \
36 score INTEGER DEFAULT 0, \
37 PRIMARY KEY(rua_stat_tag, caller_panel) \
38 );"
39
40
41 /* table index */
42 enum {
43         RUA_COL_ID = 0x00,
44         RUA_COL_PKGNAME,
45         RUA_COL_APPPATH,
46         RUA_COL_ARG,
47         RUA_COL_LAUNCHTIME
48 };
49
50 enum {
51         RUA_STAT_COL_CALLER_PANEL = 0x00,
52         RUA_STAT_COL_RUA_STAT_TAG,
53         RUA_SATA_COL_SCORE
54 };
55
56
57
58 #endif /* __RUA_SCHEMA_H__ */