text: /*
  SQLyog Ultimate v12.4.3 (64 bit)
  MySQL - 10.1.34-MariaDB : Database - db_repository
  *********************************************************************
  */
  
  /*!40101 SET NAMES utf8 */;
  
  /*!40101 SET SQL_MODE=''*/;
  
  /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  /*!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 */;
  CREATE DATABASE /*!32312 IF NOT EXISTS*/`db_repository` /*!40100 DEFAULT CHARACTER SET latin1 */;
  
  USE `db_repository`;
  
  /*Table structure for table `jenis` */
  
  DROP TABLE IF EXISTS `jenis`;
  
  CREATE TABLE `jenis` (
    `id_jenis` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `nama_jenis` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    PRIMARY KEY (`id_jenis`)
  ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  /*Data for the table `jenis` */
  
  insert  into `jenis`(`id_jenis`,`nama_jenis`) values 
  (1,'Foto'),
  (2,'Video');
  
  /*Table structure for table `kategori` */
  
  DROP TABLE IF EXISTS `kategori`;
  
  CREATE TABLE `kategori` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `id_jenis` int(10) unsigned NOT NULL,
    `namakategori` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `kategori_id_jenis_index` (`id_jenis`),
    CONSTRAINT `kategori_id_jenis_foreign` FOREIGN KEY (`id_jenis`) REFERENCES `jenis` (`id_jenis`) ON DELETE CASCADE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  /*Data for the table `kategori` */
  
  /*Table structure for table `migrations` */
  
  DROP TABLE IF EXISTS `migrations`;
  
  CREATE TABLE `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=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  /*Data for the table `migrations` */
  
  insert  into `migrations`(`id`,`migration`,`batch`) values 
  (1,'2019_01_09_054900_create_posts_table',1);
  
  /*Table structure for table `role` */
  
  DROP TABLE IF EXISTS `role`;
  
  CREATE TABLE `role` (
    `id_role` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `role` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    PRIMARY KEY (`id_role`)
  ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  /*Data for the table `role` */
  
  insert  into `role`(`id_role`,`role`) values 
  (1,'Admin'),
  (2,'Users');
  
  /*Table structure for table `uploadmedia` */
  
  DROP TABLE IF EXISTS `uploadmedia`;
  
  CREATE TABLE `uploadmedia` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `id_jenis` int(10) unsigned NOT NULL,
    `id_kategori` int(10) unsigned NOT NULL,
    `namakategori` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `keterangan` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `namafile` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `uploadmedia_id_jenis_index` (`id_jenis`),
    KEY `uploadmedia_id_kategori_index` (`id_kategori`),
    CONSTRAINT `uploadmedia_id_jenis_foreign` FOREIGN KEY (`id_jenis`) REFERENCES `jenis` (`id_jenis`) ON DELETE CASCADE,
    CONSTRAINT `uploadmedia_id_kategori_foreign` FOREIGN KEY (`id_kategori`) REFERENCES `kategori` (`id`) ON DELETE CASCADE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  /*Data for the table `uploadmedia` */
  
  /*Table structure for table `users` */
  
  DROP TABLE IF EXISTS `users`;
  
  CREATE TABLE `users` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `nama` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `username` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
    `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `id_role` int(10) unsigned 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_username_unique` (`username`),
    KEY `users_id_role_index` (`id_role`),
    CONSTRAINT `users_id_role_foreign` FOREIGN KEY (`id_role`) REFERENCES `role` (`id_role`) ON DELETE CASCADE
  ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  /*Data for the table `users` */
  
  insert  into `users`(`id`,`nama`,`username`,`password`,`id_role`,`remember_token`,`created_at`,`updated_at`) values 
  (1,'admin','admin','$2y$10$DZmDaf0hGKrv5fppj0RTCeN7e0.w3LpTGEjdkr1zvrp75jRxWNRga',1,'36VtguvoKMuUJ8tOeblsQdn9SM59ElgTYACu3tk3WVHoQd9eFqJG7UKPPQcT','2019-02-07 07:07:48','2019-02-14 03:31:13');
  
  /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  