diff --git a/packages/admin/src/Http/Livewire/Components/Settings/Attributes/AttributeEdit.php b/packages/admin/src/Http/Livewire/Components/Settings/Attributes/AttributeEdit.php index 4d75ed11bd..861c52f953 100644 --- a/packages/admin/src/Http/Livewire/Components/Settings/Attributes/AttributeEdit.php +++ b/packages/admin/src/Http/Livewire/Components/Settings/Attributes/AttributeEdit.php @@ -76,7 +76,7 @@ public function rules() 'attribute.searchable' => 'nullable|boolean', 'attribute.filterable' => 'nullable|boolean', 'attribute.configuration' => 'nullable|array', - 'attribute.section' => 'string', + 'attribute.section' => 'nullable|string', 'attribute.system' => 'boolean', 'attribute.type' => 'required', 'attribute.validation_rules' => 'nullable|string', diff --git a/packages/core/database/migrations/2023_09_21_100000_set_section_to_nullable_on_attributes.php b/packages/core/database/migrations/2023_09_21_100000_set_section_to_nullable_on_attributes.php new file mode 100644 index 0000000000..5effb3491b --- /dev/null +++ b/packages/core/database/migrations/2023_09_21_100000_set_section_to_nullable_on_attributes.php @@ -0,0 +1,22 @@ +prefix.'attributes', function (Blueprint $table) { + $table->string('section')->nullable()->change(); + }); + } + + public function down() + { + Schema::table($this->prefix.'attributes', function ($table) { + $table->string('section')->nullable(false)->change(); + }); + } +}