| 1 | <?php |
||
| 7 | class CreateProjectsTable extends Migration |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Run the migrations. |
||
| 11 | * |
||
| 12 | * @return void |
||
| 13 | */ |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('projects', function (Blueprint $table) { |
||
| 17 | $table->increments('id'); |
||
| 18 | $table->string('name')->unique()->index(); |
||
| 19 | $table->string('slug')->unique()->index(); |
||
| 20 | $table->string('type')->nullable()->index(); |
||
| 21 | $table->boolean('visible')->default(false); |
||
| 22 | $table->integer('order'); |
||
| 23 | $table->timestamp('deleted_at')->nullable(); |
||
| 24 | $table->timestamps(); |
||
| 25 | }); |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Reverse the migrations. |
||
| 30 | * |
||
| 31 | * @return void |
||
| 32 | */ |
||
| 33 | public function down() |
||
| 34 | { |
||
| 35 | Schema::dropIfExists('projects'); |
||
| 36 | } |
||
| 37 | } |
||
| 38 |