Skip to content

Commit

Permalink
set section to nullable on attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
netzknecht committed Sep 27, 2023
1 parent a256047 commit 0539f2a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Lunar\Base\Migration;

class SetSectionToNullableOnAttributes extends Migration
{
public function up()
{
Schema::table($this->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();
});
}
}

0 comments on commit 0539f2a

Please sign in to comment.