-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdbnya.sql
195 lines (173 loc) · 10.6 KB
/
dbnya.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
-- --------------------------------------------------------
-- Host: localhost
-- Server version: 5.7.24 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 10.2.0.5599
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!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' */;
-- Dumping database structure for starter_pack
CREATE DATABASE IF NOT EXISTS `starter_pack` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `starter_pack`;
-- Dumping structure for table starter_pack.failed_jobs
CREATE TABLE IF NOT EXISTS `failed_jobs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- Dumping data for table starter_pack.failed_jobs: ~0 rows (approximately)
/*!40000 ALTER TABLE `failed_jobs` DISABLE KEYS */;
/*!40000 ALTER TABLE `failed_jobs` ENABLE KEYS */;
-- Dumping structure for table starter_pack.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 AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- Dumping data for table starter_pack.migrations: ~4 rows (approximately)
/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
INSERT IGNORE 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, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2021_06_09_204903_create_permission_tables', 1);
/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
-- Dumping structure for table starter_pack.model_has_permissions
CREATE TABLE IF NOT EXISTS `model_has_permissions` (
`permission_id` bigint(20) unsigned NOT NULL,
`model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`model_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`),
CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- Dumping data for table starter_pack.model_has_permissions: ~0 rows (approximately)
/*!40000 ALTER TABLE `model_has_permissions` DISABLE KEYS */;
/*!40000 ALTER TABLE `model_has_permissions` ENABLE KEYS */;
-- Dumping structure for table starter_pack.model_has_roles
CREATE TABLE IF NOT EXISTS `model_has_roles` (
`role_id` bigint(20) unsigned NOT NULL,
`model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`model_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`role_id`,`model_id`,`model_type`),
KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`),
CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- Dumping data for table starter_pack.model_has_roles: ~3 rows (approximately)
/*!40000 ALTER TABLE `model_has_roles` DISABLE KEYS */;
INSERT IGNORE INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES
(2, 'App\\Models\\User', '332759a6-b5c8-4745-b924-b50303e2f145'),
(3, 'App\\Models\\User', '74ec6f5f-d437-474d-860d-158a16e52366'),
(1, 'App\\Models\\User', 'e3b4facf-cb90-4f3a-86b0-cf43353f1548');
/*!40000 ALTER TABLE `model_has_roles` ENABLE KEYS */;
-- Dumping structure for table starter_pack.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;
-- Dumping data for table starter_pack.password_resets: ~0 rows (approximately)
/*!40000 ALTER TABLE `password_resets` DISABLE KEYS */;
/*!40000 ALTER TABLE `password_resets` ENABLE KEYS */;
-- Dumping structure for table starter_pack.permissions
CREATE TABLE IF NOT EXISTS `permissions` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- Dumping data for table starter_pack.permissions: ~14 rows (approximately)
/*!40000 ALTER TABLE `permissions` DISABLE KEYS */;
INSERT IGNORE INTO `permissions` (`id`, `name`, `guard_name`, `desc`, `created_at`, `updated_at`) VALUES
(2, 'permission_list', 'web', 'List permission', '2021-06-18 19:57:00', '2021-06-18 19:57:00'),
(3, 'permission_add', 'web', NULL, '2021-06-18 19:57:13', '2021-06-18 19:57:13'),
(4, 'permission_delete', 'web', NULL, '2021-06-18 19:57:28', '2021-06-18 19:57:28'),
(5, 'permission_edit', 'web', NULL, '2021-06-18 19:57:37', '2021-06-18 19:57:37'),
(6, 'roles_add', 'web', NULL, '2021-06-18 19:58:04', '2021-06-18 19:58:04'),
(7, 'roles_edit', 'web', NULL, '2021-06-18 19:58:10', '2021-06-18 19:58:10'),
(8, 'roles_list', 'web', NULL, '2021-06-18 19:58:19', '2021-06-18 19:58:19'),
(12, 'roles_delete', 'web', NULL, '2021-06-18 20:22:40', '2021-06-18 20:22:40'),
(13, 'user_list', 'web', NULL, '2021-06-18 20:22:51', '2021-06-18 20:22:51'),
(14, 'user_add', 'web', NULL, '2021-06-18 20:22:57', '2021-06-18 20:22:57'),
(15, 'user_edit', 'web', NULL, '2021-06-18 20:23:02', '2021-06-18 20:23:02'),
(16, 'user_delete', 'web', NULL, '2021-06-18 20:23:10', '2021-06-18 20:23:10'),
(17, 'user_detail', 'web', NULL, '2021-06-18 20:38:34', '2021-06-18 20:38:34'),
(18, 'roles_access_perm', 'web', NULL, '2021-06-19 20:09:12', '2021-06-19 20:09:12');
/*!40000 ALTER TABLE `permissions` ENABLE KEYS */;
-- Dumping structure for table starter_pack.roles
CREATE TABLE IF NOT EXISTS `roles` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- Dumping data for table starter_pack.roles: ~3 rows (approximately)
/*!40000 ALTER TABLE `roles` DISABLE KEYS */;
INSERT IGNORE INTO `roles` (`id`, `name`, `guard_name`, `desc`, `created_at`, `updated_at`) VALUES
(1, 'Developer', 'web', 'Bisa Akses Semua Menu', '2021-06-12 20:31:08', '2021-06-18 17:29:34'),
(2, 'Admin', 'web', 'Admin', '2021-06-12 20:33:40', '2021-06-17 17:21:22'),
(3, 'User', 'web', 'User Pertamakali Daftar', '2021-06-18 19:52:51', '2021-06-18 19:52:51');
/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
-- Dumping structure for table starter_pack.role_has_permissions
CREATE TABLE IF NOT EXISTS `role_has_permissions` (
`permission_id` bigint(20) unsigned NOT NULL,
`role_id` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`permission_id`,`role_id`),
KEY `role_has_permissions_role_id_foreign` (`role_id`),
CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- Dumping data for table starter_pack.role_has_permissions: ~8 rows (approximately)
/*!40000 ALTER TABLE `role_has_permissions` DISABLE KEYS */;
INSERT IGNORE INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES
(3, 1),
(18, 1),
(12, 2),
(13, 2),
(14, 2),
(15, 2),
(16, 2),
(17, 2);
/*!40000 ALTER TABLE `role_has_permissions` ENABLE KEYS */;
-- Dumping structure for table starter_pack.users
CREATE TABLE IF NOT EXISTS `users` (
`id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL 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;
-- Dumping data for table starter_pack.users: ~3 rows (approximately)
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT IGNORE INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
('332759a6-b5c8-4745-b924-b50303e2f145', 'admin aja', '[email protected]', NULL, '$2y$10$rMZ4tXC296h9y0br5MIae.tcUD8H.2UZMX6Zn2vfdJUsM9vlXS6Ri', NULL, '2021-06-17 16:55:46', '2021-06-17 17:15:31'),
('74ec6f5f-d437-474d-860d-158a16e52366', 'test1', '[email protected]', NULL, '$2y$10$BQBgfMkyIUb8y5pjdVlS5.1M7F6jERh9xpvZG82wnpAoXY1Zcm5cq', NULL, '2021-06-18 19:54:54', '2021-06-18 19:54:54'),
('e3b4facf-cb90-4f3a-86b0-cf43353f1548', 'ridwan', '[email protected]', NULL, '$2y$10$4yYxpkgirjNzIOj8jmQC0.zsXXvWDPSuTPhtmhCiylkbb9KvDhwLq', NULL, '2021-06-09 20:53:16', '2021-06-09 20:53:16');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;