summaryrefslogtreecommitdiff
path: root/schema/schema-20110223.sql
blob: 6327e6b06a5ca5dd7fdfac98b6ab546777f5e762 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
CREATE DATABASE IF NOT EXISTS `v8_voprimary` DEFAULT CHARACTER SET latin1;

USE `v8_voprimary`;

DROP TABLE IF EXISTS `vd_donations`;
CREATE TABLE `vd_donations` (
  `mailed_key` varchar(20) DEFAULT NULL,
  `amount` int(11) DEFAULT NULL,
  `created` date DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `vd_features`;
CREATE TABLE `vd_features` (
  `feature_id` varchar(15) DEFAULT NULL,
  `sort_id` varchar(15) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `vd_votes`;
CREATE TABLE `vd_votes` (
  `user_id` int(11) DEFAULT NULL,
  `vote_nr` int(11) DEFAULT NULL,
  `points` int(11) DEFAULT NULL,
  `feature_id` varchar(15) DEFAULT NULL,
  `expire_date` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `vo_news_items`;
CREATE TABLE `vo_news_items` (
  `news_item_id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(80) DEFAULT NULL,
  `news` mediumtext,
  `created_by` int(11) DEFAULT NULL,
  `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`news_item_id`)
) ENGINE=MyISAM AUTO_INCREMENT=100 DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `vs_script_downloads`;
CREATE TABLE `vs_script_downloads` (
  `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `script_id` int(11) DEFAULT NULL,
  `ip` varchar(255) DEFAULT NULL,
  KEY `vssd_id_ip` (`script_id`,`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `vs_script_ratings`;
CREATE TABLE `vs_script_ratings` (
  `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `script_id` int(11) DEFAULT NULL,
  `rating` int(11) DEFAULT NULL,
  `ip` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `vs_script_source`;
CREATE TABLE `vs_script_source` (
  `script_source_id` int(11) NOT NULL AUTO_INCREMENT,
  `mime_type` varchar(40) DEFAULT NULL,
  `script_id` int(11) DEFAULT NULL,
  `vim_version` varchar(10) DEFAULT NULL,
  `script_version` varchar(10) DEFAULT NULL,
  `version_comment` mediumtext,
  `src` longblob,
  `created_by` int(11) DEFAULT NULL,
  `creation_date` datetime DEFAULT NULL,
  `package` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`script_source_id`),
  KEY `source_date` (`creation_date`),
  KEY `vss_sid_creator` (`script_id`,`created_by`)
) ENGINE=MyISAM AUTO_INCREMENT=15092 DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `vs_scripts`;
CREATE TABLE `vs_scripts` (
  `script_id` int(11) NOT NULL AUTO_INCREMENT,
  `script_name` varchar(40) DEFAULT NULL,
  `script_type` varchar(40) DEFAULT NULL,
  `summary` varchar(80) DEFAULT NULL,
  `description` longtext,
  `install_details` mediumtext,
  `ratings` int(11) DEFAULT NULL,
  `rating_score` int(11) DEFAULT NULL,
  `downloads` int(11) DEFAULT NULL,
  `last_updated_by` int(11) DEFAULT NULL,
  `last_update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_by` int(11) DEFAULT NULL,
  `creation_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`script_id`),
  FULLTEXT KEY `summary` (`summary`,`description`,`install_details`)
) ENGINE=MyISAM AUTO_INCREMENT=3465 DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `vs_sessions`;
CREATE TABLE `vs_sessions` (
  `session_id` varchar(32) NOT NULL DEFAULT '',
  `user_id` int(11) DEFAULT NULL,
  `remote_address` varchar(200) DEFAULT NULL,
  `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`session_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `vs_users`;
CREATE TABLE `vs_users` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(40) DEFAULT NULL,
  `password` varchar(32) DEFAULT NULL,
  `first_name` varchar(40) DEFAULT NULL,
  `last_name` varchar(40) DEFAULT NULL,
  `email` varchar(200) DEFAULT NULL,
  `access` int(11) DEFAULT NULL,
  `homepage` varchar(255) DEFAULT NULL,
  `sponsor_amount` int(11) DEFAULT NULL,
  `sponsor_vote_amount` int(11) DEFAULT NULL,
  `sponsor_vote_date` date DEFAULT NULL,
  `sponsor_flags` int(11) DEFAULT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=27147 DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `vt_tip_note_spam`;
CREATE TABLE `vt_tip_note_spam` (
  `tip_spam_note_id` int(11) NOT NULL AUTO_INCREMENT,
  `moderated_by` int(11) NOT NULL DEFAULT '0',
  `moderated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `tip_note_id` int(11) NOT NULL DEFAULT '0',
  `tip_id` int(11) NOT NULL DEFAULT '0',
  `note` longtext NOT NULL,
  `created_by` varchar(40) NOT NULL DEFAULT '',
  `created_by_email` varchar(100) NOT NULL DEFAULT '',
  `last_update_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `creation_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `last_updated_by_email` varchar(100) NOT NULL DEFAULT '',
  PRIMARY KEY (`tip_spam_note_id`)
) ENGINE=MyISAM AUTO_INCREMENT=4795 DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `vt_tip_notes`;
CREATE TABLE `vt_tip_notes` (
  `tip_note_id` int(11) NOT NULL AUTO_INCREMENT,
  `tip_id` int(11) DEFAULT NULL,
  `note` longtext,
  `last_updated_by_email` varchar(100) DEFAULT NULL,
  `last_update_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_by` varchar(40) DEFAULT NULL,
  `created_by_email` varchar(100) DEFAULT NULL,
  `creation_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`tip_note_id`)
) ENGINE=MyISAM AUTO_INCREMENT=12968 DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `vt_tip_ratings`;
CREATE TABLE `vt_tip_ratings` (
  `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `tip_id` int(11) DEFAULT NULL,
  `rating` int(11) DEFAULT NULL,
  `ip` varchar(255) DEFAULT NULL,
  KEY `vt_tip_ratings_n1` (`ip`),
  KEY `vt_tip_ratings_n2` (`tip_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `vt_tip_spam`;
CREATE TABLE `vt_tip_spam` (
  `tip_spam_id` int(11) NOT NULL AUTO_INCREMENT,
  `moderated_by` int(11) DEFAULT NULL,
  `moderated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `tip_id` int(11) DEFAULT NULL,
  `summary` varchar(200) DEFAULT NULL,
  `tip` longtext,
  `version` enum('5.7','6.0') DEFAULT NULL,
  `complexity` enum('basic','intermediate','advanced') DEFAULT NULL,
  `last_updated_by_email` varchar(100) DEFAULT NULL,
  `last_update_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `created_by` varchar(40) DEFAULT NULL,
  `created_by_email` varchar(100) DEFAULT NULL,
  `creation_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ratings` int(11) DEFAULT NULL,
  `rating_score` int(11) DEFAULT NULL,
  `viewed` int(11) DEFAULT NULL,
  PRIMARY KEY (`tip_spam_id`)
) ENGINE=MyISAM AUTO_INCREMENT=177 DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `vt_tip_views`;
CREATE TABLE `vt_tip_views` (
  `creation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `tip_id` int(11) DEFAULT NULL,
  `ip` varchar(255) DEFAULT NULL,
  KEY `vt_tip_views_n1` (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;