remove variant type id (enum) from variants table, use internal id for category field on variants form

This commit is contained in:
2025-06-30 21:25:47 -07:00
parent 5fb215c7fd
commit c9d34f7115
8 changed files with 10 additions and 52 deletions

View File

@@ -23,7 +23,6 @@ class ProductCategoryVariantsFixture extends TestFixture
'name' => 'Color',
'product_category_id' => '6d223283-361b-4f9f-a7f1-c97aa0ca4c23',
'product_id' => null,
'variant_type_id' => 1,
'enabled' => 1,
],
[
@@ -31,9 +30,9 @@ class ProductCategoryVariantsFixture extends TestFixture
'name' => 'Color',
'product_category_id' => '6d223283-361b-4f9f-a7f1-c97aa0ca4c23',
'product_id' => 'cfc98a9a-29b2-44c8-b587-8156adc05317',
'variant_type_id' => 1,
'enabled' => 1,
],
];
parent::init();
}

View File

@@ -152,7 +152,6 @@ class ProductCategoryVariantsControllerTest extends BaseControllerTest
$data = [
'name' => 'Size',
'product_category_id' => 'db4b4273-eddc-46d4-93c8-45cf7c6e058e',
'variant_type_id' => 1,
'enabled' => true,
];
$this->post($url, $data);
@@ -186,7 +185,6 @@ class ProductCategoryVariantsControllerTest extends BaseControllerTest
$data = [
'name' => '',
'product_category_id' => 'db4b4273-eddc-46d4-93c8-45cf7c6e058e',
'variant_type_id' => 1,
'enabled' => true,
];
$this->post($url, $data);
@@ -246,7 +244,6 @@ class ProductCategoryVariantsControllerTest extends BaseControllerTest
// test new data here
'name' => 'updated name',
'product_category_id' => 'db4b4273-eddc-46d4-93c8-45cf7c6e058e',
'variant_type_id' => 1,
'enabled' => true,
];
$this->put($url, $data);
@@ -282,7 +279,6 @@ class ProductCategoryVariantsControllerTest extends BaseControllerTest
$data = [
'name' => '',
'product_category_id' => 'db4b4273-eddc-46d4-93c8-45cf7c6e058e',
'variant_type_id' => 1,
'enabled' => true,
];
$this->put($url, $data);