-
Notifications
You must be signed in to change notification settings - Fork 0
/
MYSQL_UPDATE
134 lines (122 loc) · 6.5 KB
/
MYSQL_UPDATE
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
--added 2006.06.24 (v2.0a2);
ALTER TABLE players DROP COLUMN games;
ALTER TABLE players DROP COLUMN gamesDone;
ALTER TABLE players ADD COLUMN power smallint(1) NOT NULL default '0';
UPDATE players SET privileges="4" WHERE id="1";
ALTER TABLE games MODIFY COLUMN gameDate varchar(12) NOT NULL default '';
ALTER TABLE games MODIFY COLUMN lastMove varchar(250) NOT NULL default '';
CREATE TABLE IF NOT EXISTS complete (
gameID int(10) NOT NULL,
players varchar(250) NOT NULL,
pgn text NOT NULL,
PRIMARY KEY (gameID)
) ENGINE=MyISAM;
--added 2006.06.25 (v2.0a6);
ALTER TABLE players ADD COLUMN pic varchar(250) NOT NULL default '';
--added 2006.06.28 (v2.0a7);
ALTER TABLE games ADD reqUndo smallint(1) NOT NULL;
ALTER TABLE games ADD oldspot varchar(10) NOT NULL;
ALTER TABLE players ADD invitedBy int(4) NOT NULL;
ALTER TABLE players MODIFY COLUMN id int(4) NOT NULL auto_increment;
--added 2006.07.06 (v2.0a8);
ALTER TABLE games DROP COLUMN oldSpot;
ALTER TABLE games MODIFY COLUMN gameDate varchar(14) NOT NULL;
ALTER TABLE players ADD realname varchar(250) NOT NULL;
ALTER TABLE players ADD location varchar(250) NOT NULL;
ALTER TABLE players ADD email varchar(250) NOT NULL;
--added 2006.08.20 (v2.0a9);
ALTER TABLE players ADD addDate varchar(14) NOT NULL;
--added 2006.09.29 (v2.0b1);
ALTER TABLE players MODIFY invitedBy varchar(4) NOT NULL;
--added 2006.10.02 (v2.0b2);
CREATE TABLE IF NOT EXISTS options (
id int(5) NOT NULL,
optionName varchar(150) NOT NULL default '',
optionValue varchar(250) NOT NULL default '',
varName varchar(150) NOT NULL default '',
type varchar(20) NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM;
INSERT INTO options VALUES (0, 'version', '2.0b2', '', '');
INSERT INTO options VALUES (1, 'host', '', 'host', 'text');
INSERT INTO options VALUES (2, 'db_user_name', '', 'dbUser', 'text');
INSERT INTO options VALUES (3, 'db_password', '', 'dbPass', 'password');
INSERT INTO options VALUES (4, 'database', '', 'database', 'text');
INSERT INTO options VALUES (5, 'domain', '', 'domain', 'text');
INSERT INTO options VALUES (6, 'home_folder', '', 'homeFolder', 'text');
INSERT INTO options VALUES (7, 'admin_email', '', 'adminEmail', 'text');
INSERT INTO options VALUES (8, 'backup_email', '', 'backupEmail', 'checkbox');
INSERT INTO options VALUES (9, 'backup_folder', 'backups', 'backupFolder', 'checkbox');
INSERT INTO options VALUES (10, 'show_update', '1', 'showUpdate', 'checkbox');
INSERT INTO options VALUES (11, 'show_backup', '1', 'showBackup', 'checkbox');
INSERT INTO options VALUES (12, 'board_refresh', '25', 'boardRefresh', 'text');
INSERT INTO options VALUES (13, 'chat_refresh', '37', 'chatRefresh', 'text');
INSERT INTO options VALUES (14, 'show_stats', '1', 'showStats', 'checkbox');
INSERT INTO options VALUES (15, 'show_chat', '1', 'showChat', 'checkbox');
INSERT INTO options VALUES (16, 'show_player_image', '1', 'showPlayerImg', 'checkbox');
INSERT INTO options VALUES (17, 'player_image_dir', 'playerImg', 'playerImgDir', 'text');
INSERT INTO options VALUES (18, 'alow_undo', '', 'allowUndo', 'checkbox');
INSERT INTO options VALUES (19, 'delete_chat', '1', 'deleteChat', 'checkbox');
INSERT INTO options VALUES (20, 'delete_moves', '', 'deleteMoves', 'checkbox');
INSERT INTO options VALUES (21, 'start_power', '0', 'startPower', 'text');
INSERT INTO options VALUES (22, 'end_days', '30', 'endDays', 'text');
INSERT INTO options VALUES (23, 'allow_register', '', 'allowRegister', 'checkbox');
INSERT INTO options VALUES (24, 'verify_register', '', 'verifyReg', 'checkbox');
INSERT INTO options VALUES (25, 'language', 'en', 'lang', 'text');
--added 2007.01.02 (v2.0b4);
INSERT INTO options VALUES (26, 'email_move', '', 'emailMove', 'checkbox');
UPDATE options SET optionValue = '2.0b4' WHERE id = 0;
--added 2007.02.07 (v2.0rc1);
UPDATE options SET id=135 WHERE optionName='verify_register';
UPDATE options SET id=130 WHERE optionName='allow_register';
UPDATE options SET id=125 WHERE optionName='end_days';
UPDATE options SET id=120 WHERE optionName='start_power';
UPDATE options SET id=115 WHERE optionName='delete_moves';
UPDATE options SET id=110 WHERE optionName='delete_chat';
UPDATE options SET id=105 WHERE optionName='email_move';
UPDATE options SET id=100 WHERE optionName='alow_undo';
UPDATE options SET id=95 WHERE optionName='player_image_dir';
UPDATE options SET id=90 WHERE optionName='show_player_image';
UPDATE options SET id=85 WHERE optionName='show_chat';
UPDATE options SET id=80 WHERE optionName='show_stats';
UPDATE options SET id=75 WHERE optionName='chat_refresh';
UPDATE options SET id=70 WHERE optionName='board_refresh';
UPDATE options SET id=65 WHERE optionName='show_backup';
UPDATE options SET id=60 WHERE optionName='show_update';
UPDATE options SET id=55 WHERE optionName='backup_folder';
UPDATE options SET id=50 WHERE optionName='backup_email';
UPDATE options SET id=45 WHERE optionName='admin_email';
UPDATE options SET id=40 WHERE optionName='home_folder';
UPDATE options SET id=35 WHERE optionName='language';
UPDATE options SET id=30 WHERE optionName='domain';
UPDATE options SET id=20 WHERE optionName='database';
UPDATE options SET id=15 WHERE optionName='db_password';
UPDATE options SET id=10 WHERE optionName='db_user_name';
UPDATE options SET id=5 WHERE optionName='host';
ALTER TABLE players ADD secQuestion varchar(90) NOT NULL;
ALTER TABLE players ADD secAnswer varchar(250) NOT NULL;
ALTER TABLE players ADD wins int(10) NOT NULL;
ALTER TABLE players ADD loses int(10) NOT NULL;
ALTER TABLE players ADD draws int(10) NOT NULL;
ALTER TABLE players ADD points decimal(10) NOT NULL;
ALTER TABLE players MODIFY timeOnline decimal(12) NOT NULL;
CREATE INDEX game_chat ON chat (gameID);
CREATE INDEX game_moves ON moves (gameID);
CREATE INDEX won_games ON games (winner);
UPDATE players SET pic = 'default.png' WHERE pic = '';
INSERT INTO options VALUES (25, 'db_prefix', '', 'dbPre', 'text');
UPDATE options SET optionValue = '2.0rc1' WHERE id = 0;
--added 2007.03.30 (v2.0rc2);
ALTER TABLE moves MODIFY whiteMove varchar(7) NOT NULL default '';
ALTER TABLE moves MODIFY blackMove varchar(7) NOT NULL default '';
UPDATE options SET optionValue = '2.0rc2' WHERE id = 0;
--added 2007.04.19 (v2.0rc3);
UPDATE options SET optionValue = '2.0rc3' WHERE id = 0;
--added 2007.05.26 (v2.0);
UPDATE options SET optionValue = '2.0' WHERE id = 0;
--added 2007.08.24 (v2.5b1);
INSERT INTO options VALUES (140, 'admin_message', '', 'admin_message', 'text');
ALTER TABLE chat ADD `type` tinyint(1) ZEROFILL NOT NULL;
ALTER TABLE chat ADD ctime numeric(14) NOT NULL;
UPDATE options SET optionValue = '2.5b1' WHERE id = 0;
--end;