-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.sql
More file actions
executable file
·179 lines (145 loc) · 5.76 KB
/
Copy pathdatabase.sql
File metadata and controls
executable file
·179 lines (145 loc) · 5.76 KB
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
-- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 05, 2014 at 06:25 PM
-- Server version: 5.1.44
-- PHP Version: 5.3.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `database`
--
-- --------------------------------------------------------
--
-- Table structure for table `announcement`
--
CREATE TABLE IF NOT EXISTS `announcement` (
`id_announcement` mediumint(8) NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`body` text COLLATE utf8_unicode_ci NOT NULL,
`type` tinyint(4) NOT NULL DEFAULT '0',
`position` tinyint(4) NOT NULL DEFAULT '0',
`state` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_announcement`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `category`
--
CREATE TABLE IF NOT EXISTS `category` (
`id_category` mediumint(8) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`position` tinyint(4) NOT NULL DEFAULT '0',
`subcategories` mediumint(8) NOT NULL DEFAULT '0',
`files` mediumint(8) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_category`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `comment`
--
CREATE TABLE IF NOT EXISTS `comment` (
`id_comment` mediumint(8) NOT NULL AUTO_INCREMENT,
`id_file` mediumint(8) NOT NULL DEFAULT '0',
`id_user` mediumint(8) NOT NULL DEFAULT '0',
`body` text COLLATE utf8_unicode_ci NOT NULL,
`time` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_comment`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `file`
--
CREATE TABLE IF NOT EXISTS `file` (
`id_file` mediumint(8) NOT NULL AUTO_INCREMENT,
`id_store` mediumint(8) NOT NULL DEFAULT '0',
`id_category` mediumint(8) NOT NULL DEFAULT '0',
`id_subcategory` mediumint(8) NOT NULL DEFAULT '0',
`id_type` mediumint(8) NOT NULL DEFAULT '0',
`id_user` mediumint(8) NOT NULL DEFAULT '0',
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`downloads` int(10) NOT NULL DEFAULT '0',
`comments` int(10) NOT NULL DEFAULT '0',
`time` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_file`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `log`
--
CREATE TABLE IF NOT EXISTS `log` (
`id_log` mediumint(8) NOT NULL AUTO_INCREMENT,
`id_file` mediumint(8) NOT NULL DEFAULT '0',
`id_user` mediumint(8) NOT NULL DEFAULT '0',
`ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`time` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_log`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `online`
--
CREATE TABLE IF NOT EXISTS `online` (
`id_user` mediumint(8) NOT NULL DEFAULT '0',
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`time` int(10) NOT NULL DEFAULT '0',
UNIQUE KEY `id_user` (`id_user`),
KEY `time` (`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `store`
--
CREATE TABLE IF NOT EXISTS `store` (
`id_store` mediumint(8) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`alias` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`size` int(10) NOT NULL DEFAULT '0',
`extension` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`id_store`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `subcategory`
--
CREATE TABLE IF NOT EXISTS `subcategory` (
`id_subcategory` mediumint(8) NOT NULL AUTO_INCREMENT,
`id_category` mediumint(8) NOT NULL DEFAULT '0',
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`position` tinyint(4) NOT NULL DEFAULT '0',
`files` mediumint(8) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_subcategory`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `type`
--
CREATE TABLE IF NOT EXISTS `type` (
`id_type` mediumint(8) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`position` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`id_user` mediumint(8) NOT NULL AUTO_INCREMENT,
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`email_address` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`registered` int(10) NOT NULL DEFAULT '0',
`admin` tinyint(4) NOT NULL DEFAULT '0',
`inactive` tinyint(4) NOT NULL DEFAULT '0',
`login_count` mediumint(8) NOT NULL DEFAULT '0',
`last_login` int(10) NOT NULL DEFAULT '0',
`last_password_change` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_user`),
KEY `registered` (`registered`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;