2015-07-12 21:01:42 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
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->increments('id');
|
2015-07-12 22:31:15 +02:00
|
|
|
$table->integer('book_id');
|
2015-07-27 21:17:08 +02:00
|
|
|
$table->integer('chapter_id');
|
2015-07-12 22:31:15 +02:00
|
|
|
$table->string('name');
|
|
|
|
$table->string('slug')->indexed();
|
|
|
|
$table->longText('html');
|
|
|
|
$table->longText('text');
|
|
|
|
$table->integer('priority');
|
2015-07-12 21:01:42 +02:00
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::drop('pages');
|
|
|
|
}
|
|
|
|
}
|