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