1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Started working on chapters

This commit is contained in:
Dan Brown
2015-07-27 20:17:08 +01:00
parent ef77c10a70
commit b9df3c647a
17 changed files with 317 additions and 40 deletions

View File

@ -15,7 +15,7 @@ class CreatePagesTable extends Migration
Schema::create('pages', function (Blueprint $table) {
$table->increments('id');
$table->integer('book_id');
$table->integer('page_id');
$table->integer('chapter_id');
$table->string('name');
$table->string('slug')->indexed();
$table->longText('html');

View File

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateChaptersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('chapters', function (Blueprint $table) {
$table->increments('id');
$table->integer('book_id');
$table->string('slug')->indexed();
$table->text('name');
$table->text('description');
$table->integer('priority');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('chapters');
}
}