diff options
Diffstat (limited to 'sql/hlr.sql')
-rw-r--r-- | sql/hlr.sql | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/hlr.sql b/sql/hlr.sql index 9ff9867..3c65cd5 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -70,8 +70,17 @@ CREATE TABLE auc_3g ( ind_bitlen INTEGER NOT NULL DEFAULT 5 -- nr of index bits at lower SQN end ); +-- Optional: add subscriber entries to allow or disallow specific RATs (2G or 3G or ...). +-- If a subscriber has no entry, that means that all RATs are allowed (backwards compat). +CREATE TABLE subscriber_rat ( + subscriber_id INTEGER, -- subscriber.id + rat TEXT CHECK(rat in ('GERAN-A', 'UTRAN-Iu')) NOT NULL, -- Radio Access Technology, see enum ran_type + allowed BOOLEAN CHECK(allowed in (0, 1)) NOT NULL DEFAULT 0 +); + CREATE UNIQUE INDEX idx_subscr_imsi ON subscriber (imsi); +CREATE UNIQUE INDEX idx_subscr_rat_flag ON subscriber_rat (subscriber_id, rat); -- Set HLR database schema version number -- Note: This constant is currently duplicated in src/db.c and must be kept in sync! -PRAGMA user_version = 1; +PRAGMA user_version = 2; |