Browse code

stable changes (alignment of columns sizes and acc indexes) projected to dev

Jiri Kuthan authored on 15/08/2003 01:07:37
Showing 1 changed files
... ...
@@ -140,7 +140,7 @@ EOF
140 140
 # read realm
141 141
 prompt_realm() 
142 142
 {
143
-	printf "Domain (realm) for the default user 'admin': "
143
+	printf "Doamin (realm) for the default user 'admin': "
144 144
 	read SIP_DOMAIN
145 145
 	echo
146 146
 }
... ...
@@ -158,7 +158,6 @@ credentials()
158 158
 		echo "HA1B calculation failed"
159 159
 		exit 1
160 160
 	fi
161
-
162 161
 }
163 162
 
164 163
 ser_create () # pars: <database name> [<no_init_user>]
... ...
@@ -248,11 +247,12 @@ CREATE TABLE acc (
248 247
   to_uri varchar(128) NOT NULL default '',
249 248
   sip_callid varchar(128) NOT NULL default '',
250 249
   $USERCOL varchar(64) NOT NULL default '',
251
-  domain varchar(100) NOT NULL default '',
250
+  domain varchar(128) NOT NULL default '',
252 251
   fromtag varchar(128) NOT NULL default '',
253 252
   totag varchar(128) NOT NULL default '',
254 253
   time datetime NOT NULL default '0000-00-00 00:00:00',
255
-  timestamp timestamp(14) NOT NULL
254
+  timestamp timestamp(14) NOT NULL,
255
+  INDEX acc_user ($USERCOL, domain)
256 256
 ) $TABLE_TYPE;
257 257
 
258 258
 
