BookStack/database/migrations/2015_07_27_172342_create_chapters_table.php

36 lines
759 B
PHP
Raw Normal View History

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