-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               10.4.32-MariaDB - mariadb.org binary distribution
-- Server OS:                    Win64
-- HeidiSQL Version:             12.11.0.7065
-- --------------------------------------------------------

/*!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 qjoki
CREATE DATABASE IF NOT EXISTS `qjoki` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */;
USE `qjoki`;

-- Dumping structure for view qjoki.cache
-- Creating temporary table to overcome VIEW dependency errors
CREATE TABLE `cache` (
	`key` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`value` MEDIUMTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`expiration` INT(11) NOT NULL
);

-- Dumping structure for view qjoki.cache_locks
-- Creating temporary table to overcome VIEW dependency errors
CREATE TABLE `cache_locks` (
	`key` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`owner` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`expiration` INT(11) NOT NULL
);

-- Dumping structure for view qjoki.failed_jobs
-- Creating temporary table to overcome VIEW dependency errors
CREATE TABLE `failed_jobs` (
	`id` BIGINT(20) UNSIGNED NOT NULL,
	`uuid` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`connection` TEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`queue` TEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`payload` LONGTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`exception` LONGTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`failed_at` TIMESTAMP NOT NULL
);

-- Dumping structure for view qjoki.jobs
-- Creating temporary table to overcome VIEW dependency errors
CREATE TABLE `jobs` (
	`id` BIGINT(20) UNSIGNED NOT NULL,
	`queue` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`payload` LONGTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`attempts` TINYINT(3) UNSIGNED NOT NULL,
	`reserved_at` INT(10) UNSIGNED NULL,
	`available_at` INT(10) UNSIGNED NOT NULL,
	`created_at` INT(10) UNSIGNED NOT NULL
);

-- Dumping structure for view qjoki.job_batches
-- Creating temporary table to overcome VIEW dependency errors
CREATE TABLE `job_batches` (
	`id` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`name` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`total_jobs` INT(11) NOT NULL,
	`pending_jobs` INT(11) NOT NULL,
	`failed_jobs` INT(11) NOT NULL,
	`failed_job_ids` LONGTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`options` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci',
	`cancelled_at` INT(11) NULL,
	`created_at` INT(11) NOT NULL,
	`finished_at` INT(11) NULL
);

-- Dumping structure for view qjoki.migrations
-- Creating temporary table to overcome VIEW dependency errors
CREATE TABLE `migrations` (
	`id` INT(10) UNSIGNED NOT NULL,
	`migration` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`batch` INT(11) NOT NULL
);

-- Dumping structure for view qjoki.orders
-- Creating temporary table to overcome VIEW dependency errors
CREATE TABLE `orders` (
	`id` BIGINT(20) UNSIGNED NOT NULL,
	`order_number` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`customer_user_id` BIGINT(20) UNSIGNED NULL,
	`customer_name` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`customer_contact` VARCHAR(1) NULL COLLATE 'utf8mb4_unicode_ci',
	`service_name` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`package_name` VARCHAR(1) NULL COLLATE 'utf8mb4_unicode_ci',
	`price_amount` DECIMAL(12,2) UNSIGNED NOT NULL,
	`currency` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`status` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`paid_at` TIMESTAMP NULL,
	`assigned_to_user_id` BIGINT(20) UNSIGNED NULL,
	`notes` TEXT NULL COLLATE 'utf8mb4_unicode_ci',
	`created_at` TIMESTAMP NULL,
	`updated_at` TIMESTAMP NULL
);

-- Dumping structure for view qjoki.password_reset_tokens
-- Creating temporary table to overcome VIEW dependency errors
CREATE TABLE `password_reset_tokens` (
	`email` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`token` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`created_at` TIMESTAMP NULL
);

-- Dumping structure for view qjoki.sessions
-- Creating temporary table to overcome VIEW dependency errors
CREATE TABLE `sessions` (
	`id` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`user_id` BIGINT(20) UNSIGNED NULL,
	`ip_address` VARCHAR(1) NULL COLLATE 'utf8mb4_unicode_ci',
	`user_agent` TEXT NULL COLLATE 'utf8mb4_unicode_ci',
	`payload` LONGTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`last_activity` INT(11) NOT NULL
);

-- Dumping structure for view qjoki.users
-- Creating temporary table to overcome VIEW dependency errors
CREATE TABLE `users` (
	`id` BIGINT(20) UNSIGNED NOT NULL,
	`name` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`email` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`email_verified_at` TIMESTAMP NULL,
	`password` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`role` VARCHAR(1) NOT NULL COLLATE 'utf8mb4_unicode_ci',
	`remember_token` VARCHAR(1) NULL COLLATE 'utf8mb4_unicode_ci',
	`created_at` TIMESTAMP NULL,
	`updated_at` TIMESTAMP NULL
);

-- Removing temporary table and create final VIEW structure
DROP TABLE IF EXISTS `cache`;

;

-- Removing temporary table and create final VIEW structure
DROP TABLE IF EXISTS `cache_locks`;

;

-- Removing temporary table and create final VIEW structure
DROP TABLE IF EXISTS `failed_jobs`;

;

-- Removing temporary table and create final VIEW structure
DROP TABLE IF EXISTS `jobs`;

;

-- Removing temporary table and create final VIEW structure
DROP TABLE IF EXISTS `job_batches`;

;

-- Removing temporary table and create final VIEW structure
DROP TABLE IF EXISTS `migrations`;

;

-- Removing temporary table and create final VIEW structure
DROP TABLE IF EXISTS `orders`;

;

-- Removing temporary table and create final VIEW structure
DROP TABLE IF EXISTS `password_reset_tokens`;

;

-- Removing temporary table and create final VIEW structure
DROP TABLE IF EXISTS `sessions`;

;

-- Removing temporary table and create final VIEW structure
DROP TABLE IF EXISTS `users`;

;

/*!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) */;
