-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshop.sql
More file actions
159 lines (144 loc) · 4.83 KB
/
shop.sql
File metadata and controls
159 lines (144 loc) · 4.83 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
/*
Navicat MySQL Data Transfer
Source Server : site1
Source Server Version : 50726
Source Host : localhost:3306
Source Database : shop
Target Server Type : MYSQL
Target Server Version : 50726
File Encoding : 65001
Date: 2019-07-24 07:10:14
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for about
-- ----------------------------
DROP TABLE IF EXISTS `about`;
CREATE TABLE `about` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`title` tinytext NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for comments
-- ----------------------------
DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`username` tinytext NOT NULL,
`comment` text NOT NULL,
`date` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for contacts
-- ----------------------------
DROP TABLE IF EXISTS `contacts`;
CREATE TABLE `contacts` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`text` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for email_edit
-- ----------------------------
DROP TABLE IF EXISTS `email_edit`;
CREATE TABLE `email_edit` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`account_id` mediumint(9) NOT NULL,
`hash` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for messages
-- ----------------------------
DROP TABLE IF EXISTS `messages`;
CREATE TABLE `messages` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`username` tinytext NOT NULL,
`email` varchar(255) NOT NULL,
`message` text NOT NULL,
`date` date NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for news
-- ----------------------------
DROP TABLE IF EXISTS `news`;
CREATE TABLE `news` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`title` tinytext NOT NULL,
`content` text NOT NULL,
`date` date NOT NULL,
`username` tinytext NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for password_recovery
-- ----------------------------
DROP TABLE IF EXISTS `password_recovery`;
CREATE TABLE `password_recovery` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`account_id` mediumint(9) NOT NULL,
`hash` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for products
-- ----------------------------
DROP TABLE IF EXISTS `products`;
CREATE TABLE `products` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`img` varchar(255) DEFAULT NULL,
`product_name` tinytext NOT NULL,
`short_description` tinytext NOT NULL,
`description` text NOT NULL,
`count` mediumint(9) NOT NULL,
`price` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for promocodes
-- ----------------------------
DROP TABLE IF EXISTS `promocodes`;
CREATE TABLE `promocodes` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`amount` mediumint(9) NOT NULL,
`promocode` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for purchases
-- ----------------------------
DROP TABLE IF EXISTS `purchases`;
CREATE TABLE `purchases` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`username` tinytext NOT NULL,
`name` tinytext NOT NULL,
`surname` tinytext NOT NULL,
`company` tinytext,
`address` text NOT NULL,
`city` text NOT NULL,
`region` text,
`index` tinytext,
`country` varchar(255) DEFAULT NULL,
`date` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL,
`username` tinytext NOT NULL,
`password` tinytext NOT NULL,
`balance` mediumint(9) NOT NULL DEFAULT '0',
`activation` varchar(255) NOT NULL,
`is_admin` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
SET FOREIGN_KEY_CHECKS=1;