ADD EV3-465 méter ("m") mértékegység a Legkisebb eladási egységhez és a Mennyiségi egységhez
Bunzl árlistájához szükséges egy eddig hiányzó mértékegység. A "Legkisebb eladási egység" / "Mennyiségi egység" mezőt két párhuzamos árlista-import validálja külön-külön (a régi PriceListService.php ProductUnitEnum-mal, az új PricelistFileProcessService.php saját PricelistSellerUnitEnum-mal), mindkettő végül ugyanabba a products.sellerUnit / products.amountUnit DB enum oszlopba ír. A puszta enum-bővítés önmagában nem lett volna elég: a DB oszlop korlátozta volna a végrehajtást, csak ott, a legkésőbbi ponton bukva el. - ProductUnitEnum: új 'm' case (régi pipeline validációja + a DB oszlopokat generáló forrás). - PricelistSellerUnitEnum: új 'm' case (új pipeline validációja). - Migráció: products.sellerUnit/amountUnit és order_archives_items ugyanezen oszlopainak DB enum bővítése 'm'-mel, ProductUnitEnum::getKeys()-ből generálva, hogy a PHP enum és a DB oszlop ne csúszhasson el egymástól. A down() az 'm' értékű sorokat NULL-ra állítja visszagörgetéskor, különben a szűkített enum miatt az ALTER hibára futna. A "Mértékegység" (productUnit) oszlopot szándékosan nem bővítettem, a jegy csak a másik két mezőt említi. - schema:dump frissítve. 5 új teszt mindkét pipeline validációjára és a DB enum oszlopra. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
f376a820a2
commit
67d2f73eee
@ -15,6 +15,7 @@ enum PricelistSellerUnitEnum: string
|
|||||||
case liter = 'liter';
|
case liter = 'liter';
|
||||||
case pár = 'pár';
|
case pár = 'pár';
|
||||||
case tekercs = 'tekercs';
|
case tekercs = 'tekercs';
|
||||||
|
case m = 'm';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Visszaadja az összes értéket tömbként
|
* Visszaadja az összes értéket tömbként
|
||||||
|
|||||||
@ -24,4 +24,6 @@ class ProductUnitEnum extends BasicUnitEnum
|
|||||||
const pár = 'pár';
|
const pár = 'pár';
|
||||||
|
|
||||||
const zsák = 'zsák';
|
const zsák = 'zsák';
|
||||||
|
|
||||||
|
const m = 'm';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use App\Enums\ProductUnitEnum;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
private const TABLES = ['products', 'order_archives_items'];
|
||||||
|
|
||||||
|
private const COLUMNS = ['sellerUnit', 'amountUnit'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A `products`/`order_archives_items` sellerUnit és amountUnit valódi DB enum oszlopok
|
||||||
|
* (lásd 2022_06_16_160516_... és 2022_06_16_160959_...), ezért az új ProductUnitEnum::m
|
||||||
|
* case önmagában nem elég - az oszlopdefiníciókat is bővíteni kell (EV3-465, Bunzl miatt).
|
||||||
|
*
|
||||||
|
* A `productUnit` (Mértékegység) oszlopot szándékosan NEM bővítjük: a jegy csak a
|
||||||
|
* Legkisebb eladási egységet és a Mennyiségi egységet említi, azt más enum
|
||||||
|
* (BasicUnitEnum/PricelistUnitEnum) validálja importkor.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
$enumStr = $this->enumDefinition();
|
||||||
|
|
||||||
|
foreach (self::TABLES as $table) {
|
||||||
|
foreach (self::COLUMNS as $column) {
|
||||||
|
DB::statement("ALTER TABLE `{$table}` MODIFY COLUMN `{$column}` ENUM({$enumStr}) DEFAULT NULL");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Visszagörgetéskor az 'm' értékű sorokat előbb NULL-ra állítjuk, különben a szűkített
|
||||||
|
* enum miatt az ALTER hibára futna (vagy némán ürítené a mezőt).
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
$enumStr = $this->enumDefinition(withoutMeter: true);
|
||||||
|
|
||||||
|
foreach (self::TABLES as $table) {
|
||||||
|
foreach (self::COLUMNS as $column) {
|
||||||
|
DB::table($table)->where($column, 'm')->update([$column => null]);
|
||||||
|
DB::statement("ALTER TABLE `{$table}` MODIFY COLUMN `{$column}` ENUM({$enumStr}) DEFAULT NULL");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function enumDefinition(bool $withoutMeter = false): string
|
||||||
|
{
|
||||||
|
$keys = ProductUnitEnum::getKeys();
|
||||||
|
|
||||||
|
if ($withoutMeter) {
|
||||||
|
$keys = array_filter($keys, fn ($key) => $key !== ProductUnitEnum::m);
|
||||||
|
}
|
||||||
|
|
||||||
|
return implode(', ', array_map(fn ($key) => "'{$key}'", $keys));
|
||||||
|
}
|
||||||
|
};
|
||||||
@ -63,9 +63,9 @@ CREATE TABLE `audits` (
|
|||||||
`event` varchar(255) NOT NULL,
|
`event` varchar(255) NOT NULL,
|
||||||
`auditable_type` varchar(255) NOT NULL,
|
`auditable_type` varchar(255) NOT NULL,
|
||||||
`auditable_id` bigint(20) unsigned NOT NULL,
|
`auditable_id` bigint(20) unsigned NOT NULL,
|
||||||
`old_values` text DEFAULT NULL,
|
`old_values` mediumtext DEFAULT NULL,
|
||||||
`new_values` text DEFAULT NULL,
|
`new_values` mediumtext DEFAULT NULL,
|
||||||
`url` text DEFAULT NULL,
|
`url` mediumtext DEFAULT NULL,
|
||||||
`ip_address` varchar(45) DEFAULT NULL,
|
`ip_address` varchar(45) DEFAULT NULL,
|
||||||
`user_agent` varchar(1023) DEFAULT NULL,
|
`user_agent` varchar(1023) DEFAULT NULL,
|
||||||
`tags` varchar(255) DEFAULT NULL,
|
`tags` varchar(255) DEFAULT NULL,
|
||||||
@ -86,6 +86,17 @@ CREATE TABLE `cache` (
|
|||||||
UNIQUE KEY `cache_key_unique` (`key`)
|
UNIQUE KEY `cache_key_unique` (`key`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
DROP TABLE IF EXISTS `cache_locks`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `cache_locks` (
|
||||||
|
`key` varchar(255) NOT NULL,
|
||||||
|
`owner` varchar(255) NOT NULL,
|
||||||
|
`expiration` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`key`),
|
||||||
|
KEY `cache_locks_expiration_index` (`expiration`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
DROP TABLE IF EXISTS `contacts`;
|
DROP TABLE IF EXISTS `contacts`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!40101 SET character_set_client = utf8mb4 */;
|
/*!40101 SET character_set_client = utf8mb4 */;
|
||||||
@ -95,7 +106,7 @@ CREATE TABLE `contacts` (
|
|||||||
`phone` varchar(255) DEFAULT NULL,
|
`phone` varchar(255) DEFAULT NULL,
|
||||||
`email` varchar(255) DEFAULT NULL,
|
`email` varchar(255) DEFAULT NULL,
|
||||||
`type` set('orderMail','contactMember','customerService') DEFAULT NULL,
|
`type` set('orderMail','contactMember','customerService') DEFAULT NULL,
|
||||||
`note` text DEFAULT NULL,
|
`note` mediumtext DEFAULT NULL,
|
||||||
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
||||||
`canSee` tinyint(1) NOT NULL DEFAULT 1,
|
`canSee` tinyint(1) NOT NULL DEFAULT 1,
|
||||||
`contactable_id` int(10) unsigned DEFAULT NULL,
|
`contactable_id` int(10) unsigned DEFAULT NULL,
|
||||||
@ -194,8 +205,8 @@ DROP TABLE IF EXISTS `failed_jobs`;
|
|||||||
CREATE TABLE `failed_jobs` (
|
CREATE TABLE `failed_jobs` (
|
||||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`uuid` varchar(255) NOT NULL,
|
`uuid` varchar(255) NOT NULL,
|
||||||
`connection` text NOT NULL,
|
`connection` mediumtext NOT NULL,
|
||||||
`queue` text NOT NULL,
|
`queue` mediumtext NOT NULL,
|
||||||
`payload` longtext NOT NULL,
|
`payload` longtext NOT NULL,
|
||||||
`exception` longtext NOT NULL,
|
`exception` longtext NOT NULL,
|
||||||
`failed_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
`failed_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||||
@ -257,6 +268,38 @@ CREATE TABLE `features` (
|
|||||||
UNIQUE KEY `features_name_scope_unique` (`name`,`scope`)
|
UNIQUE KEY `features_name_scope_unique` (`name`,`scope`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
DROP TABLE IF EXISTS `job_batches`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `job_batches` (
|
||||||
|
`id` varchar(255) NOT NULL,
|
||||||
|
`name` varchar(255) NOT NULL,
|
||||||
|
`total_jobs` int(11) NOT NULL,
|
||||||
|
`pending_jobs` int(11) NOT NULL,
|
||||||
|
`failed_jobs` int(11) NOT NULL,
|
||||||
|
`failed_job_ids` longtext NOT NULL,
|
||||||
|
`options` mediumtext DEFAULT NULL,
|
||||||
|
`cancelled_at` int(11) DEFAULT NULL,
|
||||||
|
`created_at` int(11) NOT NULL,
|
||||||
|
`finished_at` 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 `jobs`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8mb4 */;
|
||||||
|
CREATE TABLE `jobs` (
|
||||||
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`queue` varchar(255) NOT NULL,
|
||||||
|
`payload` longtext NOT NULL,
|
||||||
|
`attempts` tinyint(3) unsigned NOT NULL,
|
||||||
|
`reserved_at` int(10) unsigned DEFAULT NULL,
|
||||||
|
`available_at` int(10) unsigned NOT NULL,
|
||||||
|
`created_at` int(10) unsigned NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `jobs_queue_index` (`queue`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
DROP TABLE IF EXISTS `migrations`;
|
DROP TABLE IF EXISTS `migrations`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!40101 SET character_set_client = utf8mb4 */;
|
/*!40101 SET character_set_client = utf8mb4 */;
|
||||||
@ -275,7 +318,7 @@ CREATE TABLE `order_archives` (
|
|||||||
`profit_center_id` int(10) unsigned DEFAULT NULL,
|
`profit_center_id` int(10) unsigned DEFAULT NULL,
|
||||||
`supplier_id` int(10) unsigned NOT NULL,
|
`supplier_id` int(10) unsigned NOT NULL,
|
||||||
`contactName` varchar(255) DEFAULT NULL,
|
`contactName` varchar(255) DEFAULT NULL,
|
||||||
`note` text DEFAULT NULL,
|
`note` mediumtext DEFAULT NULL,
|
||||||
`orderType` enum('daily','weekly') NOT NULL DEFAULT 'daily',
|
`orderType` enum('daily','weekly') NOT NULL DEFAULT 'daily',
|
||||||
`parent_id` bigint(20) DEFAULT NULL,
|
`parent_id` bigint(20) DEFAULT NULL,
|
||||||
`orderFlag` set('modifier','modified','storno') DEFAULT NULL,
|
`orderFlag` set('modifier','modified','storno') DEFAULT NULL,
|
||||||
@ -294,7 +337,7 @@ CREATE TABLE `order_archives` (
|
|||||||
`confirmed` datetime DEFAULT NULL,
|
`confirmed` datetime DEFAULT NULL,
|
||||||
`supplierOrderNumber` int(10) unsigned DEFAULT NULL,
|
`supplierOrderNumber` int(10) unsigned DEFAULT NULL,
|
||||||
`humanId` varchar(255) DEFAULT NULL,
|
`humanId` varchar(255) DEFAULT NULL,
|
||||||
`sumPrice` float NOT NULL,
|
`sumPrice` double DEFAULT NULL,
|
||||||
`APILastGetting` datetime DEFAULT NULL,
|
`APILastGetting` datetime DEFAULT NULL,
|
||||||
`APICallBackId` char(36) DEFAULT NULL,
|
`APICallBackId` char(36) DEFAULT NULL,
|
||||||
`APIConfirmed` datetime DEFAULT NULL,
|
`APIConfirmed` datetime DEFAULT NULL,
|
||||||
@ -326,11 +369,11 @@ CREATE TABLE `order_archives_items` (
|
|||||||
`supplier_id` int(11) DEFAULT NULL,
|
`supplier_id` int(11) DEFAULT NULL,
|
||||||
`producer_id` int(11) DEFAULT NULL,
|
`producer_id` int(11) DEFAULT NULL,
|
||||||
`packing` int(11) DEFAULT NULL,
|
`packing` int(11) DEFAULT NULL,
|
||||||
`unitValue` double NOT NULL,
|
`unitValue` double DEFAULT NULL,
|
||||||
`productUnit` enum('g','ml','tálca','csom','dob','kart','rúd','pár','zsák','kg','l','db') DEFAULT NULL,
|
`productUnit` enum('g','kg','ml','l','db','tálca','csom','dob','kart','rúd','pár','zsák') DEFAULT NULL,
|
||||||
`sellerUnit` 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','m','kg','l','db') DEFAULT NULL,
|
||||||
`unitMultiplier` double 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,
|
`amountUnit` enum('g','ml','tálca','csom','dob','kart','rúd','pár','zsák','m','kg','l','db') DEFAULT NULL,
|
||||||
`vat` double DEFAULT NULL,
|
`vat` double DEFAULT NULL,
|
||||||
`supplierProductNumber` varchar(255) DEFAULT NULL,
|
`supplierProductNumber` varchar(255) DEFAULT NULL,
|
||||||
`product_group_id` int(11) DEFAULT NULL,
|
`product_group_id` int(11) DEFAULT NULL,
|
||||||
@ -339,7 +382,7 @@ CREATE TABLE `order_archives_items` (
|
|||||||
`HooreycaMultiplier` double DEFAULT NULL,
|
`HooreycaMultiplier` double DEFAULT NULL,
|
||||||
`buyerProductName` varchar(255) DEFAULT NULL,
|
`buyerProductName` varchar(255) DEFAULT NULL,
|
||||||
`buyerProductNumber` varchar(255) DEFAULT NULL,
|
`buyerProductNumber` varchar(255) DEFAULT NULL,
|
||||||
`note` text DEFAULT NULL,
|
`note` varchar(255) DEFAULT NULL,
|
||||||
`type` enum('F','N','X') DEFAULT NULL,
|
`type` enum('F','N','X') DEFAULT NULL,
|
||||||
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
||||||
`stock_status` varchar(255) NOT NULL DEFAULT 'in_stock',
|
`stock_status` varchar(255) NOT NULL DEFAULT 'in_stock',
|
||||||
@ -355,9 +398,9 @@ CREATE TABLE `order_archives_items` (
|
|||||||
`producer_name` varchar(255) DEFAULT NULL,
|
`producer_name` varchar(255) DEFAULT NULL,
|
||||||
`product_group_name` varchar(255) DEFAULT NULL,
|
`product_group_name` varchar(255) DEFAULT NULL,
|
||||||
`product_group_path` varchar(255) DEFAULT NULL,
|
`product_group_path` varchar(255) DEFAULT NULL,
|
||||||
`quantity` double DEFAULT NULL,
|
`quantity` double(8,2) DEFAULT NULL,
|
||||||
`price` double DEFAULT NULL,
|
`price` double(8,2) DEFAULT NULL,
|
||||||
`amount` double DEFAULT NULL,
|
`amount` double(10,2) DEFAULT NULL,
|
||||||
`comment` text DEFAULT NULL,
|
`comment` text DEFAULT NULL,
|
||||||
`krel` tinyint(1) NOT NULL DEFAULT 0,
|
`krel` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
`specialOffer` tinyint(1) NOT NULL DEFAULT 0,
|
`specialOffer` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
@ -370,14 +413,16 @@ DROP TABLE IF EXISTS `order_numbers`;
|
|||||||
/*!40101 SET character_set_client = utf8mb4 */;
|
/*!40101 SET character_set_client = utf8mb4 */;
|
||||||
CREATE TABLE `order_numbers` (
|
CREATE TABLE `order_numbers` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`supplier_order_number` int(10) unsigned NOT NULL,
|
||||||
`year` tinyint(3) unsigned NOT NULL,
|
`year` tinyint(3) unsigned NOT NULL,
|
||||||
`supplier_id` int(10) unsigned NOT NULL,
|
`supplier_id` int(10) unsigned NOT NULL,
|
||||||
`order_id` int(10) unsigned DEFAULT NULL,
|
`order_id` int(10) unsigned DEFAULT NULL,
|
||||||
`created_at` timestamp NULL DEFAULT NULL,
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
`updated_at` timestamp NULL DEFAULT NULL,
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
PRIMARY KEY (`supplier_id`,`year`,`id`),
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE KEY `unique_supplier_order_number_year_supplier_id` (`supplier_order_number`,`year`,`supplier_id`),
|
||||||
UNIQUE KEY `order_numbers_order_id_unique` (`order_id`)
|
UNIQUE KEY `order_numbers_order_id_unique` (`order_id`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
DROP TABLE IF EXISTS `orders`;
|
DROP TABLE IF EXISTS `orders`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
@ -387,7 +432,7 @@ CREATE TABLE `orders` (
|
|||||||
`profit_center_id` int(10) unsigned DEFAULT NULL,
|
`profit_center_id` int(10) unsigned DEFAULT NULL,
|
||||||
`supplier_id` int(10) unsigned NOT NULL,
|
`supplier_id` int(10) unsigned NOT NULL,
|
||||||
`contactName` varchar(255) DEFAULT NULL,
|
`contactName` varchar(255) DEFAULT NULL,
|
||||||
`note` text DEFAULT NULL,
|
`note` mediumtext DEFAULT NULL,
|
||||||
`orderType` enum('daily','weekly') NOT NULL DEFAULT 'daily',
|
`orderType` enum('daily','weekly') NOT NULL DEFAULT 'daily',
|
||||||
`parent_id` bigint(20) DEFAULT NULL,
|
`parent_id` bigint(20) DEFAULT NULL,
|
||||||
`orderFlag` set('modifier','modified','storno') DEFAULT NULL,
|
`orderFlag` set('modifier','modified','storno') DEFAULT NULL,
|
||||||
@ -406,7 +451,7 @@ CREATE TABLE `orders` (
|
|||||||
`confirmed` datetime DEFAULT NULL,
|
`confirmed` datetime DEFAULT NULL,
|
||||||
`supplierOrderNumber` int(10) unsigned DEFAULT NULL,
|
`supplierOrderNumber` int(10) unsigned DEFAULT NULL,
|
||||||
`humanId` varchar(255) DEFAULT NULL,
|
`humanId` varchar(255) DEFAULT NULL,
|
||||||
`sumPrice` float NOT NULL,
|
`sumPrice` double DEFAULT NULL,
|
||||||
`created_at` timestamp NULL DEFAULT NULL,
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
`updated_at` timestamp NULL DEFAULT NULL,
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
`deleted_at` timestamp NULL DEFAULT NULL,
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
||||||
@ -514,8 +559,8 @@ DROP TABLE IF EXISTS `price_lists`;
|
|||||||
CREATE TABLE `price_lists` (
|
CREATE TABLE `price_lists` (
|
||||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`supplier_id` int(11) NOT NULL,
|
`supplier_id` int(11) NOT NULL,
|
||||||
`note` text DEFAULT NULL,
|
|
||||||
`available` date NOT NULL,
|
`available` date NOT NULL,
|
||||||
|
`note` varchar(255) DEFAULT NULL,
|
||||||
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
||||||
`canSee` tinyint(1) NOT NULL DEFAULT 1,
|
`canSee` tinyint(1) NOT NULL DEFAULT 1,
|
||||||
`created_at` timestamp NULL DEFAULT NULL,
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
@ -595,7 +640,7 @@ DROP TABLE IF EXISTS `producers`;
|
|||||||
CREATE TABLE `producers` (
|
CREATE TABLE `producers` (
|
||||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`name` varchar(255) DEFAULT NULL,
|
`name` varchar(255) DEFAULT NULL,
|
||||||
`note` text DEFAULT NULL,
|
`note` mediumtext DEFAULT NULL,
|
||||||
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
||||||
`canSee` tinyint(1) NOT NULL DEFAULT 1,
|
`canSee` tinyint(1) NOT NULL DEFAULT 1,
|
||||||
`created_at` timestamp NULL DEFAULT NULL,
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
@ -637,11 +682,11 @@ CREATE TABLE `products` (
|
|||||||
`supplier_id` int(11) DEFAULT NULL,
|
`supplier_id` int(11) DEFAULT NULL,
|
||||||
`producer_id` int(11) DEFAULT NULL,
|
`producer_id` int(11) DEFAULT NULL,
|
||||||
`packing` int(11) DEFAULT NULL,
|
`packing` int(11) DEFAULT NULL,
|
||||||
`unitValue` double NOT NULL,
|
`unitValue` double DEFAULT NULL,
|
||||||
`productUnit` enum('g','ml','tálca','csom','dob','kart','rúd','pár','zsák','kg','l','db') DEFAULT NULL,
|
`productUnit` enum('g','kg','ml','l','db','tálca','csom','dob','kart','rúd','pár','zsák') DEFAULT NULL,
|
||||||
`sellerUnit` 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','m','kg','l','db') DEFAULT NULL,
|
||||||
`unitMultiplier` double 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,
|
`amountUnit` enum('g','ml','tálca','csom','dob','kart','rúd','pár','zsák','m','kg','l','db') DEFAULT NULL,
|
||||||
`vat` double DEFAULT NULL,
|
`vat` double DEFAULT NULL,
|
||||||
`supplierProductNumber` varchar(255) DEFAULT NULL,
|
`supplierProductNumber` varchar(255) DEFAULT NULL,
|
||||||
`product_group_id` int(11) DEFAULT NULL,
|
`product_group_id` int(11) DEFAULT NULL,
|
||||||
@ -650,7 +695,7 @@ CREATE TABLE `products` (
|
|||||||
`HooreycaMultiplier` double DEFAULT NULL,
|
`HooreycaMultiplier` double DEFAULT NULL,
|
||||||
`buyerProductName` varchar(255) DEFAULT NULL,
|
`buyerProductName` varchar(255) DEFAULT NULL,
|
||||||
`buyerProductNumber` varchar(255) DEFAULT NULL,
|
`buyerProductNumber` varchar(255) DEFAULT NULL,
|
||||||
`note` text NOT NULL,
|
`note` text DEFAULT NULL,
|
||||||
`type` enum('F','N','X') DEFAULT NULL,
|
`type` enum('F','N','X') DEFAULT NULL,
|
||||||
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
||||||
`stock_status` varchar(255) NOT NULL DEFAULT 'in_stock',
|
`stock_status` varchar(255) NOT NULL DEFAULT 'in_stock',
|
||||||
@ -699,8 +744,8 @@ CREATE TABLE `profit_center_supplier` (
|
|||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `profit_center_supplier_profit_center_id_foreign` (`profit_center_id`),
|
KEY `profit_center_supplier_profit_center_id_foreign` (`profit_center_id`),
|
||||||
KEY `profit_center_supplier_supplier_id_foreign` (`supplier_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_profit_center_id_foreign` FOREIGN KEY (`profit_center_id`) REFERENCES `profit_centers` (`id`),
|
||||||
CONSTRAINT `profit_center_supplier_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE NO ACTION
|
CONSTRAINT `profit_center_supplier_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
DROP TABLE IF EXISTS `profit_center_supplier_codes`;
|
DROP TABLE IF EXISTS `profit_center_supplier_codes`;
|
||||||
@ -757,8 +802,8 @@ CREATE TABLE `profit_center_users` (
|
|||||||
`updated_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_profit_center_id_foreign` (`profit_center_id`),
|
||||||
KEY `profit_center_users_user_id_foreign` (`user_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_profit_center_id_foreign` FOREIGN KEY (`profit_center_id`) REFERENCES `profit_centers` (`id`),
|
||||||
CONSTRAINT `profit_center_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION
|
CONSTRAINT `profit_center_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
DROP TABLE IF EXISTS `profit_centers`;
|
DROP TABLE IF EXISTS `profit_centers`;
|
||||||
@ -777,8 +822,9 @@ CREATE TABLE `profit_centers` (
|
|||||||
`mobil` varchar(255) DEFAULT NULL,
|
`mobil` varchar(255) DEFAULT NULL,
|
||||||
`addressEqual` varchar(255) NOT NULL DEFAULT '1',
|
`addressEqual` varchar(255) NOT NULL DEFAULT '1',
|
||||||
`multiAddress` varchar(255) NOT NULL DEFAULT '0',
|
`multiAddress` varchar(255) NOT NULL DEFAULT '0',
|
||||||
`note` text NOT NULL,
|
`note` text DEFAULT NULL,
|
||||||
`canSee` tinyint(1) NOT NULL DEFAULT 1,
|
`canSee` tinyint(1) NOT NULL DEFAULT 1,
|
||||||
|
`hooreycaDataActive` tinyint(1) NOT NULL DEFAULT 1,
|
||||||
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
||||||
`created_at` timestamp NULL DEFAULT NULL,
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
`updated_at` timestamp NULL DEFAULT NULL,
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
@ -861,8 +907,8 @@ CREATE TABLE `supplier_notifiers` (
|
|||||||
KEY `supplier_notifiers_supplier_id_foreign` (`supplier_id`),
|
KEY `supplier_notifiers_supplier_id_foreign` (`supplier_id`),
|
||||||
KEY `supplier_notifiers_need_send_index` (`need_send`),
|
KEY `supplier_notifiers_need_send_index` (`need_send`),
|
||||||
KEY `supplier_notifiers_sent_index` (`sent`),
|
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_order_archive_id_foreign` FOREIGN KEY (`order_archive_id`) REFERENCES `order_archives` (`id`),
|
||||||
CONSTRAINT `supplier_notifiers_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE NO ACTION
|
CONSTRAINT `supplier_notifiers_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
DROP TABLE IF EXISTS `supplier_product_group`;
|
DROP TABLE IF EXISTS `supplier_product_group`;
|
||||||
@ -894,8 +940,8 @@ CREATE TABLE `supplier_services` (
|
|||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `supplier_services_supplier_id_foreign` (`supplier_id`),
|
KEY `supplier_services_supplier_id_foreign` (`supplier_id`),
|
||||||
KEY `supplier_services_service_id_foreign` (`service_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_service_id_foreign` FOREIGN KEY (`service_id`) REFERENCES `services` (`id`),
|
||||||
CONSTRAINT `supplier_services_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON DELETE NO ACTION
|
CONSTRAINT `supplier_services_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
DROP TABLE IF EXISTS `suppliers`;
|
DROP TABLE IF EXISTS `suppliers`;
|
||||||
@ -913,7 +959,7 @@ CREATE TABLE `suppliers` (
|
|||||||
`phone` varchar(255) DEFAULT NULL,
|
`phone` varchar(255) DEFAULT NULL,
|
||||||
`fax` varchar(255) DEFAULT NULL,
|
`fax` varchar(255) DEFAULT NULL,
|
||||||
`customerServicePhone` varchar(255) DEFAULT NULL,
|
`customerServicePhone` varchar(255) DEFAULT NULL,
|
||||||
`note` text NOT NULL,
|
`note` text DEFAULT NULL,
|
||||||
`emailAttachmentType` enum('pdf','excel','none') NOT NULL DEFAULT 'none',
|
`emailAttachmentType` enum('pdf','excel','none') NOT NULL DEFAULT 'none',
|
||||||
`logoFile` varchar(255) DEFAULT NULL,
|
`logoFile` varchar(255) DEFAULT NULL,
|
||||||
`openHours` text DEFAULT NULL,
|
`openHours` text DEFAULT NULL,
|
||||||
@ -925,6 +971,7 @@ CREATE TABLE `suppliers` (
|
|||||||
`orderCutOffTime` tinyint(4) NOT NULL DEFAULT 12,
|
`orderCutOffTime` tinyint(4) NOT NULL DEFAULT 12,
|
||||||
`deliveryLeadTime` smallint(5) unsigned NOT NULL DEFAULT 48,
|
`deliveryLeadTime` smallint(5) unsigned NOT NULL DEFAULT 48,
|
||||||
`hasCustomerCode` tinyint(1) NOT NULL DEFAULT 0,
|
`hasCustomerCode` tinyint(1) NOT NULL DEFAULT 0,
|
||||||
|
`hooreycaDataActive` tinyint(1) NOT NULL DEFAULT 1,
|
||||||
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
||||||
`created_at` timestamp NULL DEFAULT NULL,
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
`updated_at` timestamp NULL DEFAULT NULL,
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
@ -945,7 +992,7 @@ CREATE TABLE `system_parameters` (
|
|||||||
`data_type` varchar(255) NOT NULL,
|
`data_type` varchar(255) NOT NULL,
|
||||||
`canSee` tinyint(1) NOT NULL DEFAULT 1,
|
`canSee` tinyint(1) NOT NULL DEFAULT 1,
|
||||||
`note` varchar(255) DEFAULT NULL,
|
`note` varchar(255) DEFAULT NULL,
|
||||||
`stored_data` text NOT NULL,
|
`stored_data` text DEFAULT NULL,
|
||||||
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
`status` enum('draft','active','archive','deleted') NOT NULL DEFAULT 'draft',
|
||||||
`created_at` timestamp NULL DEFAULT NULL,
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
`updated_at` timestamp NULL DEFAULT NULL,
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
@ -984,6 +1031,9 @@ CREATE TABLE `users` (
|
|||||||
`remember_token` varchar(100) DEFAULT NULL,
|
`remember_token` varchar(100) DEFAULT NULL,
|
||||||
`created_at` timestamp NULL DEFAULT NULL,
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
`updated_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`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `users_email_unique` (`email`),
|
UNIQUE KEY `users_email_unique` (`email`),
|
||||||
KEY `users_supplier_id_foreign` (`supplier_id`),
|
KEY `users_supplier_id_foreign` (`supplier_id`),
|
||||||
@ -1019,107 +1069,115 @@ CREATE TABLE `work_calendars` (
|
|||||||
|
|
||||||
/*M!999999\- enable the sandbox mode */
|
/*M!999999\- enable the sandbox mode */
|
||||||
set autocommit=0;
|
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 (718,'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 (719,'2014_10_12_100000_create_password_resets_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 (720,'2019_08_19_000000_create_failed_jobs_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 (721,'2021_04_06_100750_create_products_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 (722,'2021_04_06_101015_create_product_groups_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 (723,'2021_05_05_141334_create_orders_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 (724,'2021_05_17_092917_create_suppliers_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 (725,'2021_05_25_165917_create_contacts_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 (726,'2021_06_23_100149_create_price_lists_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 (727,'2021_07_19_065008_create_producers_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 (728,'2021_07_29_121054_create_price_list_price',1);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (12,'2021_07_19_065008_create_producers_table',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (729,'2021_08_02_075611_create_audits_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 (730,'2021_10_15_180023_create_attachments_table',1);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (14,'2021_08_02_075611_create_audits_table',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (731,'2021_10_22_121054_create_supplier_product_group',1);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (15,'2021_10_15_180023_create_attachments_table',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (732,'2021_10_29_045551_create_order_numbers_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 (733,'2021_10_31_085743_add_confirmed_time_to_orders',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 (734,'2021_11_08_175100_add_parameterFields_to_orders',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 (735,'2021_11_10_070207_create_profit_centers_table',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 (736,'2021_11_22_161100_add_parameterFields_to_ProfitCenter',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 (737,'2021_11_26_053327_create_addresses_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 (738,'2021_11_28_094809_laratrust_setup_tables',1);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (22,'2021_11_26_053327_create_addresses_table',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (739,'2021_11_30_181255_create_profit_center_users',1);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (23,'2021_11_28_094809_laratrust_setup_tables',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (740,'2021_12_06_044820_create_order_archives_table',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 (741,'2021_12_06_051438_create_order_archives_items_table',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 (742,'2021_12_09_071814_create_profit_center_suppliers_table',2);
|
||||||
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 (743,'2021_12_21_085950_change_note_to_text_table',3);
|
||||||
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 (744,'2021_12_21_090255_change_note_to_text_products_table',3);
|
||||||
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 (745,'2022_01_26_144810_alter_table_products_change_unit_value',4);
|
||||||
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 (746,'2022_01_26_145301_alter_table_order_archives_items_change_unit_value',4);
|
||||||
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 (747,'2022_03_06_183718_add_product_comment_to_order_table',5);
|
||||||
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 (748,'2022_03_06_183948_add_product_comment_to_order_archive_table',5);
|
||||||
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 (749,'2022_03_06_184132_add_product_comment_to_order_archives_items_table',5);
|
||||||
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 (750,'2022_03_23_054908_create_profit_center_favorites_table',6);
|
||||||
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 (751,'2022_03_31_060015_change_note_to_text_supplier_table',7);
|
||||||
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 (752,'2022_03_31_084931_add_note_to_price_list_table',8);
|
||||||
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 (753,'2022_04_06_185438_change_order_sum_to_bigger_float_order_table',9);
|
||||||
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 (754,'2022_04_06_185733_change_order_sum_to_bigger_float_order_archive_table',9);
|
||||||
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 (755,'2022_05_10_095803_change_order_add_delivery_address_name_order_table',10);
|
||||||
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 (756,'2022_05_10_100303_change_order_add_delivery_address_name_order_archive_table',10);
|
||||||
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 (757,'2022_05_26_095237_create_system_parameters_table',11);
|
||||||
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 (758,'2022_06_16_160516_change_product_seller_uint_to_new_items_product_table',11);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (42,'2022_05_26_095237_create_system_parameters_table',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (759,'2022_06_16_160959_change_product_seller_uint_to_new_items_order_archive_items_table',11);
|
||||||
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 (760,'2022_10_06_100212_change_product_seller_uint_to_new_items_product_table',12);
|
||||||
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 (761,'2022_10_06_100434_change_product_seller_uint_to_new_items_order_archive_items_table',12);
|
||||||
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 (762,'2019_12_14_000001_create_personal_access_tokens_table',13);
|
||||||
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 (763,'2023_01_28_105430_change_order_add_custom_notification_email_order_table',13);
|
||||||
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 (764,'2023_01_28_111049_change_order_archive_add_custom_notification_email_order_archive_table',13);
|
||||||
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 (765,'2023_02_17_154501_add_api_fields_to_order_archives_table',13);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (49,'2023_03_24_075952_create_table_tests',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (766,'2023_03_20_094108_alter_table_orders_change_order_type',13);
|
||||||
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 (767,'2023_03_24_075952_create_table_tests',13);
|
||||||
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 (768,'2023_03_27_082804_add_parent_id_fields_to_order_archives_table',13);
|
||||||
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 (769,'2023_03_27_083102_add_parent_id_fields_to_orders_table',13);
|
||||||
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 (770,'2023_04_24_195258_add_modier_fields_to_orders_table',13);
|
||||||
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 (771,'2023_04_25_063313_add_modifier_fields_to_order_archives_table',13);
|
||||||
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 (772,'2023_09_03_062731_add_softdelete_fields_to_system_parameters_table',14);
|
||||||
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 (773,'2023_09_07_071418_add_krel_fields_to_products_table',14);
|
||||||
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 (774,'2023_09_07_071717_add_krel_to_order_archives_items_table',14);
|
||||||
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 (775,'2023_09_10_090802_add_fields_p_m75_to_suppliers_table',14);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (59,'2023_09_21_053850_create_supplier_notifier_table',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (776,'2023_09_14_070521_add_fields_p_m75_order_see_to_suppliers_table',14);
|
||||||
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 (777,'2023_09_21_053850_create_supplier_notifier_table',14);
|
||||||
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 (778,'2023_10_04_125603_add_fields_p_m139_hooreyca_to_product_table',15);
|
||||||
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 (779,'2023_10_04_152249_add_fields_p_m139_hooreyca_to_order_archives_item_table',15);
|
||||||
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 (780,'2023_10_15_113109_add_fields_p_m125attach_type_to_attachments_table',16);
|
||||||
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 (781,'2023_10_17_070426_add_fields_p_m153_type_to_contacts_table',17);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (65,'2024_07_31_173139_create_table_pm179_services',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (782,'2024_07_31_161548_alter_table_suppliers__p_m179_change_null_fields',18);
|
||||||
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 (783,'2024_07_31_173139_create_table_pm179_services',18);
|
||||||
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 (784,'2024_07_31_183829_create_table_supplier_services_pm179',18);
|
||||||
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 (785,'2025_03_01_111538_add_special_offer_fields_to_products_table',19);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (69,'2025_07_24_142415_create_sessions_table',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (786,'2025_03_01_111538_add_special_offer_to_order_archives_items_table',19);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (70,'2025_07_24_142624_create_cache_table',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (787,'2025_05_23_083138_add_hooreyca_data_active_fields_to_profit_centers_table',19);
|
||||||
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 (788,'2025_05_23_083138_add_hooreyca_data_active_fields_to_suppliers_table',19);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (72,'2026_01_24_000000_rename_password_resets_table',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (800,'0001_01_01_000000_create_users_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 (801,'0001_01_01_000001_create_cache_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 (802,'2014_10_12_100000_create_password_reset_tokens_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 (804,'2025_07_24_142624_create_cache_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 (808,'0001_01_01_000002_create_jobs_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 (809,'2025_07_24_142415_create_sessions_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 (812,'2026_03_02_065700_create_pricelist_files_table',20);
|
||||||
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 (815,'2026_03_02_072000_add_fields_to_pricelist_files_table',20);
|
||||||
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 (818,'2026_03_02_073000_add_processing_fields_to_pricelist_files_table',20);
|
||||||
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 (821,'2026_03_02_073505_add_relations_to_pricelist_files_table',20);
|
||||||
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 (824,'2026_03_02_091110_add_available_and_note_to_pricelist_files_table',20);
|
||||||
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 (827,'2026_03_02_135934_add_workflow_steps_to_pricelist_files_table',20);
|
||||||
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 (830,'2026_03_06_175613_fix_pricelist_files_status_enum',20);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (85,'2026_04_08_184130_create_work_calendars_table',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (833,'2026_03_07_072716_add_file_meta_to_pricelist_files_table',20);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (86,'2026_04_08_223732_create_delivery_schedules_table',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (836,'2026_03_08_222836_create_pricelist_file_lines_table',20);
|
||||||
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 (839,'2026_03_08_223838_add_audit_fields_to_pricelist_file_lines_table',20);
|
||||||
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 (842,'2026_03_09_212047_add_relation_ids_to_pricelist_file_lines_table',20);
|
||||||
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 (845,'2026_03_11_153652_update_enums_in_pricelist_tables',20);
|
||||||
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 (848,'2026_04_08_184130_create_work_calendars_table',21);
|
||||||
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 (851,'2026_04_08_223732_create_delivery_schedules_table',21);
|
||||||
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 (854,'2026_04_08_223733_create_profit_center_supplier_schedules_table',21);
|
||||||
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 (857,'2026_04_08_223735_create_delivery_calendar_overrides_table',21);
|
||||||
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 (860,'2026_04_20_162446_add_scope_to_delivery_calendar_overrides_table',21);
|
||||||
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 (863,'2026_04_20_171028_change_region_to_delivery_schedule_id_in_delivery_calendar_overrides',21);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (96,'2026_08_08_152549_create_features_table',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (866,'2026_04_24_184012_add_delivery_constraint_to_suppliers_table',21);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (97,'2026_08_08_153000_create_feature_flags_table',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (869,'2026_04_25_163803_add_supplier_id_to_users_table',21);
|
||||||
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 (872,'2026_04_25_164154_add_stock_status_to_products_table',21);
|
||||||
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 (875,'2026_05_05_070449_add_stock_status_to_order_archives_items_table',22);
|
||||||
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 (878,'2026_01_24_000000_add_expires_at_to_personal_access_tokens_table',23);
|
||||||
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 (881,'2026_01_24_000000_rename_password_resets_table',23);
|
||||||
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 (882,'2026_07_20_171642_restore_missing_id_auto_increment',24);
|
||||||
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (103,'2026_08_16_090000_create_deployment_packages_table',1);
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (883,'2026_08_08_152549_create_features_table',24);
|
||||||
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (884,'2026_08_08_153000_create_feature_flags_table',25);
|
||||||
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (885,'2026_08_08_154500_create_feature_flag_overrides_table',26);
|
||||||
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (886,'2026_08_09_090000_add_customer_code_to_suppliers_table',27);
|
||||||
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (887,'2026_08_09_091500_create_profit_center_supplier_codes_table',27);
|
||||||
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (888,'2026_08_10_090000_add_execution_failed_to_pricelist_files_status_enum',28);
|
||||||
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (889,'2026_08_10_090100_add_execution_fields_to_pricelist_file_lines_table',28);
|
||||||
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (890,'2026_08_16_090000_create_deployment_packages_table',29);
|
||||||
|
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (892,'2026_08_24_172116_add_meter_unit_to_seller_and_amount_unit_columns',30);
|
||||||
commit;
|
commit;
|
||||||
|
|||||||
63
tests/Feature/PricelistUnitValidationTest.php
Normal file
63
tests/Feature/PricelistUnitValidationTest.php
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use App\Enums\PricelistSellerUnitEnum;
|
||||||
|
use App\Enums\ProductUnitEnum;
|
||||||
|
use App\Models\ProfitCenter;
|
||||||
|
use App\Models\Supplier;
|
||||||
|
use App\Services\PriceListService;
|
||||||
|
use App\Services\PricelistFileProcessService;
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
uses(TestCase::class, RefreshDatabase::class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A validateSellerUnit()/validateAmountUnit() protected metódusok meghívása reflectionnel
|
||||||
|
* (lásd PricelistColumnMappingTest.php hasonló mintáját a buildColumnMap()-hoz).
|
||||||
|
*/
|
||||||
|
function invokeUnitValidator(string $method, string $unitValue): ?string
|
||||||
|
{
|
||||||
|
$service = app(PricelistFileProcessService::class);
|
||||||
|
$reflection = new ReflectionMethod($service, $method);
|
||||||
|
$reflection->setAccessible(true);
|
||||||
|
|
||||||
|
$header = match ($method) {
|
||||||
|
'validateSellerUnit' => PriceListService::EXPECTED_HEADERS[9],
|
||||||
|
'validateAmountUnit' => PriceListService::EXPECTED_HEADERS[11],
|
||||||
|
};
|
||||||
|
|
||||||
|
return $reflection->invoke($service, [$header => $unitValue]);
|
||||||
|
}
|
||||||
|
|
||||||
|
it('accepts "m" as a valid seller unit in the new pricelist pipeline (EV3-465)', function () {
|
||||||
|
expect(invokeUnitValidator('validateSellerUnit', 'm'))->toBeNull();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('accepts "m" as a valid amount unit in the new pricelist pipeline (EV3-465)', function () {
|
||||||
|
expect(invokeUnitValidator('validateAmountUnit', 'm'))->toBeNull();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('still rejects an unknown seller unit', function () {
|
||||||
|
expect(invokeUnitValidator('validateSellerUnit', 'nincs-ilyen'))->not->toBeNull();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('accepts "m" as a valid ProductUnitEnum value, used by the legacy pricelist pipeline', function () {
|
||||||
|
expect(ProductUnitEnum::hasValue('m'))->toBeTrue();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('persists a product with "m" seller and amount unit (DB enum column check)', function () {
|
||||||
|
$supplier = Supplier::factory()->create();
|
||||||
|
|
||||||
|
$product = App\Models\Product::create([
|
||||||
|
'name' => 'Bunzl teszttermék',
|
||||||
|
'supplier_id' => $supplier->id,
|
||||||
|
'sellerUnit' => 'm',
|
||||||
|
'amountUnit' => 'm',
|
||||||
|
'status' => App\Enums\DbStatusFieldEnum::active,
|
||||||
|
]);
|
||||||
|
|
||||||
|
$product->refresh();
|
||||||
|
|
||||||
|
expect($product->sellerUnit)->toBe('m');
|
||||||
|
expect($product->amountUnit)->toBe('m');
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue
Block a user