2016-03-13 13:04:08 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
2021-06-26 17:23:15 +02:00
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
2016-03-13 13:04:08 +01:00
|
|
|
|
2023-02-06 17:58:29 +01:00
|
|
|
return new class extends Migration
|
2016-03-13 13:04:08 +01:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
2021-06-26 17:23:15 +02:00
|
|
|
Schema::table('pages', function (Blueprint $table) {
|
2016-03-13 13:04:08 +01:00
|
|
|
$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');
|
|
|
|
});
|
|
|
|
}
|
2023-02-06 17:58:29 +01:00
|
|
|
};
|