1 PRAGMA journal_mode = PERSIST;
2 PRAGMA user_version = 1;
4 CREATE TABLE IF NOT EXISTS statistics (
5 id INTEGER PRIMARY KEY AUTOINCREMENT,
12 hw_net_protocol_type INT,
18 CREATE TABLE IF NOT EXISTS restrictions (
19 restriction_id INTEGER PRIMARY KEY AUTOINCREMENT,
25 subscriber_id TEXT NOT NULL,
27 data_warn_limit BIGINT,
34 CREATE INDEX IF NOT EXISTS restrictions_index ON restrictions (binpath, iftype, ifname);
36 CREATE TABLE IF NOT EXISTS counters (
37 restriction_id INTEGER NOT NULL,
40 monthly_counter BIGINT,
41 weekly_counter BIGINT,
44 month_start_ts BIGINT,
47 PRIMARY KEY (restriction_id)