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