-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload-website.sql
161 lines (131 loc) · 4.68 KB
/
upload-website.sql
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
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 01, 2017 at 06:56 PM
-- Server version: 5.5.53-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!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: `upload`
--
-- --------------------------------------------------------
--
-- Table structure for table `CodeVisiter`
--
CREATE TABLE IF NOT EXISTS `CodeVisiter` (
`ip` varchar(100) NOT NULL,
`Fork_id` varchar(50) NOT NULL,
`Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=960 ;
-- --------------------------------------------------------
--
-- Table structure for table `Comment`
--
CREATE TABLE IF NOT EXISTS `Comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(50) NOT NULL,
`Comment` varchar(250) NOT NULL,
`Fork_id` varchar(50) NOT NULL,
`Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`Ip` varchar(25) NOT NULL,
`SessionName` varchar(200) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
-- --------------------------------------------------------
--
-- Table structure for table `Error`
--
CREATE TABLE IF NOT EXISTS `Error` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`De` varchar(100) NOT NULL,
`Mime` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=197 ;
-- --------------------------------------------------------
--
-- Table structure for table `files`
--
CREATE TABLE IF NOT EXISTS `files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(10) NOT NULL,
`Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`Visiter` int(11) NOT NULL,
`country` varchar(50) NOT NULL DEFAULT 'none',
`ZipSize` varchar(500) NOT NULL,
`AllSize` varchar(500) NOT NULL,
`Title` varchar(1000) DEFAULT NULL,
`Image` varchar(1000) DEFAULT NULL,
`State` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3142 ;
-- --------------------------------------------------------
--
-- Table structure for table `Fork`
--
CREATE TABLE IF NOT EXISTS `Fork` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`StringId` varchar(30) NOT NULL,
`Html` text NOT NULL,
`Css` text NOT NULL,
`JavaScript` text NOT NULL,
`Ip` varchar(25) DEFAULT NULL,
`Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`Title` varchar(500) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `StringId` (`StringId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=149 ;
-- --------------------------------------------------------
--
-- Table structure for table `LikeCode`
--
CREATE TABLE IF NOT EXISTS `LikeCode` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`Fork_id` varchar(25) NOT NULL,
`Ip` varchar(25) NOT NULL,
`Session` varchar(200) NOT NULL,
`Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `Fork_id` (`Fork_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `Live`
--
CREATE TABLE IF NOT EXISTS `Live` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`StringId` varchar(100) NOT NULL,
`Html` text NOT NULL,
`Css` text NOT NULL,
`JavaScript` text NOT NULL,
`Ip` varchar(25) DEFAULT NULL,
`Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `StringId` (`StringId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=391 ;
-- --------------------------------------------------------
--
-- Stand-in structure for view `ViewVisiterCounter`
--
CREATE TABLE IF NOT EXISTS `ViewVisiterCounter` (
`StringId` varchar(30)
,`count(StringId)` bigint(21)
);
-- --------------------------------------------------------
--
-- Structure for view `ViewVisiterCounter`
--
DROP TABLE IF EXISTS `ViewVisiterCounter`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ViewVisiterCounter` AS select `Fork`.`StringId` AS `StringId`,count(`Fork`.`StringId`) AS `count(StringId)` from (`Fork` left join `CodeVisiter` on((`Fork`.`StringId` = `CodeVisiter`.`Fork_id`))) group by `Fork`.`StringId`;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;