BookStack/database/migrations/2015_07_12_114933_create_books_table.php

34 lines
666 B
PHP
Raw Permalink Normal View History

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