d2d.emegrendeles.hu/database/schema/mysql-schema.sql
E98Developer a9758e8da7 ADD Séma dump a 103 migráció kiváltására a teszteknél
A migrate:fresh eddig 103 migrációt futtatott le minden teszt-futásnál. A dump
egyetlen SQL fájlként tölti be ugyanazt a 48 táblát: migrate:fresh 21,09 ->
12,07 mp, egy teszt --filter-rel 27,80 -> 20,88 mp.

A dumpot a Laravel csak akkor tölti be, ha a migrations tábla ÜRES
(MigrateCommand::prepareDatabase), tehát az e2e/d2d környezetek - ahol már
vannak lefutott migrációk - változatlanul inkrementálisan migrálnak. Ezért
--prune NÉLKÜL készült: a 103 migrációs fájl a helyén marad.

Karbantartás: minden új migráció után újra kell generálni (php artisan
schema:dump). Ha elmarad, az nem törik el semmit, csak a dump utáni
migrációkat egyenként futtatja le.

A betöltéshez a mysql kliens kell a PATH-on
(C:\www\envkit\services\mysql\11.8.2\bin).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 10:34:26 +02:00

1126 lines
64 KiB
SQL

/*M!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!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' */;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `addresses`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `addresses` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`postCode` varchar(255) DEFAULT NULL,
`city` varchar(255) DEFAULT NULL,
`street` varchar(255) NOT NULL,
`note` varchar(255) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
`canSee` tinyint(1) NOT NULL DEFAULT 1,
`attachable_id` int(10) unsigned DEFAULT NULL,
`attachable_type` varchar(255) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `attachments`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `attachments` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`attachable_id` int(11) DEFAULT NULL,
`attachable_type` varchar(255) DEFAULT NULL,
`path` varchar(255) DEFAULT NULL,
`filename` varchar(255) DEFAULT NULL,
`mimetype` varchar(255) DEFAULT NULL,
`size` int(11) DEFAULT NULL,
`original_filename` varchar(255) DEFAULT NULL,
`attachType` varchar(255) DEFAULT 'nul',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `attachable_type` (`attachable_type`),
KEY `attachable_id` (`attachable_id`),
KEY `attachable_type_attachable_id` (`attachable_type`,`attachable_id`),
KEY `attachType` (`attachType`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `audits`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `audits` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`user_type` varchar(255) DEFAULT NULL,
`user_id` bigint(20) unsigned DEFAULT NULL,
`event` varchar(255) NOT NULL,
`auditable_type` varchar(255) NOT NULL,
`auditable_id` bigint(20) unsigned NOT NULL,
`old_values` text DEFAULT NULL,
`new_values` text DEFAULT NULL,
`url` text DEFAULT NULL,
`ip_address` varchar(45) DEFAULT NULL,
`user_agent` varchar(1023) DEFAULT NULL,
`tags` varchar(255) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `audits_auditable_type_auditable_id_index` (`auditable_type`,`auditable_id`),
KEY `audits_user_id_user_type_index` (`user_id`,`user_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cache`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `cache` (
`key` varchar(255) NOT NULL,
`value` mediumtext NOT NULL,
`expiration` int(11) NOT NULL,
UNIQUE KEY `cache_key_unique` (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `contacts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `contacts` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`phone` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`type` set('orderMail','contactMember','customerService') DEFAULT NULL,
`note` text DEFAULT NULL,
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
`canSee` tinyint(1) NOT NULL DEFAULT 1,
`contactable_id` int(10) unsigned DEFAULT NULL,
`contactable_type` varchar(255) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `delivery_calendar_overrides`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `delivery_calendar_overrides` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`supplier_id` bigint(20) unsigned NOT NULL,
`override_scope` varchar(255) NOT NULL DEFAULT 'general',
`date` date NOT NULL,
`is_delivery_day` tinyint(1) NOT NULL,
`description` varchar(255) DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`profit_center_id` bigint(20) unsigned DEFAULT NULL,
`delivery_schedule_id` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `delivery_calendar_overrides_supplier_id_foreign` (`supplier_id`),
KEY `delivery_calendar_overrides_profit_center_id_foreign` (`profit_center_id`),
KEY `delivery_calendar_overrides_delivery_schedule_id_foreign` (`delivery_schedule_id`),
CONSTRAINT `delivery_calendar_overrides_delivery_schedule_id_foreign` FOREIGN KEY (`delivery_schedule_id`) REFERENCES `delivery_schedules` (`id`) ON DELETE SET NULL,
CONSTRAINT `delivery_calendar_overrides_profit_center_id_foreign` FOREIGN KEY (`profit_center_id`) REFERENCES `profit_centers` (`id`) ON DELETE SET NULL,
CONSTRAINT `delivery_calendar_overrides_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `delivery_schedules`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `delivery_schedules` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`monday` tinyint(1) NOT NULL DEFAULT 0,
`tuesday` tinyint(1) NOT NULL DEFAULT 0,
`wednesday` tinyint(1) NOT NULL DEFAULT 0,
`thursday` tinyint(1) NOT NULL DEFAULT 0,
`friday` tinyint(1) NOT NULL DEFAULT 0,
`saturday` tinyint(1) NOT NULL DEFAULT 0,
`sunday` tinyint(1) NOT NULL DEFAULT 0,
`is_active` tinyint(1) NOT NULL DEFAULT 1,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `deployment_packages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `deployment_packages` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`target` varchar(32) NOT NULL,
`branch` varchar(255) DEFAULT NULL,
`from_commit` varchar(40) NOT NULL,
`to_commit` varchar(40) NOT NULL,
`folder` varchar(1024) NOT NULL,
`zip_path` varchar(1024) DEFAULT NULL,
`copied_count` int(10) unsigned NOT NULL DEFAULT 0,
`deleted_count` int(10) unsigned NOT NULL DEFAULT 0,
`skipped_count` int(10) unsigned NOT NULL DEFAULT 0,
`missing_count` int(10) unsigned NOT NULL DEFAULT 0,
`note` text DEFAULT NULL,
`deployed_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `deployment_packages_target_deployed_at_index` (`target`,`deployed_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `failed_jobs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `failed_jobs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`uuid` varchar(255) NOT NULL,
`connection` text NOT NULL,
`queue` text NOT NULL,
`payload` longtext NOT NULL,
`exception` longtext 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;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `feature_flag_overrides`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `feature_flag_overrides` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`feature_flag_id` bigint(20) unsigned NOT NULL,
`user_id` bigint(20) unsigned NOT NULL,
`active` tinyint(1) NOT NULL,
`created_by` bigint(20) unsigned DEFAULT NULL,
`updated_by` bigint(20) unsigned DEFAULT NULL,
`deleted_by` bigint(20) unsigned DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `feature_flag_overrides_feature_flag_id_user_id_unique` (`feature_flag_id`,`user_id`),
KEY `feature_flag_overrides_user_id_foreign` (`user_id`),
CONSTRAINT `feature_flag_overrides_feature_flag_id_foreign` FOREIGN KEY (`feature_flag_id`) REFERENCES `feature_flags` (`id`) ON DELETE CASCADE,
CONSTRAINT `feature_flag_overrides_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `feature_flags`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `feature_flags` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`label` varchar(255) NOT NULL,
`description` text DEFAULT NULL,
`enabled` tinyint(1) NOT NULL DEFAULT 1,
`stages` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`stages`)),
`roles` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`roles`)),
`created_by` bigint(20) unsigned DEFAULT NULL,
`updated_by` bigint(20) unsigned DEFAULT NULL,
`deleted_by` bigint(20) unsigned DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `feature_flags_name_unique` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `features`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `features` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`scope` varchar(255) NOT NULL,
`value` text NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `features_name_scope_unique` (`name`,`scope`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `migrations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `migrations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`migration` varchar(255) NOT NULL,
`batch` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `order_archives`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_archives` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`profit_center_id` int(10) unsigned DEFAULT NULL,
`supplier_id` int(10) unsigned NOT NULL,
`contactName` varchar(255) DEFAULT NULL,
`note` text DEFAULT NULL,
`orderType` enum('daily','weekly') NOT NULL DEFAULT 'daily',
`parent_id` bigint(20) DEFAULT NULL,
`orderFlag` set('modifier','modified','storno') DEFAULT NULL,
`rel_id` bigint(20) DEFAULT NULL,
`archive_id` bigint(20) DEFAULT NULL,
`deliveryDate` date DEFAULT NULL,
`deliveryAddressId` int(10) unsigned DEFAULT NULL,
`deliveryAddressName` varchar(255) DEFAULT NULL,
`deliveryAddress` varchar(255) DEFAULT NULL,
`customNotificationEmail` varchar(255) DEFAULT NULL,
`productSelected` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`productSelected`)),
`productComment` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`productComment`)),
`feedBackId` char(36) DEFAULT NULL,
`orderStatus` enum('supplierSelect','parameter','productSelect','invoice','send','sent','confirmed','archived') NOT NULL DEFAULT 'supplierSelect',
`sentTime` datetime DEFAULT NULL,
`confirmed` datetime DEFAULT NULL,
`supplierOrderNumber` int(10) unsigned DEFAULT NULL,
`humanId` varchar(255) DEFAULT NULL,
`sumPrice` float NOT NULL,
`APILastGetting` datetime DEFAULT NULL,
`APICallBackId` char(36) DEFAULT NULL,
`APIConfirmed` datetime DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
`profit_center_name` varchar(255) DEFAULT NULL,
`supplier_name` varchar(255) DEFAULT NULL,
`emailAttachmentType` varchar(255) DEFAULT NULL,
`supplier_emailAttachmentType` enum('pdf','excel','nincs') DEFAULT NULL,
`original_created_at` timestamp NULL DEFAULT NULL,
`original_updated_at` timestamp NULL DEFAULT NULL,
`original_deleted_at` timestamp NULL DEFAULT NULL,
`original_created_by` int(10) unsigned DEFAULT NULL,
`original_updated_by` int(11) DEFAULT NULL,
`original_deleted_by` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `order_archives_items`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_archives_items` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`supplier_id` int(11) DEFAULT NULL,
`producer_id` int(11) DEFAULT NULL,
`packing` int(11) DEFAULT NULL,
`unitValue` double NOT NULL,
`productUnit` enum('g','ml','tálca','csom','dob','kart','rúd','pár','zsák','kg','l','db') DEFAULT NULL,
`sellerUnit` enum('g','ml','tálca','csom','dob','kart','rúd','pár','zsák','kg','l','db') DEFAULT NULL,
`unitMultiplier` double DEFAULT NULL,
`amountUnit` enum('g','ml','tálca','csom','dob','kart','rúd','pár','zsák','kg','l','db') DEFAULT NULL,
`vat` double DEFAULT NULL,
`supplierProductNumber` varchar(255) DEFAULT NULL,
`product_group_id` int(11) DEFAULT NULL,
`hooreycaId` varchar(255) DEFAULT NULL,
`HooreycaUnit` varchar(255) DEFAULT NULL,
`HooreycaMultiplier` double DEFAULT NULL,
`buyerProductName` varchar(255) DEFAULT NULL,
`buyerProductNumber` varchar(255) DEFAULT NULL,
`note` text DEFAULT NULL,
`type` enum('F','N','X') DEFAULT NULL,
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
`stock_status` varchar(255) NOT NULL DEFAULT 'in_stock',
`canSee` tinyint(1) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
`order_archive_id` bigint(20) unsigned NOT NULL,
`supplier_name` varchar(255) DEFAULT NULL,
`producer_name` varchar(255) DEFAULT NULL,
`product_group_name` varchar(255) DEFAULT NULL,
`product_group_path` varchar(255) DEFAULT NULL,
`quantity` double DEFAULT NULL,
`price` double DEFAULT NULL,
`amount` double DEFAULT NULL,
`comment` text DEFAULT NULL,
`krel` tinyint(1) NOT NULL DEFAULT 0,
`specialOffer` tinyint(1) NOT NULL DEFAULT 0,
`weightScale` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `order_numbers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_numbers` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`year` tinyint(3) unsigned NOT NULL,
`supplier_id` int(10) unsigned NOT NULL,
`order_id` int(10) unsigned DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`supplier_id`,`year`,`id`),
UNIQUE KEY `order_numbers_order_id_unique` (`order_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `orders`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `orders` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`profit_center_id` int(10) unsigned DEFAULT NULL,
`supplier_id` int(10) unsigned NOT NULL,
`contactName` varchar(255) DEFAULT NULL,
`note` text DEFAULT NULL,
`orderType` enum('daily','weekly') NOT NULL DEFAULT 'daily',
`parent_id` bigint(20) DEFAULT NULL,
`orderFlag` set('modifier','modified','storno') DEFAULT NULL,
`rel_id` bigint(20) DEFAULT NULL,
`archive_id` bigint(20) DEFAULT NULL,
`deliveryDate` date DEFAULT NULL,
`deliveryAddressId` int(10) unsigned DEFAULT NULL,
`deliveryAddressName` varchar(255) DEFAULT NULL,
`deliveryAddress` varchar(255) DEFAULT NULL,
`customNotificationEmail` varchar(255) DEFAULT NULL,
`productSelected` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`productSelected`)),
`productComment` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`productComment`)),
`feedBackId` char(36) DEFAULT NULL,
`orderStatus` enum('supplierSelect','parameter','productSelect','invoice','send','sent','confirmed','archived') NOT NULL DEFAULT 'supplierSelect',
`sentTime` datetime DEFAULT NULL,
`confirmed` datetime DEFAULT NULL,
`supplierOrderNumber` int(10) unsigned DEFAULT NULL,
`humanId` varchar(255) DEFAULT NULL,
`sumPrice` float NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `password_reset_tokens`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `password_reset_tokens` (
`email` varchar(255) NOT NULL,
`token` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `password_resets`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `password_resets` (
`email` varchar(255) NOT NULL,
`token` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
KEY `password_resets_email_index` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `permission_role`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `permission_role` (
`permission_id` bigint(20) unsigned NOT NULL,
`role_id` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`permission_id`,`role_id`),
KEY `permission_role_role_id_foreign` (`role_id`),
CONSTRAINT `permission_role_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `permission_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `permission_user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `permission_user` (
`permission_id` bigint(20) unsigned NOT NULL,
`user_id` bigint(20) unsigned NOT NULL,
`user_type` varchar(255) NOT NULL,
PRIMARY KEY (`user_id`,`permission_id`,`user_type`),
KEY `permission_user_permission_id_foreign` (`permission_id`),
CONSTRAINT `permission_user_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `permissions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `permissions` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`display_name` varchar(255) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `permissions_name_unique` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `personal_access_tokens`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `personal_access_tokens` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`tokenable_type` varchar(255) NOT NULL,
`tokenable_id` bigint(20) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`token` varchar(64) NOT NULL,
`abilities` text DEFAULT NULL,
`last_used_at` timestamp NULL DEFAULT NULL,
`expires_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `price_list_prices`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `price_list_prices` (
`price_list_id` bigint(20) unsigned NOT NULL,
`product_id` bigint(20) unsigned NOT NULL,
`price` double NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
KEY `price_list_prices_price_list_id_foreign` (`price_list_id`),
KEY `price_list_prices_product_id_foreign` (`product_id`),
CONSTRAINT `price_list_prices_price_list_id_foreign` FOREIGN KEY (`price_list_id`) REFERENCES `price_lists` (`id`) ON DELETE CASCADE,
CONSTRAINT `price_list_prices_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `price_lists`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `price_lists` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`supplier_id` int(11) NOT NULL,
`note` text DEFAULT NULL,
`available` date NOT NULL,
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
`canSee` tinyint(1) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `pricelist_file_lines`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `pricelist_file_lines` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`pricelist_file_id` bigint(20) unsigned NOT NULL,
`row_number` int(11) NOT NULL,
`status` enum('ok','warning','error','new_product','updated') NOT NULL,
`payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`payload`)),
`validation_messages` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`validation_messages`)),
`diff` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`diff`)),
`applied_snapshot` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`applied_snapshot`)),
`executed_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
`product_id` bigint(20) unsigned DEFAULT NULL,
`product_group_id` bigint(20) unsigned DEFAULT NULL,
`producer_id` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `pricelist_file_lines_pricelist_file_id_status_index` (`pricelist_file_id`,`status`),
KEY `pricelist_file_lines_status_index` (`status`),
KEY `pricelist_file_lines_product_id_foreign` (`product_id`),
KEY `pricelist_file_lines_product_group_id_foreign` (`product_group_id`),
KEY `pricelist_file_lines_producer_id_foreign` (`producer_id`),
CONSTRAINT `pricelist_file_lines_pricelist_file_id_foreign` FOREIGN KEY (`pricelist_file_id`) REFERENCES `pricelist_files` (`id`) ON DELETE CASCADE,
CONSTRAINT `pricelist_file_lines_producer_id_foreign` FOREIGN KEY (`producer_id`) REFERENCES `producers` (`id`) ON DELETE SET NULL,
CONSTRAINT `pricelist_file_lines_product_group_id_foreign` FOREIGN KEY (`product_group_id`) REFERENCES `product_groups` (`id`) ON DELETE SET NULL,
CONSTRAINT `pricelist_file_lines_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `pricelist_files`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `pricelist_files` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`filename` varchar(255) NOT NULL,
`supplier_id` bigint(20) unsigned DEFAULT NULL,
`price_list_id` bigint(20) unsigned DEFAULT NULL,
`available_date` date DEFAULT NULL,
`note` text DEFAULT NULL,
`file_size` int(11) DEFAULT NULL,
`status` enum('todo','inprogress','fail','done','waiting_for_approval','closed','execution_failed') NOT NULL DEFAULT 'todo',
`processing_current_step` varchar(255) DEFAULT NULL,
`processing_current_step_percentage` int(11) DEFAULT NULL,
`workflow_steps` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`workflow_steps`)),
`file_meta` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`file_meta`)),
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `pricelist_files_supplier_id_foreign` (`supplier_id`),
KEY `pricelist_files_price_list_id_foreign` (`price_list_id`),
CONSTRAINT `pricelist_files_price_list_id_foreign` FOREIGN KEY (`price_list_id`) REFERENCES `price_lists` (`id`) ON DELETE SET NULL,
CONSTRAINT `pricelist_files_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `producers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `producers` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`note` text DEFAULT NULL,
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
`canSee` tinyint(1) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`id`),
KEY `producers_name_index` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `product_groups`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `product_groups` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`type` enum('F','N','X') DEFAULT NULL,
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
`canSee` tinyint(1) NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`_lft` int(10) unsigned NOT NULL DEFAULT 0,
`_rgt` int(10) unsigned NOT NULL DEFAULT 0,
`parent_id` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `product_groups__lft__rgt_parent_id_index` (`_lft`,`_rgt`,`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `products`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `products` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`supplier_id` int(11) DEFAULT NULL,
`producer_id` int(11) DEFAULT NULL,
`packing` int(11) DEFAULT NULL,
`unitValue` double NOT NULL,
`productUnit` enum('g','ml','tálca','csom','dob','kart','rúd','pár','zsák','kg','l','db') DEFAULT NULL,
`sellerUnit` enum('g','ml','tálca','csom','dob','kart','rúd','pár','zsák','kg','l','db') DEFAULT NULL,
`unitMultiplier` double DEFAULT NULL,
`amountUnit` enum('g','ml','tálca','csom','dob','kart','rúd','pár','zsák','kg','l','db') DEFAULT NULL,
`vat` double DEFAULT NULL,
`supplierProductNumber` varchar(255) DEFAULT NULL,
`product_group_id` int(11) DEFAULT NULL,
`hooreycaId` varchar(255) DEFAULT NULL,
`HooreycaUnit` varchar(255) DEFAULT NULL,
`HooreycaMultiplier` double DEFAULT NULL,
`buyerProductName` varchar(255) DEFAULT NULL,
`buyerProductNumber` varchar(255) DEFAULT NULL,
`note` text NOT NULL,
`type` enum('F','N','X') DEFAULT NULL,
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
`stock_status` varchar(255) NOT NULL DEFAULT 'in_stock',
`canSee` tinyint(1) NOT NULL DEFAULT 1,
`krel` tinyint(1) NOT NULL DEFAULT 0,
`specialOffer` tinyint(1) NOT NULL DEFAULT 0,
`weightScale` tinyint(1) NOT NULL DEFAULT 0,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `profit_center_favorites`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `profit_center_favorites` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`profit_center_id` bigint(20) unsigned NOT NULL,
`product_id` bigint(20) unsigned NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `profit_center_favorites_profit_center_id_foreign` (`profit_center_id`),
KEY `profit_center_favorites_product_id_foreign` (`product_id`),
CONSTRAINT `profit_center_favorites_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
CONSTRAINT `profit_center_favorites_profit_center_id_foreign` FOREIGN KEY (`profit_center_id`) REFERENCES `profit_centers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `profit_center_supplier`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `profit_center_supplier` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`profit_center_id` bigint(20) unsigned NOT NULL,
`supplier_id` bigint(20) unsigned NOT NULL,
`excludeProductGroupId` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`excludeProductGroupId`)),
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `profit_center_supplier_profit_center_id_foreign` (`profit_center_id`),
KEY `profit_center_supplier_supplier_id_foreign` (`supplier_id`),
CONSTRAINT `profit_center_supplier_profit_center_id_foreign` FOREIGN KEY (`profit_center_id`) REFERENCES `profit_centers` (`id`) ON DELETE NO ACTION,
CONSTRAINT `profit_center_supplier_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `profit_center_supplier_codes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `profit_center_supplier_codes` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`profit_center_id` bigint(20) unsigned NOT NULL,
`supplier_id` bigint(20) unsigned NOT NULL,
`customerCode` varchar(255) DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `profit_center_supplier_codes_profit_center_id_supplier_id_unique` (`profit_center_id`,`supplier_id`),
KEY `profit_center_supplier_codes_supplier_id_foreign` (`supplier_id`),
CONSTRAINT `profit_center_supplier_codes_profit_center_id_foreign` FOREIGN KEY (`profit_center_id`) REFERENCES `profit_centers` (`id`) ON DELETE CASCADE,
CONSTRAINT `profit_center_supplier_codes_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `profit_center_supplier_schedules`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `profit_center_supplier_schedules` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`profit_center_id` bigint(20) unsigned NOT NULL,
`supplier_id` bigint(20) unsigned NOT NULL,
`delivery_schedule_id` bigint(20) unsigned NOT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `profit_center_supplier_schedules_profit_center_id_foreign` (`profit_center_id`),
KEY `profit_center_supplier_schedules_supplier_id_foreign` (`supplier_id`),
KEY `profit_center_supplier_schedules_delivery_schedule_id_foreign` (`delivery_schedule_id`),
CONSTRAINT `profit_center_supplier_schedules_delivery_schedule_id_foreign` FOREIGN KEY (`delivery_schedule_id`) REFERENCES `delivery_schedules` (`id`) ON DELETE CASCADE,
CONSTRAINT `profit_center_supplier_schedules_profit_center_id_foreign` FOREIGN KEY (`profit_center_id`) REFERENCES `profit_centers` (`id`) ON DELETE CASCADE,
CONSTRAINT `profit_center_supplier_schedules_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `profit_center_users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `profit_center_users` (
`profit_center_id` bigint(20) unsigned NOT NULL,
`user_id` bigint(20) unsigned NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
KEY `profit_center_users_profit_center_id_foreign` (`profit_center_id`),
KEY `profit_center_users_user_id_foreign` (`user_id`),
CONSTRAINT `profit_center_users_profit_center_id_foreign` FOREIGN KEY (`profit_center_id`) REFERENCES `profit_centers` (`id`) ON DELETE NO ACTION,
CONSTRAINT `profit_center_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `profit_centers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `profit_centers` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`hooreycaId` varchar(255) NOT NULL,
`nameId` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`postCode` varchar(255) DEFAULT NULL,
`city` varchar(255) DEFAULT NULL,
`street` varchar(255) DEFAULT NULL,
`phone` varchar(255) DEFAULT NULL,
`mobil` varchar(255) DEFAULT NULL,
`addressEqual` varchar(255) NOT NULL DEFAULT '1',
`multiAddress` varchar(255) NOT NULL DEFAULT '0',
`note` text NOT NULL,
`canSee` tinyint(1) NOT NULL DEFAULT 1,
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `role_user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `role_user` (
`role_id` bigint(20) unsigned NOT NULL,
`user_id` bigint(20) unsigned NOT NULL,
`user_type` varchar(255) NOT NULL,
PRIMARY KEY (`user_id`,`role_id`,`user_type`),
KEY `role_user_role_id_foreign` (`role_id`),
CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `roles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `roles` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`display_name` varchar(255) DEFAULT NULL,
`description` varchar(255) DEFAULT 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;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `services`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `services` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `services_name_unique` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `sessions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `sessions` (
`id` varchar(255) NOT NULL,
`user_id` bigint(20) unsigned DEFAULT NULL,
`ip_address` varchar(45) DEFAULT NULL,
`user_agent` text DEFAULT NULL,
`payload` text NOT NULL,
`last_activity` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `sessions_user_id_index` (`user_id`),
KEY `sessions_last_activity_index` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `supplier_notifiers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_notifiers` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`order_archive_id` bigint(20) unsigned NOT NULL,
`supplier_id` bigint(20) unsigned NOT NULL,
`need_send` datetime NOT NULL,
`sent` datetime DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `supplier_notifiers_order_archive_id_foreign` (`order_archive_id`),
KEY `supplier_notifiers_supplier_id_foreign` (`supplier_id`),
KEY `supplier_notifiers_need_send_index` (`need_send`),
KEY `supplier_notifiers_sent_index` (`sent`),
CONSTRAINT `supplier_notifiers_order_archive_id_foreign` FOREIGN KEY (`order_archive_id`) REFERENCES `order_archives` (`id`) ON DELETE NO ACTION,
CONSTRAINT `supplier_notifiers_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `supplier_product_group`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_product_group` (
`supplier_id` bigint(20) unsigned NOT NULL,
`product_group_id` bigint(20) unsigned NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
KEY `supplier_product_group_supplier_id_foreign` (`supplier_id`),
KEY `supplier_product_group_product_group_id_foreign` (`product_group_id`),
CONSTRAINT `supplier_product_group_product_group_id_foreign` FOREIGN KEY (`product_group_id`) REFERENCES `product_groups` (`id`) ON DELETE CASCADE,
CONSTRAINT `supplier_product_group_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `supplier_services`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `supplier_services` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`supplier_id` bigint(20) unsigned NOT NULL,
`service_id` bigint(20) unsigned NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `supplier_services_supplier_id_foreign` (`supplier_id`),
KEY `supplier_services_service_id_foreign` (`service_id`),
CONSTRAINT `supplier_services_service_id_foreign` FOREIGN KEY (`service_id`) REFERENCES `services` (`id`) ON DELETE NO ACTION,
CONSTRAINT `supplier_services_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `suppliers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `suppliers` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`hooreycaId` varchar(255) DEFAULT NULL,
`nameId` varchar(255) DEFAULT NULL,
`orderEmail` varchar(255) DEFAULT NULL,
`orderEmail2` varchar(255) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`mailingAddress` varchar(255) DEFAULT NULL,
`phone` varchar(255) DEFAULT NULL,
`fax` varchar(255) DEFAULT NULL,
`customerServicePhone` varchar(255) DEFAULT NULL,
`note` text NOT NULL,
`emailAttachmentType` enum('pdf','excel','none') NOT NULL DEFAULT 'none',
`logoFile` varchar(255) DEFAULT NULL,
`openHours` text DEFAULT NULL,
`ordersDeadline` text DEFAULT NULL,
`minOrderValue` text DEFAULT NULL,
`canSee` tinyint(1) NOT NULL DEFAULT 1,
`canSeeInOrder` tinyint(1) NOT NULL DEFAULT 1,
`hasDeliveryConstraint` tinyint(1) NOT NULL DEFAULT 0,
`orderCutOffTime` tinyint(4) NOT NULL DEFAULT 12,
`deliveryLeadTime` smallint(5) unsigned NOT NULL DEFAULT 48,
`hasCustomerCode` tinyint(1) NOT NULL DEFAULT 0,
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `system_parameters`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `system_parameters` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`name_display` varchar(255) NOT NULL,
`data_type` varchar(255) NOT NULL,
`canSee` tinyint(1) NOT NULL DEFAULT 1,
`note` varchar(255) DEFAULT NULL,
`stored_data` text NOT NULL,
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `tests`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `tests` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`parent_id` bigint(20) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL,
`updated_by` int(10) unsigned DEFAULT NULL,
`deleted_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`supplier_id` bigint(20) unsigned DEFAULT NULL,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(255) NOT NULL,
`remember_token` varchar(100) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`),
KEY `users_supplier_id_foreign` (`supplier_id`),
CONSTRAINT `users_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `work_calendars`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `work_calendars` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`date` date NOT NULL,
`type` enum('holiday','working_day') NOT NULL,
`data_source` enum('api','manual') NOT NULL DEFAULT 'manual',
`description` text DEFAULT NULL,
`created_by` bigint(20) unsigned DEFAULT NULL,
`updated_by` bigint(20) unsigned DEFAULT NULL,
`deleted_by` bigint(20) unsigned DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `work_calendars_date_unique` (`date`),
KEY `work_calendars_date_index` (`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*M!100616 SET NOTE_VERBOSITY=@OLD_NOTE_VERBOSITY */;
/*M!999999\- enable the sandbox mode */
set autocommit=0;
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1,'2014_10_12_000000_create_users_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (2,'2014_10_12_100000_create_password_reset_tokens_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (3,'2014_10_12_100000_create_password_resets_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (4,'2019_08_19_000000_create_failed_jobs_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (5,'2019_12_14_000001_create_personal_access_tokens_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (6,'2021_04_06_100750_create_products_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (7,'2021_04_06_101015_create_product_groups_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (8,'2021_05_05_141334_create_orders_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (9,'2021_05_17_092917_create_suppliers_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (10,'2021_05_25_165917_create_contacts_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (11,'2021_06_23_100149_create_price_lists_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (12,'2021_07_19_065008_create_producers_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (13,'2021_07_29_121054_create_price_list_price',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (14,'2021_08_02_075611_create_audits_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (15,'2021_10_15_180023_create_attachments_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (16,'2021_10_22_121054_create_supplier_product_group',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (17,'2021_10_29_045551_create_order_numbers_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (18,'2021_10_31_085743_add_confirmed_time_to_orders',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (19,'2021_11_08_175100_add_parameterFields_to_orders',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (20,'2021_11_10_070207_create_profit_centers_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (21,'2021_11_22_161100_add_parameterFields_to_ProfitCenter',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (22,'2021_11_26_053327_create_addresses_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (23,'2021_11_28_094809_laratrust_setup_tables',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (24,'2021_11_30_181255_create_profit_center_users',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (25,'2021_12_06_044820_create_order_archives_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (26,'2021_12_06_051438_create_order_archives_items_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (27,'2021_12_09_071814_create_profit_center_suppliers_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (28,'2021_12_21_085950_change_note_to_text_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (29,'2021_12_21_090255_change_note_to_text_products_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (30,'2022_01_26_144810_alter_table_products_change_unit_value',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (31,'2022_01_26_145301_alter_table_order_archives_items_change_unit_value',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (32,'2022_03_06_183718_add_product_comment_to_order_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (33,'2022_03_06_183948_add_product_comment_to_order_archive_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (34,'2022_03_06_184132_add_product_comment_to_order_archives_items_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (35,'2022_03_23_054908_create_profit_center_favorites_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (36,'2022_03_31_060015_change_note_to_text_supplier_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (37,'2022_03_31_084931_add_note_to_price_list_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (38,'2022_04_06_185438_change_order_sum_to_bigger_float_order_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (39,'2022_04_06_185733_change_order_sum_to_bigger_float_order_archive_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (40,'2022_05_10_095803_change_order_add_delivery_address_name_order_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (41,'2022_05_10_100303_change_order_add_delivery_address_name_order_archive_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (42,'2022_05_26_095237_create_system_parameters_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (43,'2022_06_16_160516_change_product_seller_uint_to_new_items_product_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (44,'2022_06_16_160959_change_product_seller_uint_to_new_items_order_archive_items_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (45,'2023_01_28_105430_change_order_add_custom_notification_email_order_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (46,'2023_01_28_111049_change_order_archive_add_custom_notification_email_order_archive_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (47,'2023_02_17_154501_add_api_fields_to_order_archives_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (48,'2023_03_20_094108_alter_table_orders_change_order_type',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (49,'2023_03_24_075952_create_table_tests',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (50,'2023_03_27_082804_add_parent_id_fields_to_order_archives_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (51,'2023_03_27_083102_add_parent_id_fields_to_orders_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (52,'2023_04_24_195258_add_modier_fields_to_orders_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (53,'2023_04_25_063313_add_modifier_fields_to_order_archives_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (54,'2023_09_03_062731_add_softdelete_fields_to_system_parameters_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (55,'2023_09_07_071418_add_krel_fields_to_products_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (56,'2023_09_07_071717_add_krel_to_order_archives_items_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (57,'2023_09_10_090802_add_fields_p_m75_to_suppliers_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (58,'2023_09_14_070521_add_fields_p_m75_order_see_to_suppliers_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (59,'2023_09_21_053850_create_supplier_notifier_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (60,'2023_10_04_125603_add_fields_p_m139_hooreyca_to_product_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (61,'2023_10_04_152249_add_fields_p_m139_hooreyca_to_order_archives_item_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (62,'2023_10_15_113109_add_fields_p_m125attach_type_to_attachments_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (63,'2023_10_17_070426_add_fields_p_m153_type_to_contacts_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (64,'2024_07_31_161548_alter_table_suppliers__p_m179_change_null_fields',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (65,'2024_07_31_173139_create_table_pm179_services',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (66,'2024_07_31_183829_create_table_supplier_services_pm179',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (67,'2025_03_01_111538_add_special_offer_fields_to_products_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (68,'2025_03_01_111538_add_special_offer_to_order_archives_items_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (69,'2025_07_24_142415_create_sessions_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (70,'2025_07_24_142624_create_cache_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (71,'2026_01_24_000000_add_expires_at_to_personal_access_tokens_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (72,'2026_01_24_000000_rename_password_resets_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (73,'2026_03_02_065700_create_pricelist_files_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (74,'2026_03_02_072000_add_fields_to_pricelist_files_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (75,'2026_03_02_073000_add_processing_fields_to_pricelist_files_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (76,'2026_03_02_073505_add_relations_to_pricelist_files_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (77,'2026_03_02_091110_add_available_and_note_to_pricelist_files_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (78,'2026_03_02_135934_add_workflow_steps_to_pricelist_files_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (79,'2026_03_06_175613_fix_pricelist_files_status_enum',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (80,'2026_03_07_072716_add_file_meta_to_pricelist_files_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (81,'2026_03_08_222836_create_pricelist_file_lines_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (82,'2026_03_08_223838_add_audit_fields_to_pricelist_file_lines_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (83,'2026_03_09_212047_add_relation_ids_to_pricelist_file_lines_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (84,'2026_03_11_153652_update_enums_in_pricelist_tables',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (85,'2026_04_08_184130_create_work_calendars_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (86,'2026_04_08_223732_create_delivery_schedules_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (87,'2026_04_08_223733_create_profit_center_supplier_schedules_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (88,'2026_04_08_223735_create_delivery_calendar_overrides_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (89,'2026_04_20_162446_add_scope_to_delivery_calendar_overrides_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (90,'2026_04_20_171028_change_region_to_delivery_schedule_id_in_delivery_calendar_overrides',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (91,'2026_04_24_184012_add_delivery_constraint_to_suppliers_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (92,'2026_04_25_163803_add_supplier_id_to_users_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (93,'2026_04_25_164154_add_stock_status_to_products_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (94,'2026_05_05_070449_add_stock_status_to_order_archives_items_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (95,'2026_07_20_171642_restore_missing_id_auto_increment',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (96,'2026_08_08_152549_create_features_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (97,'2026_08_08_153000_create_feature_flags_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (98,'2026_08_08_154500_create_feature_flag_overrides_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (99,'2026_08_09_090000_add_customer_code_to_suppliers_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (100,'2026_08_09_091500_create_profit_center_supplier_codes_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (101,'2026_08_10_090000_add_execution_failed_to_pricelist_files_status_enum',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (102,'2026_08_10_090100_add_execution_fields_to_pricelist_file_lines_table',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (103,'2026_08_16_090000_create_deployment_packages_table',1);
commit;