Advertisement
fundaypande

Untitled

Feb 25th, 2018
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.64 KB | None | 0 0
  1. -- phpMyAdmin SQL Dump
  2. -- version 4.7.3
  3. -- https://www.phpmyadmin.net/
  4. --
  5. -- Host: localhost
  6. -- Generation Time: Feb 25, 2018 at 12:38 PM
  7. -- Server version: 5.6.35
  8. -- PHP Version: 7.1.8
  9.  
  10. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  11. SET time_zone = "+00:00";
  12.  
  13. --
  14. -- Database: `mydb`
  15. --
  16.  
  17. -- --------------------------------------------------------
  18.  
  19. --
  20. -- Table structure for table `atlits`
  21. --
  22.  
  23. CREATE TABLE `atlits` (
  24. `id` int(10) UNSIGNED NOT NULL,
  25. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  26. `jk` tinyint(1) NOT NULL,
  27. `ttl` date NOT NULL,
  28. `sekolah_id` int(10) UNSIGNED NOT NULL,
  29. `user_id` int(10) UNSIGNED NOT NULL,
  30. `created_at` timestamp NULL DEFAULT NULL,
  31. `updated_at` timestamp NULL DEFAULT NULL
  32. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  33.  
  34. --
  35. -- Dumping data for table `atlits`
  36. --
  37.  
  38. INSERT INTO `atlits` (`id`, `name`, `jk`, `ttl`, `sekolah_id`, `user_id`, `created_at`, `updated_at`) VALUES
  39. (1, 'Funday Pande Laki', 1, '1998-02-24', 13, 5, NULL, '2018-02-25 00:57:45'),
  40. (2, 'Made SIanida', 0, '1998-02-06', 14, 6, NULL, NULL),
  41. (4, 'Meong Garong Kedua', 0, '1990-01-30', 10, 5, '2018-02-24 01:04:45', '2018-02-25 00:58:43'),
  42. (5, 'Nyoman Suarsan', 0, '2004-02-10', 13, 5, '2018-02-24 07:48:40', '2018-02-24 07:48:40'),
  43. (6, 'Made Sumbawe', 1, '1998-02-12', 11, 5, '2018-02-24 19:57:08', '2018-02-24 19:57:08');
  44.  
  45. -- --------------------------------------------------------
  46.  
  47. --
  48. -- Table structure for table `daftars`
  49. --
  50.  
  51. CREATE TABLE `daftars` (
  52. `id` int(10) UNSIGNED NOT NULL,
  53. `atlit_id` int(10) UNSIGNED NOT NULL,
  54. `lomba_id` int(10) UNSIGNED NOT NULL,
  55. `best_time` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  56. `user_id` int(10) UNSIGNED NOT NULL,
  57. `umur_id` int(10) UNSIGNED NOT NULL,
  58. `created_at` timestamp NULL DEFAULT NULL,
  59. `updated_at` timestamp NULL DEFAULT NULL
  60. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  61.  
  62. --
  63. -- Dumping data for table `daftars`
  64. --
  65.  
  66. INSERT INTO `daftars` (`id`, `atlit_id`, `lomba_id`, `best_time`, `user_id`, `umur_id`, `created_at`, `updated_at`) VALUES
  67. (1, 1, 2, '20 Menit', 6, 5, NULL, NULL),
  68. (2, 4, 2, '30 Menit', 6, 4, NULL, NULL);
  69.  
  70. -- --------------------------------------------------------
  71.  
  72. --
  73. -- Table structure for table `lombas`
  74. --
  75.  
  76. CREATE TABLE `lombas` (
  77. `id` int(10) UNSIGNED NOT NULL,
  78. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  79. `created_at` timestamp NULL DEFAULT NULL,
  80. `updated_at` timestamp NULL DEFAULT NULL
  81. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  82.  
  83. --
  84. -- Dumping data for table `lombas`
  85. --
  86.  
  87. INSERT INTO `lombas` (`id`, `name`, `created_at`, `updated_at`) VALUES
  88. (2, 'Lari Menyebaran', NULL, NULL),
  89. (3, 'Balap Jangkrik Terpadu', '2018-02-23 18:34:30', '2018-02-23 18:34:36');
  90.  
  91. -- --------------------------------------------------------
  92.  
  93. --
  94. -- Table structure for table `migrations`
  95. --
  96.  
  97. CREATE TABLE `migrations` (
  98. `id` int(10) UNSIGNED NOT NULL,
  99. `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  100. `batch` int(11) NOT NULL
  101. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  102.  
  103. --
  104. -- Dumping data for table `migrations`
  105. --
  106.  
  107. INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
  108. (3, '2014_10_12_000000_create_users_table', 1),
  109. (4, '2014_10_12_100000_create_password_resets_table', 1),
  110. (5, '2018_02_23_134519_create_sekolahs_table', 2),
  111. (6, '2018_02_23_153855_create_upload_files_table', 3),
  112. (7, '2018_02_23_153921_create_lombas_table', 3),
  113. (8, '2018_02_23_155404_create_umurs_table', 4),
  114. (9, '2018_02_24_013853_users_migration', 5),
  115. (11, '2018_02_24_042314_create_atlits_table', 6),
  116. (16, '2018_02_25_091234_create_daftars_table', 7);
  117.  
  118. -- --------------------------------------------------------
  119.  
  120. --
  121. -- Table structure for table `password_resets`
  122. --
  123.  
  124. CREATE TABLE `password_resets` (
  125. `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  126. `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  127. `created_at` timestamp NULL DEFAULT NULL
  128. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  129.  
  130. -- --------------------------------------------------------
  131.  
  132. --
  133. -- Table structure for table `sekolahs`
  134. --
  135.  
  136. CREATE TABLE `sekolahs` (
  137. `id` int(10) UNSIGNED NOT NULL,
  138. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  139. `alamat` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  140. `phone` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL,
  141. `created_at` timestamp NULL DEFAULT NULL,
  142. `updated_at` timestamp NULL DEFAULT NULL
  143. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  144.  
  145. --
  146. -- Dumping data for table `sekolahs`
  147. --
  148.  
  149. INSERT INTO `sekolahs` (`id`, `name`, `alamat`, `phone`, `created_at`, `updated_at`) VALUES
  150. (5, 'SMA 4 Singaraja EDIT', 'Kapolsek singaraja ke barat dikit 2a', '01938246', '2018-02-23 07:05:40', '2018-02-24 20:13:45'),
  151. (10, 'SMK Bali Berjaya', 'Jalan gunung subabue', '91083439', '2018-02-23 18:39:26', '2018-02-23 18:39:26'),
  152. (11, 'Sekolah International', 'Jalan international no baru', '91340193', '2018-02-23 18:44:53', '2018-02-23 18:44:53'),
  153. (13, 'Sekolah Kurang Angin', 'Jalan anignanan 23', '98173894', '2018-02-23 19:43:31', '2018-02-23 19:43:31'),
  154. (14, 'Sekolah Kita Bersama', 'Jalan meninang kaingian', '019824', '2018-02-23 19:50:57', '2018-02-23 19:50:57'),
  155. (15, 'dddddd', 'adasd', '12312', '2018-02-23 19:52:50', '2018-02-23 19:52:50'),
  156. (16, 'hhhhhhh', 'Gunung batur', '209812901', '2018-02-23 19:54:05', '2018-02-23 19:54:05'),
  157. (17, 'Sekolah Funday', 'Jalan gunung batur no 5', '013984790134', '2018-02-23 19:56:35', '2018-02-23 19:56:35'),
  158. (18, 'Bisaa lo Ini', 'jalanjlana', '901384913', '2018-02-23 20:05:53', '2018-02-23 20:05:53'),
  159. (19, 'Dari Register', 'Jalan pingunin', '90834091', '2018-02-23 20:07:20', '2018-02-23 20:07:20'),
  160. (20, 'Penambahan ID Hilang', 'Hebat', '90238902', '2018-02-23 20:09:58', '2018-02-23 20:09:58'),
  161. (21, 'Sekolah Pinguin', 'Pingun cuk curacuk', '1093481', '2018-02-23 20:11:12', '2018-02-23 20:11:12'),
  162. (22, 'Sekolah Pantai Pinguin', 'Hebat Yaaaa', '01934809134', '2018-02-23 20:12:51', '2018-02-23 20:12:51'),
  163. (23, 'Hebatt', 'Jalan hebat makmur', '01984', '2018-02-24 20:25:34', '2018-02-24 20:25:34');
  164.  
  165. -- --------------------------------------------------------
  166.  
  167. --
  168. -- Table structure for table `umurs`
  169. --
  170.  
  171. CREATE TABLE `umurs` (
  172. `id` int(10) UNSIGNED NOT NULL,
  173. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  174. `keterangan` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  175. `created_at` timestamp NULL DEFAULT NULL,
  176. `updated_at` timestamp NULL DEFAULT NULL
  177. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  178.  
  179. --
  180. -- Dumping data for table `umurs`
  181. --
  182.  
  183. INSERT INTO `umurs` (`id`, `name`, `keterangan`, `created_at`, `updated_at`) VALUES
  184. (2, 'Remaja', '14 Tahun Keatas', NULL, NULL),
  185. (3, 'Tua Sekali', '50 tahun keatas', '2018-02-23 08:07:09', '2018-02-23 08:07:20'),
  186. (4, 'Sangat Remaja', '12 Tahun', '2018-02-23 08:20:54', '2018-02-23 08:20:54'),
  187. (5, 'Dewasa Sekali', 'Umur 70 Tahun s', '2018-02-23 18:34:54', '2018-02-23 18:34:58');
  188.  
  189. -- --------------------------------------------------------
  190.  
  191. --
  192. -- Table structure for table `users`
  193. --
  194.  
  195. CREATE TABLE `users` (
  196. `id` int(10) UNSIGNED NOT NULL,
  197. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  198. `username` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  199. `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  200. `password` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  201. `school` int(10) UNSIGNED DEFAULT NULL,
  202. `phone` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  203. `gambar` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  204. `status` tinyint(1) NOT NULL DEFAULT '0',
  205. `role` tinyint(1) NOT NULL DEFAULT '1',
  206. `token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  207. `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  208. `created_at` timestamp NULL DEFAULT NULL,
  209. `updated_at` timestamp NULL DEFAULT NULL
  210. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  211.  
  212. --
  213. -- Dumping data for table `users`
  214. --
  215.  
  216. INSERT INTO `users` (`id`, `name`, `username`, `email`, `password`, `school`, `phone`, `gambar`, `status`, `role`, `token`, `remember_token`, `created_at`, `updated_at`) VALUES
  217. (5, 'funday', 'fundaypande', 'funday820@gmail.com', '$2y$10$RVRj8C7vqdC30J8sEayv9O3Dc.XP4dHRkIeiCWTxK69YYK9oPYkoS', 11, '1093840913', '1519532236.png', 1, 0, '1ctbeFS5qYjoMYDUQfup', 'MBILvOljToeimVup5EL7Rt31HoVGY1PRdcexyrfutMj0qwrsgEJWpdRGHiAu', '2018-02-23 18:31:07', '2018-02-24 20:17:35'),
  218. (6, 'funday', 'funday', 'ajdfnkajdbf@gmail.com', NULL, NULL, '0293821', NULL, 0, 1, 'lmRuTS5rRjrJwJEI5bEJ', NULL, '2018-02-23 18:33:40', '2018-02-23 18:33:40'),
  219. (7, 'budi', 'budi', 'buadf@gmail.com', '$2y$10$IUq9VubFrK/TvfJej1HoyeZauY87PxGAvmT3GkJLqOS.UNyKK4Tni', NULL, '24562546', '1519440423.png', 1, 1, '3PfMs5N1zmHSVPxByqi7', '2kihEcK2FejYQYmGjQDHrMbRkifWuyax3FZPGP8MZ1A3URnWY3NbVl8PMb9A', '2018-02-23 18:34:16', '2018-02-23 18:56:20'),
  220. (8, 'Krisna', 'krisna', 'faujfa@gmail.com', '$2y$10$oCwa0jRHK.9wHHzWCgiujeUVpprIuuhbWT/LZrJTmfoI9DHQES3Se', 20, '0913840913', '1519441539.jpg', 1, 0, 'YK1edwupRC1yWwd10WoI', NULL, '2018-02-23 19:03:55', '2018-02-23 20:10:03'),
  221. (9, 'Komang Pinguin', 'pinguin', 'oinguinha@gmail.com', '$2y$10$csEs4suwaWoD7c.2UEfNE.dIZ1ttzHOFt19UFnGAzI8IT7fQJMF3O', 22, '8734019734', NULL, 1, 1, 'XeG0A41GY7nUNtJbjmoa', '8XJU3o3GFCHalUs2wRYlKafAnmaNpKPMc4khhWV9gDCYFg0rCrKvEtuNZDyX', '2018-02-23 20:12:57', '2018-02-23 20:13:52');
  222.  
  223. --
  224. -- Indexes for dumped tables
  225. --
  226.  
  227. --
  228. -- Indexes for table `atlits`
  229. --
  230. ALTER TABLE `atlits`
  231. ADD PRIMARY KEY (`id`),
  232. ADD KEY `atlits_sekolah_id_foreign` (`sekolah_id`),
  233. ADD KEY `atlits_user_id_foreign` (`user_id`);
  234.  
  235. --
  236. -- Indexes for table `daftars`
  237. --
  238. ALTER TABLE `daftars`
  239. ADD PRIMARY KEY (`id`),
  240. ADD KEY `daftars_user_id_foreign` (`user_id`),
  241. ADD KEY `daftars_atlit_id_foreign` (`atlit_id`),
  242. ADD KEY `daftars_lomba_id_foreign` (`lomba_id`),
  243. ADD KEY `daftars_umur_id_foreign` (`umur_id`);
  244.  
  245. --
  246. -- Indexes for table `lombas`
  247. --
  248. ALTER TABLE `lombas`
  249. ADD PRIMARY KEY (`id`);
  250.  
  251. --
  252. -- Indexes for table `migrations`
  253. --
  254. ALTER TABLE `migrations`
  255. ADD PRIMARY KEY (`id`);
  256.  
  257. --
  258. -- Indexes for table `password_resets`
  259. --
  260. ALTER TABLE `password_resets`
  261. ADD KEY `password_resets_email_index` (`email`);
  262.  
  263. --
  264. -- Indexes for table `sekolahs`
  265. --
  266. ALTER TABLE `sekolahs`
  267. ADD PRIMARY KEY (`id`);
  268.  
  269. --
  270. -- Indexes for table `umurs`
  271. --
  272. ALTER TABLE `umurs`
  273. ADD PRIMARY KEY (`id`);
  274.  
  275. --
  276. -- Indexes for table `users`
  277. --
  278. ALTER TABLE `users`
  279. ADD PRIMARY KEY (`id`),
  280. ADD UNIQUE KEY `users_email_unique` (`email`),
  281. ADD UNIQUE KEY `users_username_unique` (`username`),
  282. ADD KEY `users_school_foreign` (`school`);
  283.  
  284. --
  285. -- AUTO_INCREMENT for dumped tables
  286. --
  287.  
  288. --
  289. -- AUTO_INCREMENT for table `atlits`
  290. --
  291. ALTER TABLE `atlits`
  292. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
  293. --
  294. -- AUTO_INCREMENT for table `daftars`
  295. --
  296. ALTER TABLE `daftars`
  297. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  298. --
  299. -- AUTO_INCREMENT for table `lombas`
  300. --
  301. ALTER TABLE `lombas`
  302. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  303. --
  304. -- AUTO_INCREMENT for table `migrations`
  305. --
  306. ALTER TABLE `migrations`
  307. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
  308. --
  309. -- AUTO_INCREMENT for table `sekolahs`
  310. --
  311. ALTER TABLE `sekolahs`
  312. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
  313. --
  314. -- AUTO_INCREMENT for table `umurs`
  315. --
  316. ALTER TABLE `umurs`
  317. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  318. --
  319. -- AUTO_INCREMENT for table `users`
  320. --
  321. ALTER TABLE `users`
  322. MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
  323. --
  324. -- Constraints for dumped tables
  325. --
  326.  
  327. --
  328. -- Constraints for table `atlits`
  329. --
  330. ALTER TABLE `atlits`
  331. ADD CONSTRAINT `atlits_sekolah_id_foreign` FOREIGN KEY (`sekolah_id`) REFERENCES `sekolahs` (`id`),
  332. ADD CONSTRAINT `atlits_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
  333.  
  334. --
  335. -- Constraints for table `daftars`
  336. --
  337. ALTER TABLE `daftars`
  338. ADD CONSTRAINT `daftars_atlit_id_foreign` FOREIGN KEY (`atlit_id`) REFERENCES `atlits` (`id`),
  339. ADD CONSTRAINT `daftars_lomba_id_foreign` FOREIGN KEY (`lomba_id`) REFERENCES `lombas` (`id`),
  340. ADD CONSTRAINT `daftars_umur_id_foreign` FOREIGN KEY (`umur_id`) REFERENCES `umurs` (`id`),
  341. ADD CONSTRAINT `daftars_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
  342.  
  343. --
  344. -- Constraints for table `users`
  345. --
  346. ALTER TABLE `users`
  347. ADD CONSTRAINT `users_school_foreign` FOREIGN KEY (`school`) REFERENCES `sekolahs` (`id`) ON DELETE SET NULL;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement