[MERGED] osmo-hlr[master]: sql: add unique constraints to IMSI and MSISDN

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Feb 1 19:13:27 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: sql: add unique constraints to IMSI and MSISDN
......................................................................


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
---
M sql/hlr.sql
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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

-- 
To view, visit https://gerrit.osmocom.org/1722
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5737106a232e416d67a10634e6270a7a89cf1b05
Gerrit-PatchSet: 3
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list