Browse code

- realm->domain in version table - Optimized keys of core tables

Jan Janak authored on 25/01/2003 13:26:40
Showing 1 changed files
... ...
@@ -8,6 +8,11 @@
8 8
 #        table definitons
9 9
 # USAGE: call the command without any parameters for info
10 10
 #
11
+# History:
12
+#
13
+# 2003-01-24: Changed realm column of subscriber and pending
14
+#             tables to domain (janakj)
15
+# 2003-01-25: Optimized keys of some core tables (janakj)
11 16
 #
12 17
 
13 18
 #################################################################
... ...
@@ -125,7 +130,7 @@ INSERT INTO version VALUES ( 'active_sessions', '1');
125 130
 INSERT INTO version VALUES ( 'acc', '1');
126 131
 INSERT INTO version VALUES ( 'config', '1');
127 132
 INSERT INTO version VALUES ( 'silo', '1');
128
-INSERT INTO version VALUES ( 'realm', '1');
133
+INSERT INTO version VALUES ( 'domain', '1');
129 134
 INSERT INTO version VALUES ( 'uri', '1');
130 135
 
131 136
 
... ...
@@ -181,7 +186,7 @@ CREATE TABLE aliases (
181 186
   callid varchar(255) default NULL,
182 187
   cseq int(11) default NULL,
183 188
   last_modified timestamp(14) NOT NULL,
184
-  KEY user (user, domain, contact)
189
+  PRIMARY KEY user (user, domain, contact)
185 190
 ) $TABLE_TYPE;
186 191
 
187 192
 
... ...
@@ -198,8 +203,7 @@ CREATE TABLE event (
198 203
   user varchar(50) NOT NULL default '',
199 204
   uri varchar(255) NOT NULL default '',
200 205
   description varchar(255) NOT NULL default '',
201
-  PRIMARY KEY  (id),
202
-  UNIQUE KEY id (id)
206
+  PRIMARY KEY (id)
203 207
 ) $TABLE_TYPE;
204 208
 
205 209
 
... ...
@@ -215,7 +219,8 @@ CREATE TABLE grp (
215 219
   user varchar(50) NOT NULL default '',
216 220
   domain varchar(100) NOT NULL default '',
217 221
   grp varchar(50) NOT NULL default '',
218
-  last_modified datetime NOT NULL default '0000-00-00 00:00:00'
222
+  last_modified datetime NOT NULL default '0000-00-00 00:00:00',
223
+  PRIMARY KEY(user, domain, grp)
219 224
 ) $TABLE_TYPE;
220 225
 
221 226
 
... ...
@@ -235,7 +240,7 @@ CREATE TABLE location (
235 240
   callid varchar(255) default NULL,
236 241
   cseq int(11) default NULL,
237 242
   last_modified timestamp(14) NOT NULL,
238
-  KEY user (user, domain, contact)
243
+  PRIMARY KEY(user, domain, contact)
239 244
 ) $TABLE_TYPE;
240 245
 
241 246
 
... ...
@@ -308,8 +313,7 @@ CREATE TABLE phonebook (
308 313
   fname varchar(32) NOT NULL default '',
309 314
   lname varchar(32) NOT NULL default '',
310 315
   sip_uri varchar(128) NOT NULL default '',
311
-  PRIMARY KEY  (id),
312
-  UNIQUE KEY id (id)
316
+  PRIMARY KEY  (id)
313 317
 ) $TABLE_TYPE;
314 318
 
315 319