|
359 | 359 | ), |
360 | 360 | 'urlcache' => array( |
361 | 361 | 'id' => array('integer not null primary key auto_increment', 'ID'), |
362 | | - 'url' => array('text not null', ''), |
| 362 | + 'url' => array('varchar(2083) not null', ''), |
363 | 363 | 'lastmodified' => array('integer', ''), |
364 | 364 | 'added' => array('datetime', ''), |
365 | 365 | 'content' => array('longblob', ''), |
|
376 | 376 |
|
377 | 377 | //# keep it in for now, but could be dropped at some point |
378 | 378 | //# once all dependencies have been removed |
| 379 | + // tables that have unique indexes on hash values : linktrack_forward, bounceregex |
379 | 380 | 'linktrack' => array( |
380 | 381 | 'linkid' => array('integer not null primary key auto_increment', 'Link ID'), |
381 | 382 | 'messageid' => array('integer not null', 'Message ID'), |
382 | 383 | 'userid' => array('integer not null', 'subscriber ID'), |
383 | | - 'url' => array('text', 'URL to log'), |
384 | | - 'forward' => array('text', 'URL to forward to'), |
| 384 | + 'url' => array('varchar(255)', 'URL to log'), |
| 385 | + 'forward' => array('varchar(255)', 'URL to forward to'), |
385 | 386 | 'firstclick' => array('datetime', 'When first clicked'), |
386 | 387 | 'latestclick' => array('timestamp', 'When last clicked'), |
387 | 388 | 'clicked' => array('integer default 0', 'Number of clicks'), |
388 | 389 | 'index_1' => array('midindex (messageid)', ''), |
389 | 390 | 'index_2' => array('uidindex (userid)', ''), |
390 | | - 'index_3' => array('urlindex (url(255))', ''), |
| 391 | + 'index_3' => array('urlindex (url)', ''), |
391 | 392 | 'index_4' => array('miduidindex (messageid,userid)', ''), |
392 | 393 | // "index_5" => array("miduidurlindex (messageid,userid,url)",""), |
393 | | - 'unique_1' => array('miduidurlindex (messageid,userid,url(255))', ''), |
| 394 | + 'unique_1' => array('miduidurlindex (messageid,userid,url)', ''), |
394 | 395 | ), |
395 | 396 | 'linktrack_ml' => array( // ml -> message link |
396 | 397 | 'messageid' => array('integer not null', 'Message ID'), |
|
425 | 426 | ), |
426 | 427 | 'linktrack_forward' => array( |
427 | 428 | 'id' => array('integer not null primary key auto_increment', 'forward ID'), |
428 | | - 'url' => array('text', 'URL to log'), |
| 429 | + 'url' => array('varchar(2083)', 'URL to log'), |
| 430 | + 'urlhash' => array('char(32)', 'hash value of URL'), |
429 | 431 | 'uuid' => array('varchar(36) default ""', 'UUID'), |
430 | 432 | // "forward" => array("text","URL to forward to"), |
431 | 433 | 'personalise' => array('tinyint default 0', 'Forward adding the UID?'), |
432 | 434 | 'index_1' => array('urlindex (url(255))', ''), |
433 | 435 | // "index_2" => array("urlforwardindex (url,forward(255))",""), |
434 | 436 | // 'unique_1' => array('fwdunique (forward (500))','Forward should be unique'), |
435 | | - 'unique_1' => array('urlunique (url(255))', 'URL should be unique'), |
| 437 | + 'unique_1' => array('urlunique (urlhash)', 'URL should be unique'), |
436 | 438 | 'index_2' => array('uuididx (uuid)', 'sys:index'), |
437 | 439 | ), |
438 | 440 | 'linktrack_userclick' => array( |
|
468 | 470 | // ), |
469 | 471 | 'bounceregex' => array( |
470 | 472 | 'id' => array('integer not null primary key auto_increment', 'ID'), |
471 | | - 'regex' => array('text', 'Regex'), |
| 473 | + 'regex' => array('varchar(2083)', 'Regex'), |
| 474 | + 'regexhash' => array('char(32)', 'hash value of regex'), |
472 | 475 | 'action' => array('varchar(255)', 'Action on rule'), |
473 | 476 | 'listorder' => array('integer default 0', ''), |
474 | 477 | 'admin' => array('integer', ''), |
475 | 478 | 'comment' => array('text', ''), |
476 | 479 | 'status' => array('varchar(255)', ''), |
477 | 480 | 'count' => array('integer default 0', 'Count of matching bounces on this rule'), |
478 | | - 'unique_1' => array('regex (regex(255))', ''), |
| 481 | + 'unique_1' => array('regex (regexhash)', ''), |
479 | 482 | ), |
480 | 483 | 'bounceregex_bounce' => array( |
481 | 484 | 'regex' => array('integer not null', 'Related regex'), |
|
0 commit comments