bookstack/database/migrations/2015_07_12_190027_create_pa...

38 lines
825 B
PHP
Raw Normal View History

2015-07-13 03:01:42 +08:00
<?php
use Illuminate\Database\Migrations\Migration;
2021-06-26 23:23:15 +08:00
use Illuminate\Database\Schema\Blueprint;
2015-07-13 03:01:42 +08:00
return new class extends Migration
2015-07-13 03:01:42 +08:00
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('pages', function (Blueprint $table) {
2015-07-13 03:01:42 +08:00
$table->increments('id');
2015-07-13 04:31:15 +08:00
$table->integer('book_id');
2015-07-28 03:17:08 +08:00
$table->integer('chapter_id');
2015-07-13 04:31:15 +08:00
$table->string('name');
$table->string('slug')->indexed();
$table->longText('html');
$table->longText('text');
$table->integer('priority');
2016-02-17 05:25:11 +08:00
$table->nullableTimestamps();
2015-07-13 03:01:42 +08:00
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('pages');
}
};