Files
blog/database/migrations/2019_10_17_102751_create_published_row.php
2019-10-17 08:00:53 -03:00

25 lines
565 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePublishedRow extends Migration
{
public function up()
{
Schema::table('posts', function (Blueprint $table) {
$table->boolean('is_published')
->after('md')
->default(false);
});
}
public function down()
{
Schema::table('posts', function (Blueprint $table) {
$table->dropColumn('is_published');
});
}
}