... ...
@@ -279,8 +279,8 @@ CREATE TABLE active_sessions (
279 279
 #
280 280
 
281 281
 CREATE TABLE aliases (
282
-  $USERCOL varchar(50) NOT NULL default '',
283
-  domain varchar(100) NOT NULL default '',
282
+  $USERCOL varchar(64) NOT NULL default '',
283
+  domain varchar(128) NOT NULL default '',
284 284
   contact varchar(255) NOT NULL default '',
285 285
   expires datetime default NULL,
286 286
   q float(10,2) default NULL,
... ...
@@ -301,8 +301,8 @@ CREATE TABLE aliases (
301 301
 
302 302
 CREATE TABLE event (
303 303
   id int(10) unsigned NOT NULL auto_increment,
304
-  $USERCOL varchar(50) NOT NULL default '',
305
-  domain varchar(100) NOT NULL default '',
304
+  $USERCOL varchar(64) NOT NULL default '',
305
+  domain varchar(128) NOT NULL default '',
306 306
   uri varchar(255) NOT NULL default '',
307 307
   description varchar(255) NOT NULL default '',
308 308
   PRIMARY KEY (id)
... ...
@@ -318,8 +318,8 @@ CREATE TABLE event (
318 318
 
319 319
 
320 320
 CREATE TABLE grp (
321
-  $USERCOL varchar(50) NOT NULL default '',
322
-  domain varchar(100) NOT NULL default '',
321
+  $USERCOL varchar(64) NOT NULL default '',
322
+  domain varchar(128) NOT NULL default '',
323 323
   grp varchar(50) NOT NULL default '',
324 324
   last_modified datetime NOT NULL default '0000-00-00 00:00:00',
325 325
   PRIMARY KEY($USERCOL, domain, grp)
... ...
@@ -334,8 +334,8 @@ CREATE TABLE grp (
334 334
 
335 335
 
336 336
 CREATE TABLE location (
337
-  $USERCOL varchar(50) NOT NULL default '',
338
-  domain varchar(100) NOT NULL default '',
337
+  $USERCOL varchar(64) NOT NULL default '',
338
+  domain varchar(128) NOT NULL default '',
339 339
   contact varchar(255) NOT NULL default '',
340 340
   expires datetime default NULL,
341 341
   q float(10,2) default NULL,
... ...
@@ -367,11 +367,12 @@ CREATE TABLE missed_calls (
367 367
   to_uri varchar(128) NOT NULL default '',
368 368
   sip_callid varchar(128) NOT NULL default '',
369 369
   $USERCOL varchar(64) NOT NULL default '',
370
-  domain varchar(100) NOT NULL default '',
370
+  domain varchar(128) NOT NULL default '',
371 371
   fromtag varchar(128) NOT NULL default '',
372 372
   totag varchar(128) NOT NULL default '',
373 373
   time datetime NOT NULL default '0000-00-00 00:00:00',
374
-  timestamp timestamp(14) NOT NULL
374
+  timestamp timestamp(14) NOT NULL,
375
+  INDEX mc_user ($USERCOL, domain)
375 376
 ) $TABLE_TYPE;
376 377
 
377 378
 
... ...
@@ -385,8 +386,8 @@ CREATE TABLE missed_calls (
385 386
 
386 387
 CREATE TABLE pending (
387 388
   phplib_id varchar(32) NOT NULL default '',
388
-  $USERCOL varchar(100) NOT NULL default '',
389
-  domain varchar(100) NOT NULL default '',
389
+  $USERCOL varchar(64) NOT NULL default '',
390
+  domain varchar(128) NOT NULL default '',
390 391
   password varchar(25) NOT NULL default '',
391 392
   first_name varchar(25) NOT NULL default '',
392 393
   last_name varchar(45) NOT NULL default '',
... ...
@@ -418,8 +419,8 @@ CREATE TABLE pending (
418 419
 
419 420
 CREATE TABLE phonebook (
420 421
   id int(10) unsigned NOT NULL auto_increment,
421
-  $USERCOL varchar(50) NOT NULL default '',
422
-  domain varchar(100) NOT NULL default '',
422
+  $USERCOL varchar(64) NOT NULL default '',
423
+  domain varchar(128) NOT NULL default '',
423 424
   fname varchar(32) NOT NULL default '',
424 425
   lname varchar(32) NOT NULL default '',
425 426
   sip_uri varchar(128) NOT NULL default '',
... ...
@@ -436,7 +437,7 @@ CREATE TABLE phonebook (
436 437
 
437 438
 
438 439
 CREATE TABLE reserved (
439
-  $USERCOL char(100) NOT NULL default '',
440
+  $USERCOL char(64) NOT NULL default '',
440 441
   UNIQUE KEY user2(username)
441 442
 ) $TABLE_TYPE;
442 443
 
... ...
@@ -450,8 +451,8 @@ CREATE TABLE reserved (
450 451
 
451 452
 CREATE TABLE subscriber (
452 453
   phplib_id varchar(32) NOT NULL default '',
453
-  $USERCOL varchar(100) NOT NULL default '',
454
-  domain varchar(100) NOT NULL default '',
454
+  $USERCOL varchar(64) NOT NULL default '',
455
+  domain varchar(128) NOT NULL default '',
455 456
   password varchar(25) NOT NULL default '',
456 457
   first_name varchar(25) NOT NULL default '',
457 458
   last_name varchar(45) NOT NULL default '',
... ...
@@ -479,8 +480,8 @@ CREATE TABLE subscriber (
479 480
 CREATE TABLE config (
480 481
    attribute varchar(32) NOT NULL,
481 482
    value varchar(128) NOT NULL,
482
-   $USERCOL varchar(100) NOT NULL default '',
483
-   domain varchar(100) NOT NULL default '',
483
+   $USERCOL varchar(64) NOT NULL default '',
484
+   domain varchar(128) NOT NULL default '',
484 485
    modified timestamp(14)
485 486
 ) $TABLE_TYPE;
486 487
 
... ...
@@ -503,7 +504,7 @@ CREATE TABLE silo(
503 504
 #
504 505
 
505 506
 CREATE TABLE domain (
506
-  domain varchar(50) NOT NULL default '',
507
+  domain varchar(128) NOT NULL default '',
507 508
   last_modified datetime NOT NULL default '0000-00-00 00:00:00',
508 509
   PRIMARY KEY  (domain)
509 510
 ) $TABLE_TYPE;
... ...
@@ -513,8 +514,8 @@ CREATE TABLE domain (
513 514
 # Table structure for table 'uri' -- uri user parts users are allowed to use
514 515
 #
515 516
 CREATE TABLE uri (
516
-  $USERCOL varchar(50) NOT NULL default '',
517
-  domain varchar(50) NOT NULL default '',
517
+  $USERCOL varchar(64) NOT NULL default '',
518
+  domain varchar(128) NOT NULL default '',
518 519
   uri_user varchar(50) NOT NULL default '',
519 520
   last_modified datetime NOT NULL default '0000-00-00 00:00:00',
520 521
   PRIMARY KEY ($USERCOL, domain, uri_user)
... ...
@@ -537,12 +538,13 @@ CREATE TABLE server_monitoring (
537 538
 
538 539
 
539 540
 CREATE TABLE preferences (
540
-  $USERCOL varchar(50) NOT NULL default '',
541
-  domain varchar(100) NOT NULL default '',
541
+  $USERCOL varchar(64) NOT NULL default '',
542
+  domain varchar(128) NOT NULL default '',
542 543
   attribute varchar(50) NOT NULL default '',
543 544
   value varchar(100) NOT NULL default '',
544 545
   PRIMARY KEY ($USERCOL, domain, attribute)
545 546
 ) $TABLE_TYPE;
547
+	  
546 548
 
547 549
 #
548 550
 # Table structure for table 'server_monitoring_agg'