Unverified Commit d872a581 authored by KaMe's avatar KaMe Committed by GitHub

2018_05_23_145242_edit_body_column_nullable.php

Make migration for set column body nullable, to fix the problem when create a page with no body field.
parent b8d8486e
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class EditContentColumnNulleable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('page__page_translations', function (Blueprint $table) {
$table->string('body')->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('page__page_translations', function (Blueprint $table) {
$table->string('body')->nullable(false)->change();
});
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment