Heimdall/database/migrations/2018_01_27_155922_create_items_table.php

40 lines
949 B
PHP
Raw Normal View History

2018-01-26 14:35:01 +00:00
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
2018-01-29 12:41:57 +00:00
class CreateItemsTable extends Migration
2018-01-26 14:35:01 +00:00
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
2018-01-29 12:41:57 +00:00
Schema::create('items', function (Blueprint $table) {
2018-01-26 14:35:01 +00:00
$table->increments('id');
2018-01-29 12:41:57 +00:00
$table->string('title');
2018-02-01 06:57:12 +00:00
$table->string('colour')->nullable();
$table->string('icon')->nullable();
2018-01-29 12:41:57 +00:00
$table->string('url');
2018-02-01 06:57:12 +00:00
$table->text('description')->nullable();
2018-01-29 12:41:57 +00:00
$table->boolean('pinned')->default(false);
$table->integer('order')->default(0);
2018-02-03 15:46:14 +00:00
$table->softDeletes();
2018-01-26 14:35:01 +00:00
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
2018-01-29 12:41:57 +00:00
Schema::dropIfExists('items');
2018-01-26 14:35:01 +00:00
}
}