root/veekun/trunk/script/gallery.sql

Revision 422, 3.4 kB (checked in by eevee, 9 months ago)

Changed all MyISAM tables to InnoDB, and changed one last latin1 table to UTF-8. (#58)
Unbeknowst to me, InnoDB always sorts rows by primary key, so this diff is very large just from moving rows around. Sorry.

Line 
1/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
2/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
3/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
4/*!40101 SET NAMES utf8 */;
5/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
6/*!40103 SET TIME_ZONE='+00:00' */;
7/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
8/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
9/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
10/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
11
12--
13-- Table structure for table `creators`
14--
15
16DROP TABLE IF EXISTS creators;
17SET @saved_cs_client     = @@character_set_client;
18SET character_set_client = utf8;
19CREATE TABLE creators (
20  id int(10) unsigned NOT NULL auto_increment,
21  user_id int(10) unsigned NOT NULL,
22  `name` varchar(32) NOT NULL,
23  item_count tinyint(3) unsigned default NULL,
24  PRIMARY KEY  (id)
25) ENGINE=InnoDB DEFAULT CHARSET=utf8;
26SET character_set_client = @saved_cs_client;
27
28--
29-- Table structure for table `gallery`
30--
31
32DROP TABLE IF EXISTS gallery;
33SET @saved_cs_client     = @@character_set_client;
34SET character_set_client = utf8;
35CREATE TABLE gallery (
36  id int(10) unsigned NOT NULL auto_increment,
37  creatorid int(10) unsigned NOT NULL default '0',
38  filename varchar(255) NOT NULL default '',
39  uploaderid int(10) unsigned NOT NULL default '0',
40  approverid int(10) unsigned NOT NULL default '0',
41  `time` int(10) unsigned NOT NULL default '0',
42  `hash` varchar(32) NOT NULL default '',
43  title varchar(48) NOT NULL default '',
44  description mediumtext NOT NULL,
45  height smallint(5) unsigned NOT NULL default '0',
46  width smallint(5) unsigned NOT NULL default '0',
47  seriesid int(10) unsigned NOT NULL default '0',
48  position tinyint(3) unsigned NOT NULL default '0',
49  `type` enum('sketch','lineart','colored','story','oekaki') NOT NULL default 'sketch',
50  PRIMARY KEY  (id),
51  UNIQUE KEY filename (filename)
52) ENGINE=InnoDB DEFAULT CHARSET=utf8;
53SET character_set_client = @saved_cs_client;
54
55--
56-- Table structure for table `gallery_keywords`
57--
58
59DROP TABLE IF EXISTS gallery_keywords;
60SET @saved_cs_client     = @@character_set_client;
61SET character_set_client = utf8;
62CREATE TABLE gallery_keywords (
63  id int(10) unsigned NOT NULL auto_increment,
64  keyword varchar(48) NOT NULL default '',
65  category varchar(48) NOT NULL default '',
66  description tinytext NOT NULL,
67  PRIMARY KEY  (id),
68  UNIQUE KEY keyword (keyword)
69) ENGINE=InnoDB DEFAULT CHARSET=utf8;
70SET character_set_client = @saved_cs_client;
71
72--
73-- Table structure for table `item_keywords`
74--
75
76DROP TABLE IF EXISTS item_keywords;
77SET @saved_cs_client     = @@character_set_client;
78SET character_set_client = utf8;
79CREATE TABLE item_keywords (
80  itemid int(10) unsigned NOT NULL default '0',
81  keywordid int(10) unsigned NOT NULL default '0',
82  PRIMARY KEY  (itemid,keywordid),
83  KEY itemid (itemid),
84  KEY keywordid (keywordid)
85) ENGINE=InnoDB DEFAULT CHARSET=utf8;
86SET character_set_client = @saved_cs_client;
87/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
88
89/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
90/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
91/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
92/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
93/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
94/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
95/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
Note: See TracBrowser for help on using the browser.