-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow section to be null on attributes (#1259)
- Loading branch information
1 parent
472f4b7
commit f7e9eeb
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...ages/core/database/migrations/2023_09_21_100000_set_section_to_nullable_on_attributes.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}); | ||
} | ||
} |