snipe-it/database/migrations/2018_10_19_153910_add_kits_table.php

41 lines
765 B
PHP
Raw Permalink Normal View History

2018-10-19 07:30:25 -07:00
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
2018-10-19 07:30:25 -07:00
class AddKitsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (!Schema::hasTable('kits')) {
Schema::create('kits', function ($table) {
$table->increments('id');
$table->string('name')->nullable()->default(NULL);
$table->timestamps();
$table->engine = 'InnoDB';
});
}
}
2018-10-19 07:30:25 -07:00
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
if (Schema::hasTable('kits')) {
Schema::drop('kits');
}
}
2018-10-19 07:30:25 -07:00
}