mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Add page migration
This commit is contained in:
parent
6bad723b68
commit
9b2bcd034e
1 changed files with 40 additions and 0 deletions
40
database/migrations/2019_01_22_030129_create_pages_table.php
Normal file
40
database/migrations/2019_01_22_030129_create_pages_table.php
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreatePagesTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('pages', function (Blueprint $table) {
|
||||||
|
$table->bigIncrements('id');
|
||||||
|
$table->string('root')->nullable()->index();
|
||||||
|
$table->string('slug')->nullable()->unique()->index();
|
||||||
|
$table->string('title')->nullable();
|
||||||
|
$table->unsignedInteger('category_id')->nullable()->index();
|
||||||
|
$table->longText('content')->nullable();
|
||||||
|
$table->string('template')->default('layouts.app')->index();
|
||||||
|
$table->boolean('active')->default(false)->index();
|
||||||
|
$table->boolean('cached')->default(true)->index();
|
||||||
|
$table->timestamp('active_until')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('pages');
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue