Quota tracking now works. Quota currently defaults to 100 for each user and resets...
[rock.divinelegy.git] / divinelegy.sql
1 -- MySQL dump 10.13 Distrib 5.5.38, for debian-linux-gnu (i686)
2 --
3 -- Host: localhost Database: divinelegy
4 -- ------------------------------------------------------
5 -- Server version 5.5.38-0ubuntu0.12.04.1
6
7 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10 /*!40101 SET NAMES utf8 */;
11 /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12 /*!40103 SET TIME_ZONE='+00:00' */;
13 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18 --
19 -- Table structure for table `artists`
20 --
21
22 DROP TABLE IF EXISTS `artists`;
23 /*!40101 SET @saved_cs_client = @@character_set_client */;
24 /*!40101 SET character_set_client = utf8 */;
25 CREATE TABLE `artists` (
26 `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
27 `name` varchar(255) NOT NULL,
28 PRIMARY KEY (`id`)
29 ) ENGINE=InnoDB AUTO_INCREMENT=339 DEFAULT CHARSET=latin1;
30 /*!40101 SET character_set_client = @saved_cs_client */;
31
32 --
33 -- Table structure for table `downloads`
34 --
35
36 DROP TABLE IF EXISTS `downloads`;
37 /*!40101 SET @saved_cs_client = @@character_set_client */;
38 /*!40101 SET character_set_client = utf8 */;
39 CREATE TABLE `downloads` (
40 `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
41 `file_id` mediumint(8) unsigned NOT NULL,
42 `user_id` mediumint(8) unsigned NOT NULL,
43 `timestamp` int(10) unsigned NOT NULL,
44 `ip` varchar(15) DEFAULT NULL,
45 PRIMARY KEY (`id`)
46 ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
47 /*!40101 SET character_set_client = @saved_cs_client */;
48
49 --
50 -- Table structure for table `files`
51 --
52
53 DROP TABLE IF EXISTS `files`;
54 /*!40101 SET @saved_cs_client = @@character_set_client */;
55 /*!40101 SET character_set_client = utf8 */;
56 CREATE TABLE `files` (
57 `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
58 `filename` varchar(255) NOT NULL,
59 `hash` varchar(255) NOT NULL,
60 `path` varchar(255) NOT NULL,
61 `mimetype` varchar(255) NOT NULL,
62 `size` int(10) unsigned NOT NULL,
63 `uploaded` int(10) unsigned NOT NULL,
64 PRIMARY KEY (`id`)
65 ) ENGINE=InnoDB AUTO_INCREMENT=267 DEFAULT CHARSET=latin1;
66 /*!40101 SET character_set_client = @saved_cs_client */;
67
68 --
69 -- Table structure for table `mirrors`
70 --
71
72 DROP TABLE IF EXISTS `mirrors`;
73 /*!40101 SET @saved_cs_client = @@character_set_client */;
74 /*!40101 SET character_set_client = utf8 */;
75 CREATE TABLE `mirrors` (
76 `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
77 `uri` varchar(255) DEFAULT NULL,
78 `file_id` mediumint(8) unsigned NOT NULL,
79 `source` varchar(255) NOT NULL,
80 PRIMARY KEY (`id`)
81 ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
82 /*!40101 SET character_set_client = @saved_cs_client */;
83
84 --
85 -- Table structure for table `packs`
86 --
87
88 DROP TABLE IF EXISTS `packs`;
89 /*!40101 SET @saved_cs_client = @@character_set_client */;
90 /*!40101 SET character_set_client = utf8 */;
91 CREATE TABLE `packs` (
92 `title` varchar(255) NOT NULL,
93 `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
94 `file_id` mediumint(8) unsigned DEFAULT NULL,
95 `user_id` mediumint(8) unsigned NOT NULL,
96 `banner_file_id` mediumint(8) unsigned DEFAULT NULL,
97 PRIMARY KEY (`id`)
98 ) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=latin1;
99 /*!40101 SET character_set_client = @saved_cs_client */;
100
101 --
102 -- Table structure for table `simfiles`
103 --
104
105 DROP TABLE IF EXISTS `simfiles`;
106 /*!40101 SET @saved_cs_client = @@character_set_client */;
107 /*!40101 SET character_set_client = utf8 */;
108 CREATE TABLE `simfiles` (
109 `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
110 `title` varchar(255) NOT NULL,
111 `artist_id` mediumint(8) unsigned NOT NULL,
112 `user_id` mediumint(8) unsigned NOT NULL,
113 `bpm_high` int(11) NOT NULL,
114 `bpm_low` int(11) NOT NULL,
115 `bpm_changes` int(1) DEFAULT NULL,
116 `stops` int(1) DEFAULT NULL,
117 `fg_changes` int(1) DEFAULT NULL,
118 `bg_changes` int(1) DEFAULT NULL,
119 `banner_file_id` mediumint(8) unsigned DEFAULT NULL,
120 `simfile_file_id` mediumint(8) unsigned DEFAULT NULL,
121 `pack_id` mediumint(8) unsigned DEFAULT NULL,
122 PRIMARY KEY (`id`)
123 ) ENGINE=InnoDB AUTO_INCREMENT=394 DEFAULT CHARSET=latin1;
124 /*!40101 SET character_set_client = @saved_cs_client */;
125
126 --
127 -- Table structure for table `step_artists`
128 --
129
130 DROP TABLE IF EXISTS `step_artists`;
131 /*!40101 SET @saved_cs_client = @@character_set_client */;
132 /*!40101 SET character_set_client = utf8 */;
133 CREATE TABLE `step_artists` (
134 `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
135 `tag` varchar(255) NOT NULL,
136 `user_id` mediumint(8) unsigned DEFAULT NULL,
137 PRIMARY KEY (`id`)
138 ) ENGINE=InnoDB AUTO_INCREMENT=146 DEFAULT CHARSET=latin1;
139 /*!40101 SET character_set_client = @saved_cs_client */;
140
141 --
142 -- Table structure for table `steps`
143 --
144
145 DROP TABLE IF EXISTS `steps`;
146 /*!40101 SET @saved_cs_client = @@character_set_client */;
147 /*!40101 SET character_set_client = utf8 */;
148 CREATE TABLE `steps` (
149 `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
150 `simfile_id` mediumint(8) unsigned NOT NULL,
151 `mode` enum('dance-single','dance-double') NOT NULL,
152 `rating` int(10) unsigned NOT NULL,
153 `difficulty` enum('Beginner','Easy','Medium','Hard','Challenge','Edit') NOT NULL,
154 `step_artist_id` mediumint(8) unsigned DEFAULT NULL,
155 PRIMARY KEY (`id`)
156 ) ENGINE=InnoDB AUTO_INCREMENT=439 DEFAULT CHARSET=latin1;
157 /*!40101 SET character_set_client = @saved_cs_client */;
158
159 --
160 -- Table structure for table `users`
161 --
162
163 DROP TABLE IF EXISTS `users`;
164 /*!40101 SET @saved_cs_client = @@character_set_client */;
165 /*!40101 SET character_set_client = utf8 */;
166 CREATE TABLE `users` (
167 `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
168 `email` varchar(255) NOT NULL,
169 `display_name` varchar(255) NOT NULL,
170 `facebook_id` varchar(255) DEFAULT NULL,
171 `auth_token` varchar(255) DEFAULT NULL,
172 `quota` mediumint(9) NOT NULL,
173 PRIMARY KEY (`id`)
174 ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
175 /*!40101 SET character_set_client = @saved_cs_client */;
176
177 --
178 -- Table structure for table `users_meta`
179 --
180
181 DROP TABLE IF EXISTS `users_meta`;
182 /*!40101 SET @saved_cs_client = @@character_set_client */;
183 /*!40101 SET character_set_client = utf8 */;
184 CREATE TABLE `users_meta` (
185 `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
186 `user_id` mediumint(8) unsigned NOT NULL,
187 `firstname` varchar(255) DEFAULT NULL,
188 `lastname` varchar(255) DEFAULT NULL,
189 `country` varchar(255) NOT NULL,
190 PRIMARY KEY (`id`)
191 ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
192 /*!40101 SET character_set_client = @saved_cs_client */;
193 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
194
195 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
196 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
197 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
198 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
199 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
200 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
201 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
202
203 -- Dump completed on 2014-11-28 16:05:02