phpvms/app/Database/migrations/2020_03_27_174238_create_pages.php
Nabeel S 420bd7e4ae
Add ability to use a link instead of a page #750 (#757)
Add ability to use a link instead of a page #750
2020-06-11 08:27:38 -04:00

46 lines
1.0 KiB
PHP

<?php
use App\Models\Enums\PageType;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Create the pages
* https://github.com/nabeelio/phpvms/issues/641
*/
class CreatePages extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('pages', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('slug');
$table->string('icon');
$table->unsignedSmallInteger('type')->default(PageType::PAGE);
$table->boolean('public');
$table->boolean('enabled');
$table->mediumText('body');
$table->timestamps();
$table->index('slug');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('pages');
}
}