Repository navigation
Expand file tree
/
Copy pathpanel.sql
More file actions
289 lines (259 loc) · 14.4 KB
/
Copy pathpanel.sql
File metadata and controls
289 lines (259 loc) · 14.4 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 8.0.37-0ubuntu0.22.04.3 - (Ubuntu)
-- Server OS: Linux
-- HeidiSQL Version: 12.7.0.6850
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-- Dumping database structure for panel
DROP DATABASE IF EXISTS `panel`;
CREATE DATABASE IF NOT EXISTS `panel` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `panel`;
-- Dumping structure for table panel.auth_activation_attempts
DROP TABLE IF EXISTS `auth_activation_attempts`;
CREATE TABLE IF NOT EXISTS `auth_activation_attempts` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`ip_address` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`user_agent` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
`created_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Dumping data for table panel.auth_activation_attempts: ~0 rows (approximately)
DELETE FROM `auth_activation_attempts`;
-- Dumping structure for table panel.auth_groups
DROP TABLE IF EXISTS `auth_groups`;
CREATE TABLE IF NOT EXISTS `auth_groups` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`description` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Dumping data for table panel.auth_groups: ~2 rows (approximately)
DELETE FROM `auth_groups`;
INSERT INTO `auth_groups` (`id`, `name`, `description`) VALUES
(1, 'admin', 'Administrators. The top of the food chain.'),
(2, 'member', 'Member everyday member.'),
(3, 'users', 'Users. Every Days');
-- Dumping structure for table panel.auth_groups_permissions
DROP TABLE IF EXISTS `auth_groups_permissions`;
CREATE TABLE IF NOT EXISTS `auth_groups_permissions` (
`group_id` int unsigned NOT NULL DEFAULT '0',
`permission_id` int unsigned NOT NULL DEFAULT '0',
KEY `auth_groups_permissions_permission_id_foreign` (`permission_id`),
KEY `group_id_permission_id` (`group_id`,`permission_id`),
CONSTRAINT `auth_groups_permissions_group_id_foreign` FOREIGN KEY (`group_id`) REFERENCES `auth_groups` (`id`) ON DELETE CASCADE,
CONSTRAINT `auth_groups_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `auth_permissions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Dumping data for table panel.auth_groups_permissions: ~6 rows (approximately)
DELETE FROM `auth_groups_permissions`;
INSERT INTO `auth_groups_permissions` (`group_id`, `permission_id`) VALUES
(1, 1),
(1, 2),
(1, 3),
(1, 4),
(2, 1),
(3, 1);
-- Dumping structure for table panel.auth_groups_users
DROP TABLE IF EXISTS `auth_groups_users`;
CREATE TABLE IF NOT EXISTS `auth_groups_users` (
`group_id` int unsigned NOT NULL DEFAULT '0',
`user_id` int unsigned NOT NULL DEFAULT '0',
KEY `auth_groups_users_user_id_foreign` (`user_id`),
KEY `group_id_user_id` (`group_id`,`user_id`),
CONSTRAINT `auth_groups_users_group_id_foreign` FOREIGN KEY (`group_id`) REFERENCES `auth_groups` (`id`) ON DELETE CASCADE,
CONSTRAINT `auth_groups_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Dumping data for table panel.auth_groups_users: ~3 rows (approximately)
DELETE FROM `auth_groups_users`;
INSERT INTO `auth_groups_users` (`group_id`, `user_id`) VALUES
(1, 1),
(2, 1),
(2, 2);
-- Dumping structure for table panel.auth_logins
DROP TABLE IF EXISTS `auth_logins`;
CREATE TABLE IF NOT EXISTS `auth_logins` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`ip_address` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
`email` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
`user_id` int unsigned DEFAULT NULL,
`date` datetime NOT NULL,
`success` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
KEY `email` (`email`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Dumping data for table panel.auth_logins: ~2 rows (approximately)
DELETE FROM `auth_logins`;
INSERT INTO `auth_logins` (`id`, `ip_address`, `email`, `user_id`, `date`, `success`) VALUES
(1, '127.0.0.1', 'admin@admin.com', 1, '2024-07-03 17:02:39', 1),
(2, '127.0.0.1', 'admin@admin.com', 1, '2024-07-03 17:17:09', 1);
-- Dumping structure for table panel.auth_permissions
DROP TABLE IF EXISTS `auth_permissions`;
CREATE TABLE IF NOT EXISTS `auth_permissions` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`description` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Dumping data for table panel.auth_permissions: ~4 rows (approximately)
DELETE FROM `auth_permissions`;
INSERT INTO `auth_permissions` (`id`, `name`, `description`) VALUES
(1, 'back-office', 'User can access to the administration panel.'),
(2, 'manage-user', 'User can create, delete or modify the users.'),
(3, 'role-permission', 'User can edit and define permissions for a role.'),
(4, 'menu-permission', 'User cand create, delete or modify the menu.');
-- Dumping structure for table panel.auth_reset_attempts
DROP TABLE IF EXISTS `auth_reset_attempts`;
CREATE TABLE IF NOT EXISTS `auth_reset_attempts` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`ip_address` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`user_agent` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
`created_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Dumping data for table panel.auth_reset_attempts: ~0 rows (approximately)
DELETE FROM `auth_reset_attempts`;
-- Dumping structure for table panel.auth_tokens
DROP TABLE IF EXISTS `auth_tokens`;
CREATE TABLE IF NOT EXISTS `auth_tokens` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`selector` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`hashedValidator` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`user_id` int unsigned NOT NULL,
`expires` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `auth_tokens_user_id_foreign` (`user_id`),
KEY `selector` (`selector`),
CONSTRAINT `auth_tokens_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Dumping data for table panel.auth_tokens: ~2 rows (approximately)
DELETE FROM `auth_tokens`;
INSERT INTO `auth_tokens` (`id`, `selector`, `hashedValidator`, `user_id`, `expires`) VALUES
(1, '1c4fb9a165ee24f5aca34730', '738922b265ba0b8c036e938183cd87e6a8e2fdc47e36ddbfeb747c8d06df6389', 1, '2024-08-02 17:02:39'),
(2, 'f0e22b53fad33931e9ca3e24', '6a9467baf3ff95626c9de92f03b7311de1326eb34acb27a3260e4d15dfc097b8', 1, '2024-08-02 17:17:10');
-- Dumping structure for table panel.auth_users_permissions
DROP TABLE IF EXISTS `auth_users_permissions`;
CREATE TABLE IF NOT EXISTS `auth_users_permissions` (
`user_id` int unsigned NOT NULL DEFAULT '0',
`permission_id` int unsigned NOT NULL DEFAULT '0',
KEY `auth_users_permissions_permission_id_foreign` (`permission_id`),
KEY `user_id_permission_id` (`user_id`,`permission_id`),
CONSTRAINT `auth_users_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `auth_permissions` (`id`) ON DELETE CASCADE,
CONSTRAINT `auth_users_permissions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Dumping data for table panel.auth_users_permissions: ~5 rows (approximately)
DELETE FROM `auth_users_permissions`;
INSERT INTO `auth_users_permissions` (`user_id`, `permission_id`) VALUES
(1, 1),
(1, 2),
(1, 3),
(1, 4),
(2, 1);
-- Dumping structure for table panel.groups_menu
DROP TABLE IF EXISTS `groups_menu`;
CREATE TABLE IF NOT EXISTS `groups_menu` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`group_id` int unsigned NOT NULL DEFAULT '0',
`menu_id` int unsigned NOT NULL DEFAULT '0',
KEY `groups_menu_menu_id_foreign` (`menu_id`),
KEY `groups_menu_group_id_foreign` (`group_id`),
KEY `id_group_id_menu_id` (`id`,`group_id`,`menu_id`),
CONSTRAINT `groups_menu_group_id_foreign` FOREIGN KEY (`group_id`) REFERENCES `auth_groups` (`id`) ON DELETE CASCADE,
CONSTRAINT `groups_menu_menu_id_foreign` FOREIGN KEY (`menu_id`) REFERENCES `menu` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Dumping data for table panel.groups_menu: ~10 rows (approximately)
DELETE FROM `groups_menu`;
INSERT INTO `groups_menu` (`id`, `group_id`, `menu_id`) VALUES
(1, 1, 1),
(2, 1, 2),
(3, 1, 3),
(4, 1, 4),
(5, 1, 5),
(6, 1, 6),
(7, 1, 7),
(8, 2, 1),
(9, 2, 2),
(10, 2, 3);
-- Dumping structure for table panel.menu
DROP TABLE IF EXISTS `menu`;
CREATE TABLE IF NOT EXISTS `menu` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`parent_id` int unsigned DEFAULT NULL,
`active` tinyint(1) NOT NULL DEFAULT '1',
`title` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
`icon` varchar(55) COLLATE utf8mb4_general_ci DEFAULT NULL,
`route` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
`sequence` int DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Dumping data for table panel.menu: ~7 rows (approximately)
DELETE FROM `menu`;
INSERT INTO `menu` (`id`, `parent_id`, `active`, `title`, `icon`, `route`, `sequence`, `created_at`, `updated_at`) VALUES
(1, 0, 1, 'Dashboard', 'fas fa-tachometer-alt', 'admin', 1, '2024-07-03 16:43:58', '2024-07-03 16:43:58'),
(2, 0, 1, 'User Management', 'fas fa-user', '#', 2, '2024-07-03 16:43:58', '2024-07-03 16:43:58'),
(3, 2, 1, 'User Profile', 'fas fa-user-edit', 'admin/user/profile', 3, '2024-07-03 16:43:58', '2024-07-03 16:43:58'),
(4, 2, 1, 'Users', 'fas fa-users', 'admin/user/manage', 4, '2024-07-03 16:43:58', '2024-07-03 16:43:58'),
(5, 2, 1, 'Permissions', 'fas fa-user-lock', 'admin/permission', 5, '2024-07-03 16:43:58', '2024-07-03 16:43:58'),
(6, 2, 1, 'Roles', 'fas fa-users-cog', 'admin/role', 6, '2024-07-03 16:43:58', '2024-07-03 16:43:58'),
(7, 2, 1, 'Menu', 'fas fa-stream', 'admin/menu', 7, '2024-07-03 16:43:58', '2024-07-03 16:43:58');
-- Dumping structure for table panel.migrations
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE IF NOT EXISTS `migrations` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`version` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`class` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`group` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`namespace` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`time` int NOT NULL,
`batch` int unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Dumping data for table panel.migrations: ~2 rows (approximately)
DELETE FROM `migrations`;
INSERT INTO `migrations` (`id`, `version`, `class`, `group`, `namespace`, `time`, `batch`) VALUES
(1, '2017-11-20-223112', 'App\\Database\\Migrations\\CreateAuthTables', 'default', 'App', 1719999833, 1),
(2, '2020-02-03-081118', 'App\\Database\\Migrations\\CreateMenuTable', 'default', 'App', 1719999835, 1);
-- Dumping structure for table panel.users
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`username` varchar(30) COLLATE utf8mb4_general_ci DEFAULT NULL,
`password_hash` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
`reset_hash` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
`reset_at` datetime DEFAULT NULL,
`reset_expires` datetime DEFAULT NULL,
`activate_hash` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
`status` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
`status_message` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
`active` tinyint(1) NOT NULL DEFAULT '0',
`force_pass_reset` tinyint(1) NOT NULL DEFAULT '0',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- Dumping data for table panel.users: ~2 rows (approximately)
DELETE FROM `users`;
INSERT INTO `users` (`id`, `email`, `username`, `password_hash`, `reset_hash`, `reset_at`, `reset_expires`, `activate_hash`, `status`, `status_message`, `active`, `force_pass_reset`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'admin@admin.com', 'admin', '$2y$10$48x9ibteLtMTvv9QDsvjoeXZxCtE4s12GXtkKen6OY1QA1ebC.sqK', NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, '2024-07-03 16:43:55', '2024-07-03 16:43:55', NULL),
(2, 'user@user.com', 'user', '$2y$10$Jj4dI5PxU7xqqR6vimm0R.fkB47z6Nfh9zS/11QVRJJdLycNfJEgu', NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, '2024-07-03 16:43:55', '2024-07-03 16:43:55', NULL);
/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;