Browse code

Change collation in favorites table regarding type field - Fixes Manage Favorites count

Clarissa Walker authored on 2026/09/07 20:25:35
Showing 1 changed files
... ...
@@ -237,7 +237,7 @@ CREATE TABLE `fanfiction_comments` (
237 237
 CREATE TABLE `fanfiction_favorites` (
238 238
   `uid` int(11) NOT NULL default '0',
239 239
   `item` int(11) NOT NULL default '0',
240
-  `type` char(2) NOT NULL default '',
240
+  `type` char(2) NOT NULL default '' COLLATE utf8mb4_unicode_ci,
241 241
   `comments` text,
242 242
   UNIQUE KEY `byitem` (`item`,`type`,`uid`),
243 243
   UNIQUE KEY `byuid` (`uid`,`type`,`item`)
Browse code

Fix more leftover oversights with COLLATE in some SQL queries

Clarissa Walker authored on 2026/08/19 18:28:01
Showing 1 changed files
... ...
@@ -149,7 +149,7 @@ CREATE TABLE `fanfiction_chapters` (
149 149
 CREATE TABLE `fanfiction_characters` (
150 150
   `charid` int(11) NOT NULL auto_increment,
151 151
   `catid` int(11) NOT NULL default '0',
152
-  `charname` varchar(60) NOT NULL default '' COLLATE=utf8mb4_unicode_ci,
152
+  `charname` varchar(60) NOT NULL default '' COLLATE utf8mb4_unicode_ci,
153 153
   `bio` text NOT NULL,
154 154
   `image` varchar(200) NOT NULL default '',
155 155
   PRIMARY KEY  (`charid`),
... ...
@@ -364,7 +364,7 @@ CREATE TABLE `fanfiction_panels` (
364 364
 
365 365
 CREATE TABLE `fanfiction_ratings` (
366 366
   `rid` int(11) NOT NULL auto_increment,
367
-  `rating` varchar(60) NOT NULL default '' COLLATE=utf8mb4_unicode_ci,
367
+  `rating` varchar(60) NOT NULL default '' COLLATE utf8mb4_unicode_ci,
368 368
   `ratingwarning` int(11) NOT NULL default '0',
369 369
   `warningtext` text NOT NULL,
370 370
   PRIMARY KEY  (`rid`),
Browse code

Add site setting to enable or disable new user registrations

Clarissa Walker authored on 2026/08/18 01:56:03
Showing 1 changed files
... ...
@@ -515,6 +515,7 @@ CREATE TABLE `fanfiction_settings` (
515 515
   `allowed_tags` varchar(200) NOT NULL default '<b><i><u><center><hr><p><br /><br><blockquote><ol><ul><li><img><strong><em>',
516 516
   `favorites` tinyint(1) NOT NULL default '0',
517 517
   `multiplecats` tinyint(1) NOT NULL default '0',
518
+  `setreg` tinyint(1) NOT NULL default '1',
518 519
   `newscomments` tinyint(1) NOT NULL default '0',
519 520
   `logging` tinyint(1) NOT NULL default '0',
520 521
   `maintenance` tinyint(1) NOT NULL default '0',
Browse code

Silly consistency change in SQL file from 2015

Clarissa Walker authored on 2026/07/23 20:17:53
Showing 1 changed files
... ...
@@ -196,6 +196,7 @@ CREATE TABLE `fanfiction_coauthors` (
196 196
   `uid` int(11) NOT NULL default '0',
197 197
   PRIMARY KEY  (`sid`,`uid`),
198 198
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
199
+
199 200
 -- --------------------------------------------------------
200 201
 
201 202
 -- 
Browse code

More specifying of collation in fields/columns for sorting...

Clarissa Walker authored on 2026/07/18 16:36:16
Showing 1 changed files
... ...
@@ -149,7 +149,7 @@ CREATE TABLE `fanfiction_chapters` (
149 149
 CREATE TABLE `fanfiction_characters` (
150 150
   `charid` int(11) NOT NULL auto_increment,
151 151
   `catid` int(11) NOT NULL default '0',
152
-  `charname` varchar(60) NOT NULL default '',
152
+  `charname` varchar(60) NOT NULL default '' COLLATE=utf8mb4_unicode_ci,
153 153
   `bio` text NOT NULL,
154 154
   `image` varchar(200) NOT NULL default '',
155 155
   PRIMARY KEY  (`charid`),
... ...
@@ -363,7 +363,7 @@ CREATE TABLE `fanfiction_panels` (
363 363
 
364 364
 CREATE TABLE `fanfiction_ratings` (
365 365
   `rid` int(11) NOT NULL auto_increment,
366
-  `rating` varchar(60) NOT NULL default '',
366
+  `rating` varchar(60) NOT NULL default '' COLLATE=utf8mb4_unicode_ci,
367 367
   `ratingwarning` int(11) NOT NULL default '0',
368 368
   `warningtext` text NOT NULL,
369 369
   PRIMARY KEY  (`rid`),
Browse code

Specify collation in field/columns that are important for sorting and search features; the rest can use UTF-8 binary. Eventually, certain other columns that use text in some manner may use different specific Unicode collations.

Clarissa Walker authored on 2026/07/18 06:44:35
Showing 1 changed files
... ...
@@ -60,8 +60,8 @@ CREATE TABLE `fanfiction_authorprefs` (
60 60
 
61 61
 CREATE TABLE `fanfiction_authors` (
62 62
   `uid` int(11) NOT NULL auto_increment,
63
-  `penname` varchar(200) NOT NULL default '',
64
-  `realname` varchar(200) NOT NULL default '',
63
+  `penname` varchar(200) NOT NULL default '' COLLATE utf8mb4_unicode_ci,
64
+  `realname` varchar(200) NOT NULL default '' COLLATE utf8mb4_unicode_ci,
65 65
   `email` varchar(200) NOT NULL default '',
66 66
   `website` varchar(200) NOT NULL default '',
67 67
   `bio` text NOT NULL,
... ...
@@ -72,7 +72,7 @@ CREATE TABLE `fanfiction_authors` (
72 72
   PRIMARY KEY  (`uid`),
73 73
   KEY `penname` (`penname`),
74 74
   KEY `admincreated` (`admincreated`)
75
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
75
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
76 76
 
77 77
 -- --------------------------------------------------------
78 78
 
... ...
@@ -100,7 +100,7 @@ CREATE TABLE `fanfiction_blocks` (
100 100
 CREATE TABLE `fanfiction_categories` (
101 101
   `catid` int(11) NOT NULL auto_increment,
102 102
   `parentcatid` int(11) NOT NULL default '-1',
103
-  `category` varchar(60) NOT NULL default '',
103
+  `category` varchar(60) NOT NULL default '' COLLATE utf8mb4_unicode_ci,
104 104
   `description` text NOT NULL,
105 105
   `image` varchar(100) NOT NULL default '',
106 106
   `locked` tinyint(4) NOT NULL default '0',
... ...
@@ -109,7 +109,7 @@ CREATE TABLE `fanfiction_categories` (
109 109
   `numitems` int(11) NOT NULL default '0',
110 110
   PRIMARY KEY  (`catid`),
111 111
   KEY `byparent` (`parentcatid`,`displayorder`)
112
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
112
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
113 113
 
114 114
 -- --------------------------------------------------------
115 115
 
... ...
@@ -404,8 +404,8 @@ CREATE TABLE `fanfiction_reviews` (
404 404
 
405 405
 CREATE TABLE `fanfiction_series` (
406 406
   `seriesid` int(11) NOT NULL auto_increment,
407
-  `title` varchar(200) NOT NULL default '',
408
-  `summary` text,
407
+  `title` varchar(200) NOT NULL default '' COLLATE utf8mb4_unicode_ci,
408
+  `summary` text COLLATE utf8mb4_unicode_ci,
409 409
   `uid` int(11) NOT NULL default '0',
410 410
   `isopen` tinyint(4) NOT NULL default '0',
411 411
   `catid` varchar(200) NOT NULL default '0',
... ...
@@ -420,7 +420,7 @@ CREATE TABLE `fanfiction_series` (
420 420
   PRIMARY KEY  (`seriesid`),
421 421
   KEY `catid` (`catid`),
422 422
   KEY `owner` (`uid`,`title`)
423
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
423
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
424 424
 
425 425
 -- --------------------------------------------------------
426 426
 -- 
... ...
@@ -448,8 +448,8 @@ CREATE TABLE `fanfiction_stats` (
448 448
 
449 449
 CREATE TABLE `fanfiction_stories` (
450 450
   `sid` int(11) NOT NULL auto_increment,
451
-  `title` varchar(200) NOT NULL default '',
452
-  `summary` text,
451
+  `title` varchar(200) NOT NULL default '' COLLATE utf8mb4_unicode_ci,
452
+  `summary` text COLLATE uft8mb4_unicode_ci,
453 453
   `storynotes` text,
454 454
   `catid` varchar(100) NOT NULL default '0',
455 455
   `classes` varchar(200) default NULL,
... ...
@@ -480,7 +480,7 @@ CREATE TABLE `fanfiction_stories` (
480 480
   KEY `challenges` (`challenges`),
481 481
   KEY `validateduid` (`validated`,`uid`),
482 482
   KEY `recent` (`updated`,`validated`)
483
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
483
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
484 484
 
485 485
 -- --------------------------------------------------------
486 486
 
Browse code

Specify COLLATE=utf8mb4_unicode_ci in some tables. Also fix discrepancies between install.php and tables.sql.

Clarissa Walker authored on 2026/07/18 05:11:44
Showing 1 changed files
... ...
@@ -68,11 +68,11 @@ CREATE TABLE `fanfiction_authors` (
68 68
   `image` varchar(200) NOT NULL default '',
69 69
   `date`  int(10) unsigned NOT NULL default '0',
70 70
   `admincreated` int(11) NOT NULL default '0',
71
-  `password` varchar(40) NOT NULL default '0',
71
+  `password` varchar(255) NOT NULL default '0',
72 72
   PRIMARY KEY  (`uid`),
73 73
   KEY `penname` (`penname`),
74 74
   KEY `admincreated` (`admincreated`)
75
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
75
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
76 76
 
77 77
 -- --------------------------------------------------------
78 78
 
... ...
@@ -109,7 +109,7 @@ CREATE TABLE `fanfiction_categories` (
109 109
   `numitems` int(11) NOT NULL default '0',
110 110
   PRIMARY KEY  (`catid`),
111 111
   KEY `byparent` (`parentcatid`,`displayorder`)
112
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
112
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
113 113
 
114 114
 -- --------------------------------------------------------
115 115
 
... ...
@@ -420,7 +420,7 @@ CREATE TABLE `fanfiction_series` (
420 420
   PRIMARY KEY  (`seriesid`),
421 421
   KEY `catid` (`catid`),
422 422
   KEY `owner` (`uid`,`title`)
423
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
423
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
424 424
 
425 425
 -- --------------------------------------------------------
426 426
 -- 
... ...
@@ -480,7 +480,7 @@ CREATE TABLE `fanfiction_stories` (
480 480
   KEY `challenges` (`challenges`),
481 481
   KEY `validateduid` (`validated`,`uid`),
482 482
   KEY `recent` (`updated`,`validated`)
483
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
483
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
484 484
 
485 485
 -- --------------------------------------------------------
486 486
 
Browse code

Remove collate - affects sorting

Clarissa Walker authored on 2026/07/16 15:28:44
Showing 1 changed files
... ...
@@ -109,7 +109,7 @@ CREATE TABLE `fanfiction_categories` (
109 109
   `numitems` int(11) NOT NULL default '0',
110 110
   PRIMARY KEY  (`catid`),
111 111
   KEY `byparent` (`parentcatid`,`displayorder`)
112
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
112
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
113 113
 
114 114
 -- --------------------------------------------------------
115 115
 
... ...
@@ -420,7 +420,7 @@ CREATE TABLE `fanfiction_series` (
420 420
   PRIMARY KEY  (`seriesid`),
421 421
   KEY `catid` (`catid`),
422 422
   KEY `owner` (`uid`,`title`)
423
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
423
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
424 424
 
425 425
 -- --------------------------------------------------------
426 426
 -- 
Browse code

Database table conversion: defaults -> utf8mb4 - Preliminary

Clarissa Walker authored on 2026/07/15 19:46:03
Showing 1 changed files
... ...
@@ -12,7 +12,7 @@ CREATE TABLE `fanfiction_authorfields` (
12 12
   `field_code_out` text,
13 13
   `field_on` tinyint(1) NOT NULL default '0',
14 14
   PRIMARY KEY  (`field_id`)
15
-) ENGINE=MyISAM;
15
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
16 16
 
17 17
 -- --------------------------------------------------------
18 18
 
... ...
@@ -26,7 +26,7 @@ CREATE TABLE `fanfiction_authorinfo` (
26 26
   `info` varchar(255) NOT NULL default '',
27 27
   PRIMARY KEY  (`uid`,`field`),
28 28
   KEY `uid` (`uid`)
29
-) ENGINE=MyISAM;
29
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
30 30
 
31 31
 -- --------------------------------------------------------
32 32
 
... ...
@@ -50,7 +50,7 @@ CREATE TABLE `fanfiction_authorprefs` (
50 50
   `contact` tinyint(1) NOT NULL default '0',
51 51
   `stories` int(11) NOT NULL default '',
52 52
   PRIMARY KEY  (`uid`)
53
-) ENGINE=MyISAM;
53
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
54 54
 
55 55
 -- --------------------------------------------------------
56 56
 
... ...
@@ -72,7 +72,7 @@ CREATE TABLE `fanfiction_authors` (
72 72
   PRIMARY KEY  (`uid`),
73 73
   KEY `penname` (`penname`),
74 74
   KEY `admincreated` (`admincreated`)
75
-) ENGINE=MyISAM;
75
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
76 76
 
77 77
 -- --------------------------------------------------------
78 78
 
... ...
@@ -89,7 +89,7 @@ CREATE TABLE `fanfiction_blocks` (
89 89
   `block_variables` text NOT NULL,
90 90
   PRIMARY KEY  (`block_id`),
91 91
   KEY `block_name` (`block_name`)
92
-) ENGINE=MyISAM;
92
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
93 93
 
94 94
 -- --------------------------------------------------------
95 95
 
... ...
@@ -109,7 +109,7 @@ CREATE TABLE `fanfiction_categories` (
109 109
   `numitems` int(11) NOT NULL default '0',
110 110
   PRIMARY KEY  (`catid`),
111 111
   KEY `byparent` (`parentcatid`,`displayorder`)
112
-) ENGINE=MyISAM;
112
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
113 113
 
114 114
 -- --------------------------------------------------------
115 115
 
... ...
@@ -138,7 +138,7 @@ CREATE TABLE `fanfiction_chapters` (
138 138
   KEY `title` (`title`),
139 139
   KEY `validated` (`validated`),
140 140
   KEY `forstoryblock` (`sid`,`validated`)
141
-) ENGINE=MyISAM;
141
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
142 142
 
143 143
 -- --------------------------------------------------------
144 144
 
... ...
@@ -155,7 +155,7 @@ CREATE TABLE `fanfiction_characters` (
155 155
   PRIMARY KEY  (`charid`),
156 156
   KEY `catid` (`catid`),
157 157
   KEY `charname` (`charname`)
158
-) ENGINE=MyISAM;
158
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
159 159
 
160 160
 -- --------------------------------------------------------
161 161
 
... ...
@@ -169,7 +169,7 @@ CREATE TABLE `fanfiction_classes` (
169 169
   `class_name` varchar(100) NOT NULL default '',
170 170
   PRIMARY KEY  (`class_id`),
171 171
   KEY `byname` (`class_type`,`class_name`,`class_id`)
172
-) ENGINE=MyISAM;
172
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
173 173
 
174 174
 -- --------------------------------------------------------
175 175
 
... ...
@@ -183,7 +183,7 @@ CREATE TABLE `fanfiction_classtypes` (
183 183
   `classtype_title` varchar(50) NOT NULL default '',
184 184
   PRIMARY KEY  (`classtype_id`),
185 185
   UNIQUE KEY `classtype_name` (`classtype_name`)
186
-) ENGINE=MyISAM;
186
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
187 187
 
188 188
 -- --------------------------------------------------------
189 189
 
... ...
@@ -195,7 +195,7 @@ CREATE TABLE `fanfiction_coauthors` (
195 195
   `sid` int(11) NOT NULL default '0',
196 196
   `uid` int(11) NOT NULL default '0',
197 197
   PRIMARY KEY  (`sid`,`uid`),
198
-) ENGINE=MyISAM;
198
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
199 199
 -- --------------------------------------------------------
200 200
 
201 201
 -- 
... ...
@@ -209,7 +209,7 @@ CREATE TABLE `fanfiction_codeblocks` (
209 209
   `code_module` varchar(60) default NULL,
210 210
   PRIMARY KEY  (`code_id`),
211 211
   KEY `code_type` (`code_type`)
212
-) ENGINE=MyISAM;
212
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
213 213
 
214 214
 -- --------------------------------------------------------
215 215
 
... ...
@@ -225,7 +225,7 @@ CREATE TABLE `fanfiction_comments` (
225 225
   `time` int(10) unsigned NOT NULL default '0',
226 226
   PRIMARY KEY  (`cid`),
227 227
   KEY `commentlist` (`nid`,`time`)
228
-) ENGINE=MyISAM;
228
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
229 229
 
230 230
 -- --------------------------------------------------------
231 231
 
... ...
@@ -240,7 +240,7 @@ CREATE TABLE `fanfiction_favorites` (
240 240
   `comments` text,
241 241
   UNIQUE KEY `byitem` (`item`,`type`,`uid`),
242 242
   UNIQUE KEY `byuid` (`uid`,`type`,`item`)
243
-) ENGINE=MyISAM;
243
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
244 244
 
245 245
 -- --------------------------------------------------------
246 246
 
... ...
@@ -256,7 +256,7 @@ CREATE TABLE `fanfiction_inseries` (
256 256
   `inorder` int(11) NOT NULL default '0',
257 257
   PRIMARY KEY  (`sid`,`seriesid`),
258 258
   KEY `seriesid` (`seriesid`,`inorder`)
259
-) ENGINE=MyISAM;
259
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
260 260
 
261 261
 -- --------------------------------------------------------
262 262
 
... ...
@@ -272,7 +272,7 @@ CREATE TABLE `fanfiction_log` (
272 272
   `log_timestamp` int(10) unsigned NOT NULL default '0',
273 273
   `log_type` char(2) NOT NULL default '',
274 274
   PRIMARY KEY  (`log_id`)
275
-) ENGINE=MyISAM;
275
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
276 276
 
277 277
 -- --------------------------------------------------------
278 278
 
... ...
@@ -287,7 +287,7 @@ CREATE TABLE `fanfiction_messages` (
287 287
   `message_text` text,
288 288
   PRIMARY KEY  (`message_id`),
289 289
   KEY `message_name` (`message_name`)
290
-) ENGINE=MyISAM;
290
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
291 291
 
292 292
 -- --------------------------------------------------------
293 293
 
... ...
@@ -301,7 +301,7 @@ CREATE TABLE `fanfiction_modules` (
301 301
   `version` varchar(10) NOT NULL default '1.0',
302 302
   PRIMARY KEY  (`id`),
303 303
   KEY `name_version` (`name`,`version`)
304
-) ENGINE=MyISAM;
304
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
305 305
 
306 306
 -- --------------------------------------------------------
307 307
 
... ...
@@ -317,7 +317,7 @@ CREATE TABLE `fanfiction_news` (
317 317
   `time` int(10) unsigned NOT NULL default '0',
318 318
   `comments` int(11) NOT NULL default '0',
319 319
   PRIMARY KEY  (`nid`)
320
-) ENGINE=MyISAM;
320
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
321 321
 
322 322
 -- --------------------------------------------------------
323 323
 
... ...
@@ -334,7 +334,7 @@ CREATE TABLE `fanfiction_pagelinks` (
334 334
   `link_access` tinyint(4) NOT NULL default '0',
335 335
   PRIMARY KEY  (`link_id`),
336 336
   KEY `link_name` (`link_name`)
337
-) ENGINE=MyISAM;
337
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
338 338
 
339 339
 -- --------------------------------------------------------
340 340
 
... ...
@@ -353,7 +353,7 @@ CREATE TABLE `fanfiction_panels` (
353 353
   `panel_type` varchar(20) NOT NULL default 'A',
354 354
   PRIMARY KEY  (`panel_id`),
355 355
   KEY `panel_type` (`panel_type`,`panel_name`)
356
-) ENGINE=MyISAM;
356
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
357 357
 
358 358
 -- --------------------------------------------------------
359 359
 
... ...
@@ -368,7 +368,7 @@ CREATE TABLE `fanfiction_ratings` (
368 368
   `warningtext` text NOT NULL,
369 369
   PRIMARY KEY  (`rid`),
370 370
   KEY `rating` (`rating`)
371
-) ENGINE=MyISAM;
371
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
372 372
 
373 373
 -- --------------------------------------------------------
374 374
 
... ...
@@ -394,7 +394,7 @@ CREATE TABLE `fanfiction_reviews` (
394 394
   KEY `avgrating` (`type`,`item`,`rating`),
395 395
   KEY `bychapter` (`chapid`,`rating`),
396 396
   KEY `byuid` (`uid`,`item`,`type`)
397
-) ENGINE=MyISAM;
397
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
398 398
 
399 399
 -- --------------------------------------------------------
400 400
 
... ...
@@ -420,7 +420,7 @@ CREATE TABLE `fanfiction_series` (
420 420
   PRIMARY KEY  (`seriesid`),
421 421
   KEY `catid` (`catid`),
422 422
   KEY `owner` (`uid`,`title`)
423
-) ENGINE=MyISAM;
423
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
424 424
 
425 425
 -- --------------------------------------------------------
426 426
 -- 
... ...
@@ -438,7 +438,7 @@ CREATE TABLE `fanfiction_stats` (
438 438
   `members` int(11) NOT NULL default '0',
439 439
   `reviewers` int(11) NOT NULL default '0',
440 440
   `newestmember` int(11) NOT NULL default '0'
441
-) ENGINE=MyISAM;
441
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
442 442
 
443 443
 -- --------------------------------------------------------
444 444
 
... ...
@@ -480,7 +480,7 @@ CREATE TABLE `fanfiction_stories` (
480 480
   KEY `challenges` (`challenges`),
481 481
   KEY `validateduid` (`validated`,`uid`),
482 482
   KEY `recent` (`updated`,`validated`)
483
-) ENGINE=MyISAM;
483
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
484 484
 
485 485
 -- --------------------------------------------------------
486 486
 
... ...
@@ -551,4 +551,4 @@ CREATE TABLE `fanfiction_settings` (
551 551
   `rectarget` tinyint(1) NOT NULL default '0',
552 552
   `autovalrecs` tinyint(1) NOT NULL default '0',
553 553
   PRIMARY KEY  (`sitekey`)
554
-) ENGINE=MyISAM;
554
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
Browse code

Fix settings table column creation oversight with SMTP updates; also general consistency changes

Clarissa Walker authored on 2026/07/15 12:04:18
Showing 1 changed files
... ...
@@ -540,10 +540,12 @@ CREATE TABLE `fanfiction_settings` (
540 540
   `disablepopups` tinyint(1) NOT NULL default '0',
541 541
   `agestatement` tinyint(1) NOT NULL default '0',
542 542
   `words` text,
543
-  `version` varchar(10) NOT NULL default '3.0',
543
+  `version` varchar(10) NOT NULL default '3.5.9',
544 544
   `smtp_host` varchar(200) default NULL,
545 545
   `smtp_username` varchar(50) default NULL,
546 546
   `smtp_password` varchar(50) default NULL,
547
+  `smtp_port` varchar(5) NOT NULL default '',
548
+  `smtp_secure` varchar(3) NOT NULL default '',
547 549
   `anonchallenges` tinyint(1) NOT NULL default '0',
548 550
   `anonrecs` tinyint(1) NOT NULL default '0',
549 551
   `rectarget` tinyint(1) NOT NULL default '0',
Browse code

fix for manual install of tables

Jimako authored on 2024/04/09 08:21:02
Showing 1 changed files
... ...
@@ -12,7 +12,7 @@ CREATE TABLE `fanfiction_authorfields` (
12 12
   `field_code_out` text,
13 13
   `field_on` tinyint(1) NOT NULL default '0',
14 14
   PRIMARY KEY  (`field_id`)
15
-) REPLACE=MyISAM;
15
+) ENGINE=MyISAM;
16 16
 
17 17
 -- --------------------------------------------------------
18 18
 
... ...
@@ -26,7 +26,7 @@ CREATE TABLE `fanfiction_authorinfo` (
26 26
   `info` varchar(255) NOT NULL default '',
27 27
   PRIMARY KEY  (`uid`,`field`),
28 28
   KEY `uid` (`uid`)
29
-) REPLACE=MyISAM;
29
+) ENGINE=MyISAM;
30 30
 
31 31
 -- --------------------------------------------------------
32 32
 
... ...
@@ -50,7 +50,7 @@ CREATE TABLE `fanfiction_authorprefs` (
50 50
   `contact` tinyint(1) NOT NULL default '0',
51 51
   `stories` int(11) NOT NULL default '',
52 52
   PRIMARY KEY  (`uid`)
53
-) REPLACE=MyISAM;
53
+) ENGINE=MyISAM;
54 54
 
55 55
 -- --------------------------------------------------------
56 56
 
... ...
@@ -72,7 +72,7 @@ CREATE TABLE `fanfiction_authors` (
72 72
   PRIMARY KEY  (`uid`),
73 73
   KEY `penname` (`penname`),
74 74
   KEY `admincreated` (`admincreated`)
75
-) REPLACE=MyISAM;
75
+) ENGINE=MyISAM;
76 76
 
77 77
 -- --------------------------------------------------------
78 78
 
... ...
@@ -89,7 +89,7 @@ CREATE TABLE `fanfiction_blocks` (
89 89
   `block_variables` text NOT NULL,
90 90
   PRIMARY KEY  (`block_id`),
91 91
   KEY `block_name` (`block_name`)
92
-) REPLACE=MyISAM;
92
+) ENGINE=MyISAM;
93 93
 
94 94
 -- --------------------------------------------------------
95 95
 
... ...
@@ -109,7 +109,7 @@ CREATE TABLE `fanfiction_categories` (
109 109
   `numitems` int(11) NOT NULL default '0',
110 110
   PRIMARY KEY  (`catid`),
111 111
   KEY `byparent` (`parentcatid`,`displayorder`)
112
-) REPLACE=MyISAM;
112
+) ENGINE=MyISAM;
113 113
 
114 114
 -- --------------------------------------------------------
115 115
 
... ...
@@ -138,7 +138,7 @@ CREATE TABLE `fanfiction_chapters` (
138 138
   KEY `title` (`title`),
139 139
   KEY `validated` (`validated`),
140 140
   KEY `forstoryblock` (`sid`,`validated`)
141
-) REPLACE=MyISAM;
141
+) ENGINE=MyISAM;
142 142
 
143 143
 -- --------------------------------------------------------
144 144
 
... ...
@@ -155,7 +155,7 @@ CREATE TABLE `fanfiction_characters` (
155 155
   PRIMARY KEY  (`charid`),
156 156
   KEY `catid` (`catid`),
157 157
   KEY `charname` (`charname`)
158
-) REPLACE=MyISAM;
158
+) ENGINE=MyISAM;
159 159
 
160 160
 -- --------------------------------------------------------
161 161
 
... ...
@@ -169,7 +169,7 @@ CREATE TABLE `fanfiction_classes` (
169 169
   `class_name` varchar(100) NOT NULL default '',
170 170
   PRIMARY KEY  (`class_id`),
171 171
   KEY `byname` (`class_type`,`class_name`,`class_id`)
172
-) REPLACE=MyISAM;
172
+) ENGINE=MyISAM;
173 173
 
174 174
 -- --------------------------------------------------------
175 175
 
... ...
@@ -183,7 +183,7 @@ CREATE TABLE `fanfiction_classtypes` (
183 183
   `classtype_title` varchar(50) NOT NULL default '',
184 184
   PRIMARY KEY  (`classtype_id`),
185 185
   UNIQUE KEY `classtype_name` (`classtype_name`)
186
-) REPLACE=MyISAM;
186
+) ENGINE=MyISAM;
187 187
 
188 188
 -- --------------------------------------------------------
189 189
 
... ...
@@ -195,7 +195,7 @@ CREATE TABLE `fanfiction_coauthors` (
195 195
   `sid` int(11) NOT NULL default '0',
196 196
   `uid` int(11) NOT NULL default '0',
197 197
   PRIMARY KEY  (`sid`,`uid`),
198
-) REPLACE=MyISAM;
198
+) ENGINE=MyISAM;
199 199
 -- --------------------------------------------------------
200 200
 
201 201
 -- 
... ...
@@ -209,7 +209,7 @@ CREATE TABLE `fanfiction_codeblocks` (
209 209
   `code_module` varchar(60) default NULL,
210 210
   PRIMARY KEY  (`code_id`),
211 211
   KEY `code_type` (`code_type`)
212
-) REPLACE=MyISAM;
212
+) ENGINE=MyISAM;
213 213
 
214 214
 -- --------------------------------------------------------
215 215
 
... ...
@@ -225,7 +225,7 @@ CREATE TABLE `fanfiction_comments` (
225 225
   `time` int(10) unsigned NOT NULL default '0',
226 226
   PRIMARY KEY  (`cid`),
227 227
   KEY `commentlist` (`nid`,`time`)
228
-) REPLACE=MyISAM;
228
+) ENGINE=MyISAM;
229 229
 
230 230
 -- --------------------------------------------------------
231 231
 
... ...
@@ -240,7 +240,7 @@ CREATE TABLE `fanfiction_favorites` (
240 240
   `comments` text,
241 241
   UNIQUE KEY `byitem` (`item`,`type`,`uid`),
242 242
   UNIQUE KEY `byuid` (`uid`,`type`,`item`)
243
-) REPLACE=MyISAM;
243
+) ENGINE=MyISAM;
244 244
 
245 245
 -- --------------------------------------------------------
246 246
 
... ...
@@ -256,7 +256,7 @@ CREATE TABLE `fanfiction_inseries` (
256 256
   `inorder` int(11) NOT NULL default '0',
257 257
   PRIMARY KEY  (`sid`,`seriesid`),
258 258
   KEY `seriesid` (`seriesid`,`inorder`)
259
-) REPLACE=MyISAM;
259
+) ENGINE=MyISAM;
260 260
 
261 261
 -- --------------------------------------------------------
262 262
 
... ...
@@ -272,7 +272,7 @@ CREATE TABLE `fanfiction_log` (
272 272
   `log_timestamp` int(10) unsigned NOT NULL default '0',
273 273
   `log_type` char(2) NOT NULL default '',
274 274
   PRIMARY KEY  (`log_id`)
275
-) REPLACE=MyISAM;
275
+) ENGINE=MyISAM;
276 276
 
277 277
 -- --------------------------------------------------------
278 278
 
... ...
@@ -287,7 +287,7 @@ CREATE TABLE `fanfiction_messages` (
287 287
   `message_text` text,
288 288
   PRIMARY KEY  (`message_id`),
289 289
   KEY `message_name` (`message_name`)
290
-) REPLACE=MyISAM;
290
+) ENGINE=MyISAM;
291 291
 
292 292
 -- --------------------------------------------------------
293 293
 
... ...
@@ -301,7 +301,7 @@ CREATE TABLE `fanfiction_modules` (
301 301
   `version` varchar(10) NOT NULL default '1.0',
302 302
   PRIMARY KEY  (`id`),
303 303
   KEY `name_version` (`name`,`version`)
304
-) REPLACE=MyISAM;
304
+) ENGINE=MyISAM;
305 305
 
306 306
 -- --------------------------------------------------------
307 307
 
... ...
@@ -317,7 +317,7 @@ CREATE TABLE `fanfiction_news` (
317 317
   `time` int(10) unsigned NOT NULL default '0',
318 318
   `comments` int(11) NOT NULL default '0',
319 319
   PRIMARY KEY  (`nid`)
320
-) REPLACE=MyISAM;
320
+) ENGINE=MyISAM;
321 321
 
322 322
 -- --------------------------------------------------------
323 323
 
... ...
@@ -334,7 +334,7 @@ CREATE TABLE `fanfiction_pagelinks` (
334 334
   `link_access` tinyint(4) NOT NULL default '0',
335 335
   PRIMARY KEY  (`link_id`),
336 336
   KEY `link_name` (`link_name`)
337
-) REPLACE=MyISAM;
337
+) ENGINE=MyISAM;
338 338
 
339 339
 -- --------------------------------------------------------
340 340
 
... ...
@@ -353,7 +353,7 @@ CREATE TABLE `fanfiction_panels` (
353 353
   `panel_type` varchar(20) NOT NULL default 'A',
354 354
   PRIMARY KEY  (`panel_id`),
355 355
   KEY `panel_type` (`panel_type`,`panel_name`)
356
-) REPLACE=MyISAM;
356
+) ENGINE=MyISAM;
357 357
 
358 358
 -- --------------------------------------------------------
359 359
 
... ...
@@ -368,7 +368,7 @@ CREATE TABLE `fanfiction_ratings` (
368 368
   `warningtext` text NOT NULL,
369 369
   PRIMARY KEY  (`rid`),
370 370
   KEY `rating` (`rating`)
371
-) REPLACE=MyISAM;
371
+) ENGINE=MyISAM;
372 372
 
373 373
 -- --------------------------------------------------------
374 374
 
... ...
@@ -394,7 +394,7 @@ CREATE TABLE `fanfiction_reviews` (
394 394
   KEY `avgrating` (`type`,`item`,`rating`),
395 395
   KEY `bychapter` (`chapid`,`rating`),
396 396
   KEY `byuid` (`uid`,`item`,`type`)
397
-) REPLACE=MyISAM;
397
+) ENGINE=MyISAM;
398 398
 
399 399
 -- --------------------------------------------------------
400 400
 
... ...
@@ -420,7 +420,7 @@ CREATE TABLE `fanfiction_series` (
420 420
   PRIMARY KEY  (`seriesid`),
421 421
   KEY `catid` (`catid`),
422 422
   KEY `owner` (`uid`,`title`)
423
-) REPLACE=MyISAM;
423
+) ENGINE=MyISAM;
424 424
 
425 425
 -- --------------------------------------------------------
426 426
 -- 
... ...
@@ -438,7 +438,7 @@ CREATE TABLE `fanfiction_stats` (
438 438
   `members` int(11) NOT NULL default '0',
439 439
   `reviewers` int(11) NOT NULL default '0',
440 440
   `newestmember` int(11) NOT NULL default '0'
441
-) REPLACE=MyISAM;
441
+) ENGINE=MyISAM;
442 442
 
443 443
 -- --------------------------------------------------------
444 444
 
... ...
@@ -480,7 +480,7 @@ CREATE TABLE `fanfiction_stories` (
480 480
   KEY `challenges` (`challenges`),
481 481
   KEY `validateduid` (`validated`,`uid`),
482 482
   KEY `recent` (`updated`,`validated`)
483
-) REPLACE=MyISAM;
483
+) ENGINE=MyISAM;
484 484
 
485 485
 -- --------------------------------------------------------
486 486
 
... ...
@@ -549,4 +549,4 @@ CREATE TABLE `fanfiction_settings` (
549 549
   `rectarget` tinyint(1) NOT NULL default '0',
550 550
   `autovalrecs` tinyint(1) NOT NULL default '0',
551 551
   PRIMARY KEY  (`sitekey`)
552
-) REPLACE=MyISAM;
552
+) ENGINE=MyISAM;
Browse code

fix for default value of IP fields (localhost)

Jimako authored on 2024/04/09 08:01:51
Showing 1 changed files
... ...
@@ -268,7 +268,7 @@ CREATE TABLE `fanfiction_log` (
268 268
   `log_id` int(11) NOT NULL auto_increment,
269 269
   `log_action` varchar(255) default NULL,
270 270
   `log_uid` int(11) NOT NULL default '0',
271
-  `log_ip` int(11) default NULL,
271
+  `log_ip` varbinary(16) DEFAULT NULL,
272 272
   `log_timestamp` int(10) unsigned NOT NULL default '0',
273 273
   `log_type` char(2) NOT NULL default '',
274 274
   PRIMARY KEY  (`log_id`)
... ...
@@ -549,4 +549,4 @@ CREATE TABLE `fanfiction_settings` (
549 549
   `rectarget` tinyint(1) NOT NULL default '0',
550 550
   `autovalrecs` tinyint(1) NOT NULL default '0',
551 551
   PRIMARY KEY  (`sitekey`)
552
-) REPLACE=MyISAM;
553 552
\ No newline at end of file
553
+) REPLACE=MyISAM;
Browse code

3.5.6 efiction version

Jimako authored on 2024/03/09 16:09:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,552 @@
1
+-- 
2
+-- Table structure for table `fanfiction_authorfields`
3
+-- 
4
+
5
+CREATE TABLE `fanfiction_authorfields` (
6
+  `field_id` int(11) NOT NULL auto_increment,
7
+  `field_type` tinyint(4) NOT NULL default '0',
8
+  `field_name` varchar(30) NOT NULL default '',
9
+  `field_title` varchar(255) NOT NULL default '',
10
+  `field_options` text,
11
+  `field_code_in` text,
12
+  `field_code_out` text,
13
+  `field_on` tinyint(1) NOT NULL default '0',
14
+  PRIMARY KEY  (`field_id`)
15
+) REPLACE=MyISAM;
16
+
17
+-- --------------------------------------------------------
18
+
19
+-- 
20
+-- Table structure for table `fanfiction_authorinfo`
21
+-- 
22
+
23
+CREATE TABLE `fanfiction_authorinfo` (
24
+  `uid` int(11) NOT NULL default '0',
25
+  `field` int(11) NOT NULL default '0',
26
+  `info` varchar(255) NOT NULL default '',
27
+  PRIMARY KEY  (`uid`,`field`),
28
+  KEY `uid` (`uid`)
29
+) REPLACE=MyISAM;
30
+
31
+-- --------------------------------------------------------
32
+
33
+-- 
34
+-- Table structure for table `fanfiction_authorprefs`
35
+-- 
36
+
37
+CREATE TABLE `fanfiction_authorprefs` (
38
+  `uid` int(11) NOT NULL default '0',
39
+  `newreviews` tinyint(1) NOT NULL default '0',
40
+  `newrespond` tinyint(1) NOT NULL default '0',
41
+  `ageconsent` tinyint(1) NOT NULL default '0',
42
+  `alertson` tinyint(1) NOT NULL default '0',
43
+  `tinyMCE` tinyint(1) NOT NULL default '0',
44
+  `sortby` tinyint(1) NOT NULL default '0',
45
+  `storyindex` tinyint(1) NOT NULL default '0',
46
+  `validated` tinyint(1) NOT NULL default '0',
47
+  `userskin` varchar(60) NOT NULL default 'default',
48
+  `level` tinyint(1) NOT NULL default '0',
49
+  `categories` varchar(200) NOT NULL default '0',
50
+  `contact` tinyint(1) NOT NULL default '0',
51
+  `stories` int(11) NOT NULL default '',
52
+  PRIMARY KEY  (`uid`)
53
+) REPLACE=MyISAM;
54
+
55
+-- --------------------------------------------------------
56
+
57
+-- 
58
+-- Table structure for table `fanfiction_authors`
59
+-- 
60
+
61
+CREATE TABLE `fanfiction_authors` (
62
+  `uid` int(11) NOT NULL auto_increment,
63
+  `penname` varchar(200) NOT NULL default '',
64
+  `realname` varchar(200) NOT NULL default '',
65
+  `email` varchar(200) NOT NULL default '',
66
+  `website` varchar(200) NOT NULL default '',
67
+  `bio` text NOT NULL,
68
+  `image` varchar(200) NOT NULL default '',
69
+  `date`  int(10) unsigned NOT NULL default '0',
70
+  `admincreated` int(11) NOT NULL default '0',
71
+  `password` varchar(40) NOT NULL default '0',
72
+  PRIMARY KEY  (`uid`),
73
+  KEY `penname` (`penname`),
74
+  KEY `admincreated` (`admincreated`)
75
+) REPLACE=MyISAM;
76
+
77
+-- --------------------------------------------------------
78
+
79
+-- 
80
+-- Table structure for table `fanfiction_blocks`
81
+-- 
82
+
83
+CREATE TABLE `fanfiction_blocks` (
84
+  `block_id` int(11) NOT NULL auto_increment,
85
+  `block_name` varchar(30) NOT NULL default '',
86
+  `block_title` varchar(150) NOT NULL default '',
87
+  `block_file` varchar(200) NOT NULL default '',
88
+  `block_status` tinyint(1) NOT NULL default '0',
89
+  `block_variables` text NOT NULL,
90
+  PRIMARY KEY  (`block_id`),
91
+  KEY `block_name` (`block_name`)
92
+) REPLACE=MyISAM;
93
+
94
+-- --------------------------------------------------------
95
+
96
+-- 
97
+-- Table structure for table `fanfiction_categories`
98
+-- 
99
+
100
+CREATE TABLE `fanfiction_categories` (
101
+  `catid` int(11) NOT NULL auto_increment,
102
+  `parentcatid` int(11) NOT NULL default '-1',
103
+  `category` varchar(60) NOT NULL default '',
104
+  `description` text NOT NULL,
105
+  `image` varchar(100) NOT NULL default '',
106
+  `locked` tinyint(4) NOT NULL default '0',
107
+  `leveldown` tinyint(4) NOT NULL default '0',
108
+  `displayorder` int(4) NOT NULL default '0',
109
+  `numitems` int(11) NOT NULL default '0',
110
+  PRIMARY KEY  (`catid`),
111
+  KEY `byparent` (`parentcatid`,`displayorder`)
112
+) REPLACE=MyISAM;
113
+
114
+-- --------------------------------------------------------
115
+
116
+-- 
117
+-- Table structure for table `fanfiction_chapters`
118
+-- 
119
+
120
+CREATE TABLE `fanfiction_chapters` (
121
+  `chapid` int(11) NOT NULL auto_increment,
122
+  `title` varchar(250) NOT NULL default '',
123
+  `inorder` int(11) NOT NULL default '0',
124
+  `notes` text NOT NULL,
125
+  `storytext` text NOT NULL,
126
+  `endnotes` text,
127
+  `validated` tinyint(4) NOT NULL default '0',
128
+  `wordcount` int(11) NOT NULL default '0',
129
+  `rating` tinyint(4) NOT NULL default '0',
130
+  `reviews` smallint(6) NOT NULL default '0',
131
+  `sid` int(11) NOT NULL default '0',
132
+  `uid` int(11) NOT NULL default '0',
133
+  `count` int(11) NOT NULL default '0',
134
+  PRIMARY KEY  (`chapid`),
135
+  KEY `sid` (`sid`),
136
+  KEY `uid` (`uid`),
137
+  KEY `inorder` (`inorder`),
138
+  KEY `title` (`title`),
139
+  KEY `validated` (`validated`),
140
+  KEY `forstoryblock` (`sid`,`validated`)
141
+) REPLACE=MyISAM;
142
+
143
+-- --------------------------------------------------------
144
+
145
+-- 
146
+-- Table structure for table `fanfiction_characters`
147
+-- 
148
+
149
+CREATE TABLE `fanfiction_characters` (
150
+  `charid` int(11) NOT NULL auto_increment,
151
+  `catid` int(11) NOT NULL default '0',
152
+  `charname` varchar(60) NOT NULL default '',
153
+  `bio` text NOT NULL,
154
+  `image` varchar(200) NOT NULL default '',
155
+  PRIMARY KEY  (`charid`),
156
+  KEY `catid` (`catid`),
157
+  KEY `charname` (`charname`)
158
+) REPLACE=MyISAM;
159
+
160
+-- --------------------------------------------------------
161
+
162
+-- 
163
+-- Table structure for table `fanfiction_classes`
164
+-- 
165
+
166
+CREATE TABLE `fanfiction_classes` (
167
+  `class_id` int(11) NOT NULL auto_increment,
168
+  `class_type` int(11) NOT NULL default '0',
169
+  `class_name` varchar(100) NOT NULL default '',
170
+  PRIMARY KEY  (`class_id`),
171
+  KEY `byname` (`class_type`,`class_name`,`class_id`)
172
+) REPLACE=MyISAM;
173
+
174
+-- --------------------------------------------------------
175
+
176
+-- 
177
+-- Table structure for table `fanfiction_classtypes`
178
+-- 
179
+
180
+CREATE TABLE `fanfiction_classtypes` (
181
+  `classtype_id` int(11) NOT NULL auto_increment,
182
+  `classtype_name` varchar(50) NOT NULL default '',
183
+  `classtype_title` varchar(50) NOT NULL default '',
184
+  PRIMARY KEY  (`classtype_id`),
185
+  UNIQUE KEY `classtype_name` (`classtype_name`)
186
+) REPLACE=MyISAM;
187
+
188
+-- --------------------------------------------------------
189
+
190
+-- 
191
+-- Table structure for table `fanfiction_coauthors`
192
+-- 
193
+
194
+CREATE TABLE `fanfiction_coauthors` (
195
+  `sid` int(11) NOT NULL default '0',
196
+  `uid` int(11) NOT NULL default '0',
197
+  PRIMARY KEY  (`sid`,`uid`),
198
+) REPLACE=MyISAM;
199
+-- --------------------------------------------------------
200
+
201
+-- 
202
+-- Table structure for table `fanfiction_codeblocks`
203
+-- 
204
+
205
+CREATE TABLE `fanfiction_codeblocks` (
206
+  `code_id` int(11) NOT NULL auto_increment,
207
+  `code_text` text NOT NULL,
208
+  `code_type` varchar(20) default NULL,
209
+  `code_module` varchar(60) default NULL,
210
+  PRIMARY KEY  (`code_id`),
211
+  KEY `code_type` (`code_type`)
212
+) REPLACE=MyISAM;
213
+
214
+-- --------------------------------------------------------
215
+
216
+-- 
217
+-- Table structure for table `fanfiction_comments`
218
+-- 
219
+
220
+CREATE TABLE `fanfiction_comments` (
221
+  `cid` int(11) NOT NULL auto_increment,
222
+  `nid` int(11) NOT NULL default '0',
223
+  `uid` int(11) NOT NULL default '0',
224
+  `comment` text NOT NULL,
225
+  `time` int(10) unsigned NOT NULL default '0',
226
+  PRIMARY KEY  (`cid`),
227
+  KEY `commentlist` (`nid`,`time`)
228
+) REPLACE=MyISAM;
229
+
230
+-- --------------------------------------------------------
231
+
232
+-- 
233
+-- Table structure for table `fanfiction_favorites`
234
+-- 
235
+
236
+CREATE TABLE `fanfiction_favorites` (
237
+  `uid` int(11) NOT NULL default '0',
238
+  `item` int(11) NOT NULL default '0',
239
+  `type` char(2) NOT NULL default '',
240
+  `comments` text,
241
+  UNIQUE KEY `byitem` (`item`,`type`,`uid`),
242
+  UNIQUE KEY `byuid` (`uid`,`type`,`item`)
243
+) REPLACE=MyISAM;
244
+
245
+-- --------------------------------------------------------
246
+
247
+-- 
248
+-- Table structure for table `fanfiction_inseries`
249
+-- 
250
+
251
+CREATE TABLE `fanfiction_inseries` (
252
+  `seriesid` int(11) NOT NULL default '0',
253
+  `sid` int(11) NOT NULL default '0',
254
+  `subseriesid` int(11) NOT NULL default '0',
255
+  `confirmed` int(11) NOT NULL default '0',
256
+  `inorder` int(11) NOT NULL default '0',
257
+  PRIMARY KEY  (`sid`,`seriesid`),
258
+  KEY `seriesid` (`seriesid`,`inorder`)
259
+) REPLACE=MyISAM;
260
+
261
+-- --------------------------------------------------------
262
+
263
+-- 
264
+-- Table structure for table `fanfiction_log`
265
+-- 
266
+
267
+CREATE TABLE `fanfiction_log` (
268
+  `log_id` int(11) NOT NULL auto_increment,
269
+  `log_action` varchar(255) default NULL,
270
+  `log_uid` int(11) NOT NULL default '0',
271
+  `log_ip` int(11) default NULL,
272
+  `log_timestamp` int(10) unsigned NOT NULL default '0',
273
+  `log_type` char(2) NOT NULL default '',
274
+  PRIMARY KEY  (`log_id`)
275
+) REPLACE=MyISAM;
276
+
277
+-- --------------------------------------------------------
278
+
279
+-- 
280
+-- Table structure for table `fanfiction_messages`
281
+-- 
282
+
283
+CREATE TABLE `fanfiction_messages` (
284
+  `message_id` int(11) NOT NULL auto_increment,
285
+  `message_name` varchar(50) NOT NULL default '',
286
+  `message_title` varchar(200) NOT NULL default '',
287
+  `message_text` text,
288
+  PRIMARY KEY  (`message_id`),
289
+  KEY `message_name` (`message_name`)
290
+) REPLACE=MyISAM;
291
+
292
+-- --------------------------------------------------------
293
+
294
+-- 
295
+-- Table structure for table `fanfiction_modules`
296
+-- 
297
+
298
+CREATE TABLE `fanfiction_modules` (
299
+  `id` int(11) NOT NULL,
300
+  `name` varchar(100) NOT NULL default 'Test Module',
301
+  `version` varchar(10) NOT NULL default '1.0',
302
+  PRIMARY KEY  (`id`),
303
+  KEY `name_version` (`name`,`version`)
304
+) REPLACE=MyISAM;
305
+
306
+-- --------------------------------------------------------
307
+
308
+-- 
309
+-- Table structure for table `fanfiction_news`
310
+-- 
311
+
312
+CREATE TABLE `fanfiction_news` (
313
+  `nid` int(11) NOT NULL auto_increment,
314
+  `author` varchar(60) NOT NULL default '',
315
+  `title` varchar(255) NOT NULL default '',
316
+  `story` text NOT NULL,
317
+  `time` int(10) unsigned NOT NULL default '0',
318
+  `comments` int(11) NOT NULL default '0',
319
+  PRIMARY KEY  (`nid`)
320
+) REPLACE=MyISAM;
321
+
322
+-- --------------------------------------------------------
323
+
324
+-- 
325
+-- Table structure for table `fanfiction_pagelinks`
326
+-- 
327
+
328
+CREATE TABLE `fanfiction_pagelinks` (
329
+  `link_id` int(11) NOT NULL auto_increment,
330
+  `link_name` varchar(50) NOT NULL default '',
331
+  `link_text` varchar(100) NOT NULL default '',
332
+  `link_url` varchar(250) NOT NULL default '',
333
+  `link_target` char(1) NOT NULL default '0',
334
+  `link_access` tinyint(4) NOT NULL default '0',
335
+  PRIMARY KEY  (`link_id`),
336
+  KEY `link_name` (`link_name`)
337
+) REPLACE=MyISAM;
338
+
339
+-- --------------------------------------------------------
340
+
341
+-- 
342
+-- Table structure for table `fanfiction_panels`
343
+-- 
344
+
345
+CREATE TABLE `fanfiction_panels` (
346
+  `panel_id` int(11) NOT NULL auto_increment,
347
+  `panel_name` varchar(50) NOT NULL default 'unknown',
348
+  `panel_title` varchar(100) NOT NULL default 'Unnamed Panel',
349
+  `panel_url` varchar(100) default NULL,
350
+  `panel_level` tinyint(4) NOT NULL default '3',
351
+  `panel_order` tinyint(4) NOT NULL default '0',
352
+  `panel_hidden` tinyint(1) NOT NULL default '0',
353
+  `panel_type` varchar(20) NOT NULL default 'A',
354
+  PRIMARY KEY  (`panel_id`),
355
+  KEY `panel_type` (`panel_type`,`panel_name`)
356
+) REPLACE=MyISAM;
357
+
358
+-- --------------------------------------------------------
359
+
360
+-- 
361
+-- Table structure for table `fanfiction_ratings`
362
+-- 
363
+
364
+CREATE TABLE `fanfiction_ratings` (
365
+  `rid` int(11) NOT NULL auto_increment,
366
+  `rating` varchar(60) NOT NULL default '',
367
+  `ratingwarning` int(11) NOT NULL default '0',
368
+  `warningtext` text NOT NULL,
369
+  PRIMARY KEY  (`rid`),
370
+  KEY `rating` (`rating`)
371
+) REPLACE=MyISAM;
372
+
373
+-- --------------------------------------------------------
374
+
375
+-- 
376
+-- Table structure for table `fanfiction_reviews`
377
+-- 
378
+
379
+CREATE TABLE `fanfiction_reviews` (
380
+  `reviewid` int(11) NOT NULL auto_increment,
381
+  `item` int(11) NOT NULL default '0',
382
+  `chapid` int(11) NOT NULL default '0',
383
+  `reviewer` varchar(60) NOT NULL default '0',
384
+  `uid` int(11) NOT NULL default '0',
385
+  `review` text NOT NULL,
386
+  `date` int(10) unsigned NOT NULL default '0',
387
+  `rating` int(11) NOT NULL default '0',
388
+  `respond` char(1) NOT NULL default '0',
389
+  `type` char(2) NOT NULL default 'ST',
390
+  PRIMARY KEY  (`reviewid`),
391
+  KEY `psid` (`chapid`),
392
+  KEY `rating` (`rating`),
393
+  KEY `respond` (`respond`),
394
+  KEY `avgrating` (`type`,`item`,`rating`),
395
+  KEY `bychapter` (`chapid`,`rating`),
396
+  KEY `byuid` (`uid`,`item`,`type`)
397
+) REPLACE=MyISAM;
398
+
399
+-- --------------------------------------------------------
400
+
401
+-- 
402
+-- Table structure for table `fanfiction_series`
403
+-- 
404
+
405
+CREATE TABLE `fanfiction_series` (
406
+  `seriesid` int(11) NOT NULL auto_increment,
407
+  `title` varchar(200) NOT NULL default '',
408
+  `summary` text,
409
+  `uid` int(11) NOT NULL default '0',
410
+  `isopen` tinyint(4) NOT NULL default '0',
411
+  `catid` varchar(200) NOT NULL default '0',
412
+  `rating` tinyint(4) NOT NULL default '0',
413
+  `classes` varchar(200) default NULL,
414
+  `characters` varchar(250) NOT NULL default '',
415
+  `reviews` smallint(6) NOT NULL default '0',
416
+  `numstories` int(11) NOT NULL default '0',
417
+  `warnings` varchar(250) NOT NULL default '',
418
+  `challenges` varchar(200) NOT NULL default '',
419
+  `genres` varchar(250) NOT NULL default '',
420
+  PRIMARY KEY  (`seriesid`),
421
+  KEY `catid` (`catid`),
422
+  KEY `owner` (`uid`,`title`)
423
+) REPLACE=MyISAM;
424
+
425
+-- --------------------------------------------------------
426
+-- 
427
+-- Table structure for table `fanfiction_stats`
428
+-- 
429
+
430
+CREATE TABLE `fanfiction_stats` (
431
+  `sitekey` varchar(50) NOT NULL default '0',
432
+  `stories` int(11) NOT NULL default '0',
433
+  `chapters` int(11) NOT NULL default '0',
434
+  `series` int(11) NOT NULL default '0',
435
+  `reviews` int(11) NOT NULL default '0',
436
+  `wordcount` int(11) NOT NULL default '0',
437
+  `authors` int(11) NOT NULL default '0',
438
+  `members` int(11) NOT NULL default '0',
439
+  `reviewers` int(11) NOT NULL default '0',
440
+  `newestmember` int(11) NOT NULL default '0'
441
+) REPLACE=MyISAM;
442
+
443
+-- --------------------------------------------------------
444
+
445
+-- 
446
+-- Table structure for table `fanfiction_stories`
447
+-- 
448
+
449
+CREATE TABLE `fanfiction_stories` (
450
+  `sid` int(11) NOT NULL auto_increment,
451
+  `title` varchar(200) NOT NULL default '',
452
+  `summary` text,
453
+  `storynotes` text,
454
+  `catid` varchar(100) NOT NULL default '0',
455
+  `classes` varchar(200) default NULL,
456
+  `charid` varchar(250) NOT NULL default '0',
457
+  `rid` varchar(25) NOT NULL default '0',
458
+  `date` int(10) unsigned NOT NULL default '0',
459
+  `updated` int(10) unsigned NOT NULL default '0',
460
+  `uid` int(11) NOT NULL default '0',
461
+  `coauthors` varchar(200) default NULL,
462
+  `featured` tinyint(4) NOT NULL default '0',
463
+  `validated` tinyint(4) NOT NULL default '0',
464
+  `completed` tinyint(4) NOT NULL default '0',
465
+  `rr` tinyint(4) NOT NULL default '0',
466
+  `wordcount` int(11) NOT NULL default '0',
467
+  `rating` tinyint(4) NOT NULL default '0',
468
+  `reviews` smallint(6) NOT NULL default '0',
469
+  `count` int(11) NOT NULL default '0',
470
+  `challenges` varchar(200) NOT NULL default '0',
471
+  PRIMARY KEY  (`sid`),
472
+  KEY `title` (`title`),
473
+  KEY `catid` (`catid`),
474
+  KEY `charid` (`charid`),
475
+  KEY `rid` (`rid`),
476
+  KEY `uid` (`uid`),
477
+  KEY `featured` (`featured`),
478
+  KEY `completed` (`completed`),
479
+  KEY `rr` (`rr`),
480
+  KEY `challenges` (`challenges`),
481
+  KEY `validateduid` (`validated`,`uid`),
482
+  KEY `recent` (`updated`,`validated`)
483
+) REPLACE=MyISAM;
484
+
485
+-- --------------------------------------------------------
486
+
487
+-- 
488
+-- Table structure for table `fanfiction_settings`
489
+-- 
490
+
491
+CREATE TABLE `fanfiction_settings` (
492
+  `sitekey` varchar(50) NOT NULL default '1',
493
+  `sitename` varchar(200) NOT NULL default 'Your Site',
494
+  `slogan` varchar(200) NOT NULL default 'It''s a cool site!',
495
+  `url` varchar(200) NOT NULL default 'http://www.yoursite.com',
496
+  `siteemail` varchar(200) NOT NULL default 'you@yoursite.com',
497
+  `tableprefix` varchar(50) NOT NULL default '',
498
+  `skin` varchar(50) NOT NULL default 'default',
499
+  `hiddenskins` varchar(255) default '',
500
+  `language` varchar(10) NOT NULL default 'en',
501
+  `submissionsoff` tinyint(1) NOT NULL default '0',
502
+  `storiespath` varchar(20) NOT NULL default 'stories',
503
+  `store` varchar(5) NOT NULL default 'files',
504
+  `autovalidate` tinyint(1) NOT NULL default '0',
505
+  `coauthallowed` int(1) NOT NULL default '0',
506
+  `maxwords` int(11) NOT NULL default '0',
507
+  `minwords` int(11) NOT NULL default '0',
508
+  `imageupload` tinyint(1) NOT NULL default '0',
509
+  `imageheight` int(11) NOT NULL default '200',
510
+  `imagewidth` int(11) NOT NULL default '200',
511
+  `roundrobins` tinyint(1) NOT NULL default '0',
512
+  `allowseries` tinyint(4) NOT NULL default '2',
513
+  `tinyMCE` tinyint(1) NOT NULL default '0',
514
+  `allowed_tags` varchar(200) NOT NULL default '<b><i><u><center><hr><p><br /><br><blockquote><ol><ul><li><img><strong><em>',
515
+  `favorites` tinyint(1) NOT NULL default '0',
516
+  `multiplecats` tinyint(1) NOT NULL default '0',
517
+  `newscomments` tinyint(1) NOT NULL default '0',
518
+  `logging` tinyint(1) NOT NULL default '0',
519
+  `maintenance` tinyint(1) NOT NULL default '0',
520
+  `debug` tinyint(1) NOT NULL default '0',
521
+  `captcha` tinyint(1) NOT NULL default '0',
522
+  `dateformat` varchar(20) NOT NULL default 'd/m/y',
523
+  `timeformat` varchar(20) NOT NULL default '- h:i a',
524
+  `recentdays` tinyint(2) NOT NULL default '7',
525
+  `displaycolumns` tinyint(1) NOT NULL default '1',
526
+  `itemsperpage` tinyint(2) NOT NULL default '25',
527
+  `extendcats` tinyint(1) NOT NULL default '0',
528
+  `displayindex` tinyint(1) NOT NULL default '0',
529
+  `defaultsort` tinyint(1) NOT NULL default '0',
530
+  `displayprofile` tinyint(1) NOT NULL default '0',
531
+  `linkstyle` tinyint(1) NOT NULL default '0',
532
+  `linkrange` tinyint(2) NOT NULL default '5',
533
+  `reviewsallowed` tinyint(1) NOT NULL default '0',
534
+  `ratings` tinyint(1) NOT NULL default '0',
535
+  `anonreviews` tinyint(1) NOT NULL default '0',
536
+  `revdelete` tinyint(1) NOT NULL default '0',
537
+  `rateonly` tinyint(1) NOT NULL default '0',
538
+  `pwdsetting` tinyint(1) NOT NULL default '0',
539
+  `alertson` tinyint(1) NOT NULL default '0',
540
+  `disablepopups` tinyint(1) NOT NULL default '0',
541
+  `agestatement` tinyint(1) NOT NULL default '0',
542
+  `words` text,
543
+  `version` varchar(10) NOT NULL default '3.0',
544
+  `smtp_host` varchar(200) default NULL,
545
+  `smtp_username` varchar(50) default NULL,
546
+  `smtp_password` varchar(50) default NULL,
547
+  `anonchallenges` tinyint(1) NOT NULL default '0',
548
+  `anonrecs` tinyint(1) NOT NULL default '0',
549
+  `rectarget` tinyint(1) NOT NULL default '0',
550
+  `autovalrecs` tinyint(1) NOT NULL default '0',
551
+  PRIMARY KEY  (`sitekey`)
552
+) REPLACE=MyISAM;
0 553
\ No newline at end of file