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