Files
phpvms/app/Database/migrations/2020_03_27_174238_create_pages.php
Nabeel S 12848091a2 Laravel 9 Update (#1413)
Update to Laravel 9 and PHP 8+

Co-authored-by: B.Fatih KOZ <fatih.koz@gmail.com>
2022-03-14 11:45:18 -04:00

35 lines
871 B
PHP

<?php
use App\Contracts\Migration;
use App\Models\Enums\PageType;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Create the pages
* https://github.com/nabeelio/phpvms/issues/641
*/
return new class() extends Migration {
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');
});
}
public function down()
{
Schema::dropIfExists('pages');
}
};