BookStack/database/migrations/2015_07_27_172342_create_chapters_table.php

36 lines
759 B
PHP
Raw Normal View History

2015-07-27 19:17:08 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
2021-06-26 15:23:15 +00:00
use Illuminate\Database\Schema\Blueprint;
2015-07-27 19:17:08 +00:00
class CreateChaptersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('chapters', function (Blueprint $table) {
2015-07-27 19:17:08 +00:00
$table->increments('id');
$table->integer('book_id');
$table->string('slug')->indexed();
$table->text('name');
$table->text('description');
$table->integer('priority');
2016-02-16 21:25:11 +00:00
$table->nullableTimestamps();
2015-07-27 19:17:08 +00:00
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('chapters');
}
}