2014-11-16 22:54:17 +00:00
|
|
|
<?php
|
|
|
|
|
2015-04-19 08:52:39 +01:00
|
|
|
/*
|
|
|
|
* This file is part of Cachet.
|
|
|
|
*
|
2015-07-06 17:37:01 +01:00
|
|
|
* (c) Alt Three Services Limited
|
2015-04-19 08:52:39 +01:00
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
2014-11-16 22:54:17 +00:00
|
|
|
use Illuminate\Database\Migrations\Migration;
|
2014-12-20 21:20:17 +00:00
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
2015-01-01 13:53:31 +00:00
|
|
|
use Illuminate\Support\Facades\Schema;
|
2014-11-16 22:54:17 +00:00
|
|
|
|
2014-12-20 21:20:17 +00:00
|
|
|
class CreateComponentsTable extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('components', function (Blueprint $table) {
|
2015-06-30 09:53:29 -05:00
|
|
|
$table->engine = 'InnoDB';
|
2015-06-30 11:35:34 -05:00
|
|
|
|
2014-12-20 21:20:17 +00:00
|
|
|
$table->increments('id');
|
|
|
|
$table->string('name');
|
2015-01-08 13:38:29 +01:00
|
|
|
$table->text('description');
|
|
|
|
$table->text('link');
|
2015-01-05 20:38:06 +00:00
|
|
|
$table->integer('status');
|
|
|
|
$table->integer('order');
|
|
|
|
$table->integer('group_id');
|
|
|
|
$table->integer('user_id');
|
2014-12-20 21:20:17 +00:00
|
|
|
$table->timestamps();
|
2015-01-05 20:38:06 +00:00
|
|
|
$table->softDeletes();
|
2014-11-16 22:54:17 +00:00
|
|
|
|
2015-01-05 20:38:06 +00:00
|
|
|
$table->index('group_id');
|
|
|
|
$table->index('user_id');
|
2014-12-20 21:20:17 +00:00
|
|
|
$table->index('status');
|
2015-01-05 20:38:06 +00:00
|
|
|
$table->index('order');
|
2014-12-20 21:20:17 +00:00
|
|
|
});
|
|
|
|
}
|
2014-11-16 22:54:17 +00:00
|
|
|
|
2014-12-20 21:20:17 +00:00
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::drop('components');
|
|
|
|
}
|
2014-11-16 22:54:17 +00:00
|
|
|
}
|