Completed
Push — master ( afa14d...f0d99a )
by Iman
13s
created

CreateCmsMenusTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 35
c 1
b 0
f 1
rs 10
wmc 2
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class CreateCmsMenusTable extends Migration {
7
8
	/**
9
	 * Run the migrations.
10
	 *
11
	 * @return void
12
	 */
13
	public function up()
14
	{
15
		Schema::create('cms_menus', function(Blueprint $table)
16
		{
17
			$table->increments('id');
18
			$table->string('name', 30)->nullable();
19
			$table->string('type', 30)->default('url');
20
			$table->string('path', 50)->nullable();
21
			$table->string('color', 30)->nullable();
22
			$table->string('icon', 30)->nullable();
23
			$table->integer('parent_id')->nullable();
24
			$table->boolean('is_active')->default(1);
25
			$table->boolean('is_dashboard')->default(0);
26
			$table->integer('sorting')->nullable();
27
			$table->timestamps();
28
			$table->text('cms_privileges', 65535)->nullable();
29
		});
30
	}
31
32
33
	/**
34
	 * Reverse the migrations.
35
	 *
36
	 * @return void
37
	 */
38
	public function down()
39
	{
40
		Schema::drop('cms_menus');
41
	}
42
43
}
44