2016-03-13 13:04:08 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
2016-03-13 14:30:47 +01:00
|
|
|
class AddPageDrafts extends Migration
|
2016-03-13 13:04:08 +01:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::table('pages', function(Blueprint $table) {
|
|
|
|
$table->boolean('draft')->default(false);
|
|
|
|
$table->index('draft');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::table('pages', function (Blueprint $table) {
|
|
|
|
$table->dropColumn('draft');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|