Remove gcov rpm
[platform/core/connectivity/stc-manager.git] / res / traffic_db.sql
1 PRAGMA journal_mode = PERSIST;
2 PRAGMA user_version = 1;
3
4 CREATE TABLE IF NOT EXISTS statistics (
5   id INTEGER PRIMARY KEY AUTOINCREMENT,
6   binpath TEXT NOT NULL,
7   received BIGINT,
8   sent BIGINT,
9   time_stamp BIGINT,
10   iftype INT,
11   is_roaming INT,
12   hw_net_protocol_type INT,
13   ifname TEXT,
14   subscriber_id TEXT,
15   ground INT
16 );
17
18 CREATE TABLE IF NOT EXISTS restrictions (
19   restriction_id INTEGER PRIMARY KEY AUTOINCREMENT,
20   binpath TEXT,
21   iftype INT,
22   ifname TEXT,
23   rstn_type INT,
24   roaming INT,
25   subscriber_id TEXT NOT NULL,
26   data_limit BIGINT,
27   data_warn_limit BIGINT,
28   monthly_limit BIGINT,
29   weekly_limit BIGINT,
30   daily_limit BIGINT,
31   month_start_date INT
32 );
33
34 CREATE INDEX IF NOT EXISTS restrictions_index ON restrictions (binpath, iftype, ifname);
35
36 CREATE TABLE IF NOT EXISTS counters (
37   restriction_id INTEGER NOT NULL,
38   data_counter BIGINT,
39   warn_counter BIGINT,
40   monthly_counter BIGINT,
41   weekly_counter BIGINT,
42   daily_counter BIGINT,
43   month_start_date INT,
44   month_start_ts BIGINT,
45   week_start_ts BIGINT,
46   day_start_ts BIGINT,
47   PRIMARY KEY (restriction_id)
48 );