1: <?php
2:
3: use Illuminate\Database\Schema\Blueprint;
4: use Illuminate\Database\Migrations\Migration;
5:
6: class CreateKeyTypesTable extends Migration {
7:
8: /**
9: * Run the migrations.
10: *
11: * @access public
12: * @return void
13: */
14: public function up()
15: {
16: if (!Schema::hasTable('_db_key_types'))
17: {
18: Schema::create('_db_key_types', function ($table)
19: {
20: $table->increments('id')->unique();
21: $table->string('name', 100);
22: $table->integer('levels')->unsigned()->nullable();
23: });
24: }
25: }
26:
27: /**
28: * Reverse the migrations.
29: *
30: * @access public
31: * @return void
32: */
33: public function down()
34: {
35: Schema::dropIfExists('_db_key_types');
36: }
37:
38: }
39: