From cc785f0c43686c0e9ec523ef5f9330e27a44dba2 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 1 Feb 2017 17:08:56 +0100 Subject: sql: add unique constraints to IMSI and MSISDN Todo for later: table subscriber_multi_msisdn possibly allows duplicating the MSISDN, so we should drop this table or have all MSISDNs in one table separate from 'subscriber'. Change-Id: I5737106a232e416d67a10634e6270a7a89cf1b05 --- sql/hlr.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql') diff --git a/sql/hlr.sql b/sql/hlr.sql index 5a02be3..9238871 100644 --- a/sql/hlr.sql +++ b/sql/hlr.sql @@ -3,9 +3,9 @@ CREATE TABLE subscriber ( id INTEGER PRIMARY KEY, -- Chapter 2.1.1.1 - imsi VARCHAR(15) NOT NULL, + imsi VARCHAR(15) UNIQUE NOT NULL, -- Chapter 2.1.2 - msisdn VARCHAR(15), + msisdn VARCHAR(15) UNIQUE, -- Chapter 2.2.3: Most recent / current IMEI imeisv VARCHAR, -- Chapter 2.4.5 -- cgit v1.2.3