diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2009-12-27 15:27:34 +0100 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2010-01-07 10:49:51 +0100 |
commit | 17d4bc8aa9f6d56f06ec280b6f97db2b61d90566 (patch) | |
tree | dced1bbac4c682895e2f8072267ecd9e57c6218a | |
parent | ef24dff2a22c907f08a24b19773dde5ce20ba5d6 (diff) |
db: Don't add a useless 'id' primary key for AuthKeys / AuthTuples
subscriber_id is suitable for this. integer, not null, unique ...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r-- | openbsc/src/db.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/openbsc/src/db.c b/openbsc/src/db.c index 5be47ff64..97989b643 100644 --- a/openbsc/src/db.c +++ b/openbsc/src/db.c @@ -125,14 +125,12 @@ static char *create_stmts[] = { "name TEXT NOT NULL " ")", "CREATE TABLE IF NOT EXISTS AuthKeys (" - "id INTEGER PRIMARY KEY AUTOINCREMENT, " - "subscriber_id INTEGER UNIQUE NOT NULL, " + "subscriber_id INTEGER PRIMARY KEY, " "algorithm_id INTEGER NOT NULL, " "a3a8_ki BLOB " ")", "CREATE TABLE IF NOT EXISTS AuthTuples (" - "id INTEGER PRIMARY KEY AUTOINCREMENT, " - "subscriber_id NUMERIC UNIQUE NOT NULL, " + "subscriber_id INTEGER PRIMARY KEY, " "issued TIMESTAMP NOT NULL, " "use_count INTEGER NOT NULL DEFAULT 0, " "key_seq INTEGER NOT NULL, " |