| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
DROP TABLE IF EXISTS linkMetrics; |
|---|
| 12 |
CREATE TABLE linkMetrics ( |
|---|
| 13 |
linkID int(11) NOT NULL default '0', |
|---|
| 14 |
date timestamp(14) NOT NULL, |
|---|
| 15 |
user varchar(16) default NULL, |
|---|
| 16 |
source varchar(16) default NULL, |
|---|
| 17 |
KEY linkid_idx (linkID), |
|---|
| 18 |
KEY user_idx (user) |
|---|
| 19 |
) TYPE=MyISAM; |
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
DROP TABLE IF EXISTS links; |
|---|
| 26 |
CREATE TABLE links ( |
|---|
| 27 |
ID int(11) NOT NULL auto_increment, |
|---|
| 28 |
url blob NOT NULL, |
|---|
| 29 |
name blob, |
|---|
| 30 |
createDate timestamp(14) NOT NULL, |
|---|
| 31 |
lastMod timestamp(14) NOT NULL, |
|---|
| 32 |
submitter varchar(16) NOT NULL default '', |
|---|
| 33 |
groupid int(11) default NULL, |
|---|
| 34 |
options varchar(16) default NULL, |
|---|
| 35 |
isPrivate tinyint(4) default NULL, |
|---|
| 36 |
PRIMARY KEY (ID), |
|---|
| 37 |
KEY submitter_idx (submitter), |
|---|
| 38 |
KEY isPrivate_idx (isPrivate), |
|---|
| 39 |
KEY createDate_idx (createDate) |
|---|
| 40 |
) TYPE=MyISAM; |
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
DROP TABLE IF EXISTS linksCategoriesXRef; |
|---|
| 47 |
CREATE TABLE linksCategoriesXRef ( |
|---|
| 48 |
linkID int(11) NOT NULL default '0', |
|---|
| 49 |
catID int(11) NOT NULL default '0', |
|---|
| 50 |
PRIMARY KEY (linkID,catID) |
|---|
| 51 |
) TYPE=MyISAM; |
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
DROP TABLE IF EXISTS linksComments; |
|---|
| 58 |
CREATE TABLE linksComments ( |
|---|
| 59 |
ID int(11) NOT NULL auto_increment, |
|---|
| 60 |
submitter varchar(16) default NULL, |
|---|
| 61 |
comment text, |
|---|
| 62 |
isPrivate tinyint(4) default NULL, |
|---|
| 63 |
PRIMARY KEY (ID), |
|---|
| 64 |
UNIQUE KEY ID (ID) |
|---|
| 65 |
) TYPE=MyISAM; |
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
DROP TABLE IF EXISTS linksCommentsXRef; |
|---|
| 72 |
CREATE TABLE linksCommentsXRef ( |
|---|
| 73 |
linkID int(11) NOT NULL default '0', |
|---|
| 74 |
commentID int(11) NOT NULL default '0' |
|---|
| 75 |
) TYPE=MyISAM; |
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
DROP TABLE IF EXISTS linksGroups; |
|---|
| 82 |
CREATE TABLE linksGroups ( |
|---|
| 83 |
ID int(11) NOT NULL auto_increment, |
|---|
| 84 |
userid char(16) default NULL, |
|---|
| 85 |
name char(255) NOT NULL default '', |
|---|
| 86 |
options char(16) default NULL, |
|---|
| 87 |
PRIMARY KEY (ID), |
|---|
| 88 |
UNIQUE KEY ID (ID), |
|---|
| 89 |
KEY userid_name_idx (userid,name(32)), |
|---|
| 90 |
KEY id_userid_idx (ID,userid) |
|---|
| 91 |
) TYPE=MyISAM; |
|---|
| 92 |
|
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 |
DROP TABLE IF EXISTS linksReferers; |
|---|
| 98 |
CREATE TABLE linksReferers ( |
|---|
| 99 |
id int(11) NOT NULL auto_increment, |
|---|
| 100 |
linkID int(11) NOT NULL default '0', |
|---|
| 101 |
userid varchar(16) NOT NULL default '', |
|---|
| 102 |
referer varchar(255) NOT NULL default '', |
|---|
| 103 |
timestamp datetime default NULL, |
|---|
| 104 |
PRIMARY KEY (id) |
|---|
| 105 |
) TYPE=MyISAM; |
|---|
| 106 |
|
|---|
| 107 |
|
|---|
| 108 |
|
|---|
| 109 |
|
|---|
| 110 |
|
|---|
| 111 |
DROP TABLE IF EXISTS linksUsers; |
|---|
| 112 |
CREATE TABLE linksUsers ( |
|---|
| 113 |
ID int(11) NOT NULL auto_increment, |
|---|
| 114 |
userid varchar(16) NOT NULL default '', |
|---|
| 115 |
email varchar(255) NOT NULL default '', |
|---|
| 116 |
password varchar(16) NOT NULL default '', |
|---|
| 117 |
name varchar(128) default NULL, |
|---|
| 118 |
options varchar(16) default NULL, |
|---|
| 119 |
PRIMARY KEY (ID), |
|---|
| 120 |
UNIQUE KEY userid (userid), |
|---|
| 121 |
UNIQUE KEY ID (ID), |
|---|
| 122 |
KEY email_idx (email(32)) |
|---|
| 123 |
) TYPE=MyISAM; |
|---|
| 124 |
|
|---|
| 125 |
|
|---|
| 126 |
|
|---|
| 127 |
|
|---|
| 128 |
|
|---|
| 129 |
DROP TABLE IF EXISTS tempLinks; |
|---|
| 130 |
CREATE TABLE tempLinks ( |
|---|
| 131 |
ID int(11) NOT NULL auto_increment, |
|---|
| 132 |
url blob NOT NULL, |
|---|
| 133 |
name blob, |
|---|
| 134 |
createDate timestamp(14) NOT NULL, |
|---|
| 135 |
lastMod timestamp(14) NOT NULL, |
|---|
| 136 |
submitter varchar(16) NOT NULL default '', |
|---|
| 137 |
groupid int(11) default NULL, |
|---|
| 138 |
options varchar(16) default NULL, |
|---|
| 139 |
isPrivate tinyint(4) default NULL, |
|---|
| 140 |
PRIMARY KEY (ID) |
|---|
| 141 |
) TYPE=MyISAM; |
|---|
| 142 |
|
|---|