-
Notifications
You must be signed in to change notification settings - Fork 0
/
voyager.sql
640 lines (554 loc) · 33.9 KB
/
voyager.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
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
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
-- phpMyAdmin SQL Dump
-- version phpStudy 2014
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生æˆæ—¥æœŸ: 2017 å¹?08 æœ?31 æ—?10:03
-- æœåŠ¡å™¨ç‰ˆæœ¬: 5.7.17
-- PHP 版本: 5.6.27
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 */;
--
-- æ•°æ®åº“: `voyager`
--
-- --------------------------------------------------------
--
-- 表的结构 `categories`
--
CREATE TABLE IF NOT EXISTS `categories` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`parent_id` int(10) unsigned DEFAULT NULL,
`order` int(11) NOT NULL DEFAULT '1',
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `categories_slug_unique` (`slug`),
KEY `categories_parent_id_foreign` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=3 ;
--
-- 转å˜è¡¨ä¸çš„æ•°æ® `categories`
--
INSERT INTO `categories` (`id`, `parent_id`, `order`, `name`, `slug`, `created_at`, `updated_at`) VALUES
(1, NULL, 1, 'Category 1', 'category-1', '2017-08-31 00:15:48', '2017-08-31 00:15:48'),
(2, NULL, 1, 'Category 2', 'category-2', '2017-08-31 00:15:48', '2017-08-31 00:15:48');
-- --------------------------------------------------------
--
-- 表的结构 `data_rows`
--
CREATE TABLE IF NOT EXISTS `data_rows` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`data_type_id` int(10) unsigned NOT NULL,
`field` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`required` tinyint(1) NOT NULL DEFAULT '0',
`browse` tinyint(1) NOT NULL DEFAULT '1',
`read` tinyint(1) NOT NULL DEFAULT '1',
`edit` tinyint(1) NOT NULL DEFAULT '1',
`add` tinyint(1) NOT NULL DEFAULT '1',
`delete` tinyint(1) NOT NULL DEFAULT '1',
`details` text COLLATE utf8mb4_unicode_ci,
`order` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `data_rows_data_type_id_foreign` (`data_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=53 ;
--
-- 转å˜è¡¨ä¸çš„æ•°æ® `data_rows`
--
INSERT INTO `data_rows` (`id`, `data_type_id`, `field`, `type`, `display_name`, `required`, `browse`, `read`, `edit`, `add`, `delete`, `details`, `order`) VALUES
(1, 1, 'id', 'number', 'ID', 1, 0, 0, 0, 0, 0, '', 1),
(2, 1, 'author_id', 'text', 'Author', 1, 0, 1, 1, 0, 1, '', 2),
(3, 1, 'category_id', 'text', 'Category', 1, 0, 1, 1, 1, 0, '', 3),
(4, 1, 'title', 'text', 'Title', 1, 1, 1, 1, 1, 1, '', 4),
(5, 1, 'excerpt', 'text_area', 'excerpt', 1, 0, 1, 1, 1, 1, '', 5),
(6, 1, 'body', 'rich_text_box', 'Body', 1, 0, 1, 1, 1, 1, '', 6),
(7, 1, 'image', 'image', 'Post Image', 0, 1, 1, 1, 1, 1, '\n{\n "resize": {\n "width": "1000",\n "height": "null"\n },\n "quality": "70%",\n "upsize": true,\n "thumbnails": [\n {\n "name": "medium",\n "scale": "50%"\n },\n {\n "name": "small",\n "scale": "25%"\n },\n {\n "name": "cropped",\n "crop": {\n "width": "300",\n "height": "250"\n }\n }\n ]\n}', 7),
(8, 1, 'slug', 'text', 'slug', 1, 0, 1, 1, 1, 1, '\n{\n "slugify": {\n "origin": "title",\n "forceUpdate": true\n }\n}', 8),
(9, 1, 'meta_description', 'text_area', 'meta_description', 1, 0, 1, 1, 1, 1, '', 9),
(10, 1, 'meta_keywords', 'text_area', 'meta_keywords', 1, 0, 1, 1, 1, 1, '', 10),
(11, 1, 'status', 'select_dropdown', 'status', 1, 1, 1, 1, 1, 1, '\n{\n "default": "DRAFT",\n "options": {\n "PUBLISHED": "published",\n "DRAFT": "draft",\n "PENDING": "pending"\n }\n}', 11),
(12, 1, 'created_at', 'timestamp', 'created_at', 0, 1, 1, 0, 0, 0, '', 12),
(13, 1, 'updated_at', 'timestamp', 'updated_at', 0, 0, 0, 0, 0, 0, '', 13),
(14, 2, 'id', 'number', 'id', 1, 0, 0, 0, 0, 0, '', 1),
(15, 2, 'author_id', 'text', 'author_id', 1, 0, 0, 0, 0, 0, '', 2),
(16, 2, 'title', 'text', 'title', 1, 1, 1, 1, 1, 1, '', 3),
(17, 2, 'excerpt', 'text_area', 'excerpt', 1, 0, 1, 1, 1, 1, '', 4),
(18, 2, 'body', 'rich_text_box', 'body', 1, 0, 1, 1, 1, 1, '', 5),
(19, 2, 'slug', 'text', 'slug', 1, 0, 1, 1, 1, 1, '{"slugify":{"origin":"title"}}', 6),
(20, 2, 'meta_description', 'text', 'meta_description', 1, 0, 1, 1, 1, 1, '', 7),
(21, 2, 'meta_keywords', 'text', 'meta_keywords', 1, 0, 1, 1, 1, 1, '', 8),
(22, 2, 'status', 'select_dropdown', 'status', 1, 1, 1, 1, 1, 1, '{"default":"INACTIVE","options":{"INACTIVE":"INACTIVE","ACTIVE":"ACTIVE"}}', 9),
(23, 2, 'created_at', 'timestamp', 'created_at', 1, 1, 1, 0, 0, 0, '', 10),
(24, 2, 'updated_at', 'timestamp', 'updated_at', 1, 0, 0, 0, 0, 0, '', 11),
(25, 2, 'image', 'image', 'image', 0, 1, 1, 1, 1, 1, '', 12),
(26, 3, 'id', 'number', 'id', 1, 0, 0, 0, 0, 0, '', 1),
(27, 3, 'name', 'text', 'name', 1, 1, 1, 1, 1, 1, '', 2),
(28, 3, 'email', 'text', 'email', 1, 1, 1, 1, 1, 1, '', 3),
(29, 3, 'password', 'password', 'password', 1, 0, 0, 1, 1, 0, '', 4),
(30, 3, 'remember_token', 'text', 'remember_token', 0, 0, 0, 0, 0, 0, '', 5),
(31, 3, 'created_at', 'timestamp', 'created_at', 0, 1, 1, 0, 0, 0, '', 6),
(32, 3, 'updated_at', 'timestamp', 'updated_at', 0, 0, 0, 0, 0, 0, '', 7),
(33, 3, 'avatar', 'image', 'avatar', 0, 1, 1, 1, 1, 1, '', 8),
(34, 5, 'id', 'number', 'id', 1, 0, 0, 0, 0, 0, '', 1),
(35, 5, 'name', 'text', 'name', 1, 1, 1, 1, 1, 1, '', 2),
(36, 5, 'created_at', 'timestamp', 'created_at', 0, 0, 0, 0, 0, 0, '', 3),
(37, 5, 'updated_at', 'timestamp', 'updated_at', 0, 0, 0, 0, 0, 0, '', 4),
(38, 4, 'id', 'number', 'id', 1, 0, 0, 0, 0, 0, '', 1),
(39, 4, 'parent_id', 'select_dropdown', 'parent_id', 0, 0, 1, 1, 1, 1, '{"default":"","null":"","options":{"":"-- None --"},"relationship":{"key":"id","label":"name"}}', 2),
(40, 4, 'order', 'text', 'order', 1, 1, 1, 1, 1, 1, '{"default":1}', 3),
(41, 4, 'name', 'text', 'name', 1, 1, 1, 1, 1, 1, '', 4),
(42, 4, 'slug', 'text', 'slug', 1, 1, 1, 1, 1, 1, '', 5),
(43, 4, 'created_at', 'timestamp', 'created_at', 0, 0, 1, 0, 0, 0, '', 6),
(44, 4, 'updated_at', 'timestamp', 'updated_at', 0, 0, 0, 0, 0, 0, '', 7),
(45, 6, 'id', 'number', 'id', 1, 0, 0, 0, 0, 0, '', 1),
(46, 6, 'name', 'text', 'Name', 1, 1, 1, 1, 1, 1, '', 2),
(47, 6, 'created_at', 'timestamp', 'created_at', 0, 0, 0, 0, 0, 0, '', 3),
(48, 6, 'updated_at', 'timestamp', 'updated_at', 0, 0, 0, 0, 0, 0, '', 4),
(49, 6, 'display_name', 'text', 'Display Name', 1, 1, 1, 1, 1, 1, '', 5),
(50, 1, 'seo_title', 'text', 'seo_title', 0, 1, 1, 1, 1, 1, '', 14),
(51, 1, 'featured', 'checkbox', 'featured', 1, 1, 1, 1, 1, 1, '', 15),
(52, 3, 'role_id', 'text', 'role_id', 1, 1, 1, 1, 1, 1, '', 9);
-- --------------------------------------------------------
--
-- 表的结构 `data_types`
--
CREATE TABLE IF NOT EXISTS `data_types` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name_singular` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name_plural` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`icon` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`model_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`controller` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`generate_permissions` tinyint(1) NOT NULL DEFAULT '0',
`server_side` tinyint(4) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `data_types_name_unique` (`name`),
UNIQUE KEY `data_types_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=7 ;
--
-- 转å˜è¡¨ä¸çš„æ•°æ® `data_types`
--
INSERT INTO `data_types` (`id`, `name`, `slug`, `display_name_singular`, `display_name_plural`, `icon`, `model_name`, `controller`, `description`, `generate_permissions`, `server_side`, `created_at`, `updated_at`) VALUES
(1, 'posts', 'posts', 'Post', 'Posts', 'voyager-news', 'TCG\\Voyager\\Models\\Post', '', '', 1, 0, '2017-08-31 00:15:46', '2017-08-31 00:15:46'),
(2, 'pages', 'pages', 'Page', 'Pages', 'voyager-file-text', 'TCG\\Voyager\\Models\\Page', '', '', 1, 0, '2017-08-31 00:15:46', '2017-08-31 00:15:46'),
(3, 'users', 'users', 'User', 'Users', 'voyager-person', 'TCG\\Voyager\\Models\\User', '', '', 1, 0, '2017-08-31 00:15:46', '2017-08-31 00:15:46'),
(4, 'categories', 'categories', 'Category', 'Categories', 'voyager-categories', 'TCG\\Voyager\\Models\\Category', '', '', 1, 0, '2017-08-31 00:15:46', '2017-08-31 00:15:46'),
(5, 'menus', 'menus', 'Menu', 'Menus', 'voyager-list', 'TCG\\Voyager\\Models\\Menu', '', '', 1, 0, '2017-08-31 00:15:46', '2017-08-31 00:15:46'),
(6, 'roles', 'roles', 'Role', 'Roles', 'voyager-lock', 'TCG\\Voyager\\Models\\Role', '', '', 1, 0, '2017-08-31 00:15:46', '2017-08-31 00:15:46');
-- --------------------------------------------------------
--
-- 表的结构 `menus`
--
CREATE TABLE IF NOT EXISTS `menus` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `menus_name_unique` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=2 ;
--
-- 转å˜è¡¨ä¸çš„æ•°æ® `menus`
--
INSERT INTO `menus` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'admin', '2017-08-31 00:15:47', '2017-08-31 00:15:47');
-- --------------------------------------------------------
--
-- 表的结构 `menu_items`
--
CREATE TABLE IF NOT EXISTS `menu_items` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`menu_id` int(10) unsigned DEFAULT NULL,
`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`target` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '_self',
`icon_class` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`color` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`parent_id` int(11) DEFAULT NULL,
`order` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`route` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`parameters` text COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`id`),
KEY `menu_items_menu_id_foreign` (`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=12 ;
--
-- 转å˜è¡¨ä¸çš„æ•°æ® `menu_items`
--
INSERT INTO `menu_items` (`id`, `menu_id`, `title`, `url`, `target`, `icon_class`, `color`, `parent_id`, `order`, `created_at`, `updated_at`, `route`, `parameters`) VALUES
(1, 1, 'Dashboard', '/admin', '_self', 'voyager-boat', NULL, NULL, 1, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL, NULL),
(2, 1, 'Media', '/admin/media', '_self', 'voyager-images', NULL, NULL, 5, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL, NULL),
(3, 1, 'Posts', '/admin/posts', '_self', 'voyager-news', NULL, NULL, 6, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL, NULL),
(4, 1, 'Users', '/admin/users', '_self', 'voyager-person', NULL, NULL, 3, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL, NULL),
(5, 1, 'Categories', '/admin/categories', '_self', 'voyager-categories', NULL, NULL, 8, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL, NULL),
(6, 1, 'Pages', '/admin/pages', '_self', 'voyager-file-text', NULL, NULL, 7, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL, NULL),
(7, 1, 'Roles', '/admin/roles', '_self', 'voyager-lock', NULL, NULL, 2, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL, NULL),
(8, 1, 'Tools', '', '_self', 'voyager-tools', NULL, NULL, 9, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL, NULL),
(9, 1, 'Menu Builder', '/admin/menus', '_self', 'voyager-list', NULL, 8, 10, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL, NULL),
(10, 1, 'Database', '/admin/database', '_self', 'voyager-data', NULL, 8, 11, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL, NULL),
(11, 1, 'Settings', '/admin/settings', '_self', 'voyager-settings', NULL, NULL, 12, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL, NULL);
-- --------------------------------------------------------
--
-- 表的结构 `migrations`
--
CREATE TABLE IF NOT EXISTS `migrations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=21 ;
--
-- 转å˜è¡¨ä¸çš„æ•°æ® `migrations`
--
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2016_01_01_000000_add_voyager_user_fields', 1),
(4, '2016_01_01_000000_create_data_types_table', 1),
(5, '2016_01_01_000000_create_pages_table', 1),
(6, '2016_01_01_000000_create_posts_table', 1),
(7, '2016_02_15_204651_create_categories_table', 1),
(8, '2016_05_19_173453_create_menu_table', 1),
(9, '2016_10_21_190000_create_roles_table', 1),
(10, '2016_10_21_190000_create_settings_table', 1),
(11, '2016_11_30_135954_create_permission_table', 1),
(12, '2016_11_30_141208_create_permission_role_table', 1),
(13, '2016_12_26_201236_data_types__add__server_side', 1),
(14, '2017_01_13_000000_add_route_to_menu_items_table', 1),
(15, '2017_01_14_005015_create_translations_table', 1),
(16, '2017_01_15_000000_add_permission_group_id_to_permissions_table', 1),
(17, '2017_01_15_000000_create_permission_groups_table', 1),
(18, '2017_01_15_000000_make_table_name_nullable_in_permissions_table', 1),
(19, '2017_03_06_000000_add_controller_to_data_types_table', 1),
(20, '2017_04_21_000000_add_order_to_data_rows_table', 1);
-- --------------------------------------------------------
--
-- 表的结构 `pages`
--
CREATE TABLE IF NOT EXISTS `pages` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`author_id` int(11) NOT NULL,
`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`excerpt` text COLLATE utf8mb4_unicode_ci,
`body` text COLLATE utf8mb4_unicode_ci,
`image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`meta_description` text COLLATE utf8mb4_unicode_ci,
`meta_keywords` text COLLATE utf8mb4_unicode_ci,
`status` enum('ACTIVE','INACTIVE') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'INACTIVE',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `pages_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=2 ;
--
-- 转å˜è¡¨ä¸çš„æ•°æ® `pages`
--
INSERT INTO `pages` (`id`, `author_id`, `title`, `excerpt`, `body`, `image`, `slug`, `meta_description`, `meta_keywords`, `status`, `created_at`, `updated_at`) VALUES
(1, 0, 'Hello World', 'Hang the jib grog grog blossom grapple dance the hempen jig gangway pressgang bilge rat to go on account lugger. Nelsons folly gabion line draught scallywag fire ship gaff fluke fathom case shot. Sea Legs bilge rat sloop matey gabion long clothes run a shot across the bow Gold Road cog league.', '<p>Hello World. Scallywag grog swab Cat o''nine tails scuttle rigging hardtack cable nipper Yellow Jack. Handsomely spirits knave lad killick landlubber or just lubber deadlights chantey pinnace crack Jennys tea cup. Provost long clothes black spot Yellow Jack bilged on her anchor league lateen sail case shot lee tackle.</p>\n<p>Ballast spirits fluke topmast me quarterdeck schooner landlubber or just lubber gabion belaying pin. Pinnace stern galleon starboard warp carouser to go on account dance the hempen jig jolly boat measured fer yer chains. Man-of-war fire in the hole nipperkin handsomely doubloon barkadeer Brethren of the Coast gibbet driver squiffy.</p>', 'pages/AAgCCnqHfLlRub9syUdw.jpg', 'hello-world', 'Yar Meta Description', 'Keyword1, Keyword2', 'ACTIVE', '2017-08-31 00:15:48', '2017-08-31 00:15:48');
-- --------------------------------------------------------
--
-- 表的结构 `password_resets`
--
CREATE TABLE IF NOT EXISTS `password_resets` (
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
KEY `password_resets_email_index` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- 表的结构 `permissions`
--
CREATE TABLE IF NOT EXISTS `permissions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`table_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`permission_group_id` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `permissions_key_index` (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=35 ;
--
-- 转å˜è¡¨ä¸çš„æ•°æ® `permissions`
--
INSERT INTO `permissions` (`id`, `key`, `table_name`, `created_at`, `updated_at`, `permission_group_id`) VALUES
(1, 'browse_admin', NULL, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(2, 'browse_database', NULL, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(3, 'browse_media', NULL, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(4, 'browse_settings', NULL, '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(5, 'browse_menus', 'menus', '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(6, 'read_menus', 'menus', '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(7, 'edit_menus', 'menus', '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(8, 'add_menus', 'menus', '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(9, 'delete_menus', 'menus', '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(10, 'browse_pages', 'pages', '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(11, 'read_pages', 'pages', '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(12, 'edit_pages', 'pages', '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(13, 'add_pages', 'pages', '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(14, 'delete_pages', 'pages', '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(15, 'browse_roles', 'roles', '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(16, 'read_roles', 'roles', '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(17, 'edit_roles', 'roles', '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(18, 'add_roles', 'roles', '2017-08-31 00:15:47', '2017-08-31 00:15:47', NULL),
(19, 'delete_roles', 'roles', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(20, 'browse_users', 'users', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(21, 'read_users', 'users', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(22, 'edit_users', 'users', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(23, 'add_users', 'users', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(24, 'delete_users', 'users', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(25, 'browse_posts', 'posts', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(26, 'read_posts', 'posts', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(27, 'edit_posts', 'posts', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(28, 'add_posts', 'posts', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(29, 'delete_posts', 'posts', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(30, 'browse_categories', 'categories', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(31, 'read_categories', 'categories', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(32, 'edit_categories', 'categories', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(33, 'add_categories', 'categories', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL),
(34, 'delete_categories', 'categories', '2017-08-31 00:15:48', '2017-08-31 00:15:48', NULL);
-- --------------------------------------------------------
--
-- 表的结构 `permission_groups`
--
CREATE TABLE IF NOT EXISTS `permission_groups` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `permission_groups_name_unique` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- 表的结构 `permission_role`
--
CREATE TABLE IF NOT EXISTS `permission_role` (
`permission_id` int(10) unsigned NOT NULL,
`role_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`permission_id`,`role_id`),
KEY `permission_role_permission_id_index` (`permission_id`),
KEY `permission_role_role_id_index` (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- 转å˜è¡¨ä¸çš„æ•°æ® `permission_role`
--
INSERT INTO `permission_role` (`permission_id`, `role_id`) VALUES
(1, 1),
(2, 1),
(3, 1),
(4, 1),
(5, 1),
(6, 1),
(7, 1),
(8, 1),
(9, 1),
(10, 1),
(11, 1),
(12, 1),
(13, 1),
(14, 1),
(15, 1),
(16, 1),
(17, 1),
(18, 1),
(19, 1),
(20, 1),
(21, 1),
(22, 1),
(23, 1),
(24, 1),
(25, 1),
(26, 1),
(27, 1),
(28, 1),
(29, 1),
(30, 1),
(31, 1),
(32, 1),
(33, 1),
(34, 1);
-- --------------------------------------------------------
--
-- 表的结构 `posts`
--
CREATE TABLE IF NOT EXISTS `posts` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`author_id` int(11) NOT NULL,
`category_id` int(11) DEFAULT NULL,
`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`seo_title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`excerpt` text COLLATE utf8mb4_unicode_ci NOT NULL,
`body` text COLLATE utf8mb4_unicode_ci NOT NULL,
`image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`meta_description` text COLLATE utf8mb4_unicode_ci NOT NULL,
`meta_keywords` text COLLATE utf8mb4_unicode_ci NOT NULL,
`status` enum('PUBLISHED','DRAFT','PENDING') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'DRAFT',
`featured` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `posts_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=5 ;
--
-- 转å˜è¡¨ä¸çš„æ•°æ® `posts`
--
INSERT INTO `posts` (`id`, `author_id`, `category_id`, `title`, `seo_title`, `excerpt`, `body`, `image`, `slug`, `meta_description`, `meta_keywords`, `status`, `featured`, `created_at`, `updated_at`) VALUES
(1, 0, NULL, 'Lorem Ipsum Post', NULL, 'This is the excerpt for the Lorem Ipsum Post', '<p>This is the body of the lorem ipsum post</p>', 'posts/nlje9NZQ7bTMYOUG4lF1.jpg', 'lorem-ipsum-post', 'This is the meta description', 'keyword1, keyword2, keyword3', 'PUBLISHED', 0, '2017-08-31 00:15:48', '2017-08-31 00:15:48'),
(2, 0, NULL, 'My Sample Post', NULL, 'This is the excerpt for the sample Post', '<p>This is the body for the sample post, which includes the body.</p>\n <h2>We can use all kinds of format!</h2>\n <p>And include a bunch of other stuff.</p>', 'posts/7uelXHi85YOfZKsoS6Tq.jpg', 'my-sample-post', 'Meta Description for sample post', 'keyword1, keyword2, keyword3', 'PUBLISHED', 0, '2017-08-31 00:15:48', '2017-08-31 00:15:48'),
(3, 0, NULL, 'Latest Post', NULL, 'This is the excerpt for the latest post', '<p>This is the body for the latest post</p>', 'posts/9txUSY6wb7LTBSbDPrD9.jpg', 'latest-post', 'This is the meta description', 'keyword1, keyword2, keyword3', 'PUBLISHED', 0, '2017-08-31 00:15:48', '2017-08-31 00:15:48'),
(4, 0, NULL, 'Yarr Post', NULL, 'Reef sails nipperkin bring a spring upon her cable coffer jury mast spike marooned Pieces of Eight poop deck pillage. Clipper driver coxswain galleon hempen halter come about pressgang gangplank boatswain swing the lead. Nipperkin yard skysail swab lanyard Blimey bilge water ho quarter Buccaneer.', '<p>Swab deadlights Buccaneer fire ship square-rigged dance the hempen jig weigh anchor cackle fruit grog furl. Crack Jennys tea cup chase guns pressgang hearties spirits hogshead Gold Road six pounders fathom measured fer yer chains. Main sheet provost come about trysail barkadeer crimp scuttle mizzenmast brig plunder.</p>\n<p>Mizzen league keelhaul galleon tender cog chase Barbary Coast doubloon crack Jennys tea cup. Blow the man down lugsail fire ship pinnace cackle fruit line warp Admiral of the Black strike colors doubloon. Tackle Jack Ketch come about crimp rum draft scuppers run a shot across the bow haul wind maroon.</p>\n<p>Interloper heave down list driver pressgang holystone scuppers tackle scallywag bilged on her anchor. Jack Tar interloper draught grapple mizzenmast hulk knave cable transom hogshead. Gaff pillage to go on account grog aft chase guns piracy yardarm knave clap of thunder.</p>', 'posts/yuk1fBwmKKZdY2qR1ZKM.jpg', 'yarr-post', 'this be a meta descript', 'keyword1, keyword2, keyword3', 'PUBLISHED', 0, '2017-08-31 00:15:48', '2017-08-31 00:15:48');
-- --------------------------------------------------------
--
-- 表的结构 `roles`
--
CREATE TABLE IF NOT EXISTS `roles` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `roles_name_unique` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=3 ;
--
-- 转å˜è¡¨ä¸çš„æ•°æ® `roles`
--
INSERT INTO `roles` (`id`, `name`, `display_name`, `created_at`, `updated_at`) VALUES
(1, 'admin', 'Administrator', '2017-08-31 00:15:47', '2017-08-31 00:15:47'),
(2, 'user', 'Normal User', '2017-08-31 00:15:47', '2017-08-31 00:15:47');
-- --------------------------------------------------------
--
-- 表的结构 `settings`
--
CREATE TABLE IF NOT EXISTS `settings` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`display_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`value` text COLLATE utf8mb4_unicode_ci NOT NULL,
`details` text COLLATE utf8mb4_unicode_ci,
`type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`order` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `settings_key_unique` (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=10 ;
--
-- 转å˜è¡¨ä¸çš„æ•°æ® `settings`
--
INSERT INTO `settings` (`id`, `key`, `display_name`, `value`, `details`, `type`, `order`) VALUES
(1, 'title', 'Site Title', 'Site Title', '', 'text', 1),
(2, 'description', 'Site Description', 'Site Description', '', 'text', 2),
(3, 'logo', 'Site Logo', '', '', 'image', 3),
(4, 'admin_bg_image', 'Admin Background Image', '', '', 'image', 9),
(5, 'admin_title', 'Admin Title', 'Voyager', '', 'text', 4),
(6, 'admin_description', 'Admin Description', 'Welcome to Voyager. The Missing Admin for Laravel', '', 'text', 5),
(7, 'admin_loader', 'Admin Loader', '', '', 'image', 6),
(8, 'admin_icon_image', 'Admin Icon Image', '', '', 'image', 7),
(9, 'google_analytics_client_id', 'Google Analytics Client ID', '', '', 'text', 9);
-- --------------------------------------------------------
--
-- 表的结构 `translations`
--
CREATE TABLE IF NOT EXISTS `translations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`table_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`column_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`foreign_key` int(10) unsigned NOT NULL,
`locale` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`value` text COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `translations_table_name_column_name_foreign_key_locale_unique` (`table_name`,`column_name`,`foreign_key`,`locale`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=27 ;
--
-- 转å˜è¡¨ä¸çš„æ•°æ® `translations`
--
INSERT INTO `translations` (`id`, `table_name`, `column_name`, `foreign_key`, `locale`, `value`, `created_at`, `updated_at`) VALUES
(1, 'data_types', 'display_name_singular', 1, 'pt', 'Post', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(2, 'data_types', 'display_name_singular', 2, 'pt', 'Página', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(3, 'data_types', 'display_name_singular', 3, 'pt', 'Utilizador', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(4, 'data_types', 'display_name_singular', 4, 'pt', 'Categoria', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(5, 'data_types', 'display_name_singular', 5, 'pt', 'Menu', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(6, 'data_types', 'display_name_singular', 6, 'pt', 'Função', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(7, 'data_types', 'display_name_plural', 1, 'pt', 'Posts', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(8, 'data_types', 'display_name_plural', 2, 'pt', 'Páginas', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(9, 'data_types', 'display_name_plural', 3, 'pt', 'Utilizadores', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(10, 'data_types', 'display_name_plural', 4, 'pt', 'Categorias', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(11, 'data_types', 'display_name_plural', 5, 'pt', 'Menus', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(12, 'data_types', 'display_name_plural', 6, 'pt', 'Funções', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(13, 'pages', 'title', 1, 'pt', 'Olá Mundo', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(14, 'pages', 'slug', 1, 'pt', 'ola-mundo', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(15, 'pages', 'body', 1, 'pt', '<p>Olá Mundo. Scallywag grog swab Cat o''nine tails scuttle rigging hardtack cable nipper Yellow Jack. Handsomely spirits knave lad killick landlubber or just lubber deadlights chantey pinnace crack Jennys tea cup. Provost long clothes black spot Yellow Jack bilged on her anchor league lateen sail case shot lee tackle.</p>\r\n<p>Ballast spirits fluke topmast me quarterdeck schooner landlubber or just lubber gabion belaying pin. Pinnace stern galleon starboard warp carouser to go on account dance the hempen jig jolly boat measured fer yer chains. Man-of-war fire in the hole nipperkin handsomely doubloon barkadeer Brethren of the Coast gibbet driver squiffy.</p>', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(16, 'menu_items', 'title', 1, 'pt', 'Painel de Controle', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(17, 'menu_items', 'title', 2, 'pt', 'Media', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(18, 'menu_items', 'title', 3, 'pt', 'Publicações', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(19, 'menu_items', 'title', 4, 'pt', 'Utilizadores', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(20, 'menu_items', 'title', 5, 'pt', 'Categorias', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(21, 'menu_items', 'title', 6, 'pt', 'Páginas', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(22, 'menu_items', 'title', 7, 'pt', 'Funções', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(23, 'menu_items', 'title', 8, 'pt', 'Ferramentas', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(24, 'menu_items', 'title', 9, 'pt', 'Menus', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(25, 'menu_items', 'title', 10, 'pt', 'Base de dados', '2017-08-31 00:15:49', '2017-08-31 00:15:49'),
(26, 'menu_items', 'title', 11, 'pt', 'Configurações', '2017-08-31 00:15:49', '2017-08-31 00:15:49');
-- --------------------------------------------------------
--
-- 表的结构 `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`role_id` int(11) DEFAULT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`avatar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=2 ;
--
-- 转å˜è¡¨ä¸çš„æ•°æ® `users`
--
INSERT INTO `users` (`id`, `role_id`, `name`, `email`, `avatar`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 1, 'Admin', 'admin@admin.com', 'users/default.png', '$2y$10$w7Y2Ch46FRwg7yEGQN8YuOTJwxCVB5asDq0siYGuEXKgb6Lgkq78q', 'DBvH3bSsPE0tNWCXwPp0qP7wwDwI3hxRNDYAam4gcbO8hbMzIF49ffrxCxHI', '2017-08-31 00:15:48', '2017-08-31 00:15:48');
--
-- é™åˆ¶å¯¼å‡ºçš„表
--
--
-- é™åˆ¶è¡¨ `categories`
--
ALTER TABLE `categories`
ADD CONSTRAINT `categories_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `categories` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
--
-- é™åˆ¶è¡¨ `data_rows`
--
ALTER TABLE `data_rows`
ADD CONSTRAINT `data_rows_data_type_id_foreign` FOREIGN KEY (`data_type_id`) REFERENCES `data_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- é™åˆ¶è¡¨ `menu_items`
--
ALTER TABLE `menu_items`
ADD CONSTRAINT `menu_items_menu_id_foreign` FOREIGN KEY (`menu_id`) REFERENCES `menus` (`id`) ON DELETE CASCADE;
--
-- é™åˆ¶è¡¨ `permission_role`
--
ALTER TABLE `permission_role`
ADD CONSTRAINT `permission_role_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
ADD CONSTRAINT `permission_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;
/*!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 */;