Allow descrition field to be optional

Allows for Nest, Node, Location and Egg description fields to be blank / nullable.
Removed "required" wording next to them aswell
This commit is contained in:
AreYouScared 2020-04-17 20:52:40 -04:00
parent 90e2d0d72a
commit 21491e3aaa
9 changed files with 67 additions and 11 deletions

View file

@ -0,0 +1,56 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AllowNullableDescriptions extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('eggs', function (Blueprint $table) {
$table->text('description')->nullable()->change();
});
Schema::table('nests', function (Blueprint $table) {
$table->text('description')->nullable()->change();
});
Schema::table('nodes', function (Blueprint $table) {
$table->text('description')->nullable()->change();
});
Schema::table('locations', function (Blueprint $table) {
$table->text('long')->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('eggs', function (Blueprint $table) {
$table->text('description')->nullable(false)->change();
});
Schema::table('nests', function (Blueprint $table) {
$table->text('description')->nullable(false)->change();
});
Schema::table('nodes', function (Blueprint $table) {
$table->text('description')->nullable(false)->change();
});
Schema::table('locations', function (Blueprint $table) {
$table->text('long')->nullable(false)->change();
});
}
}