Skip to content

Instantly share code, notes, and snippets.

@marksparrish
Created November 8, 2021 15:48
Show Gist options
  • Save marksparrish/98002aa5ea57bf102b859b3b32644bd4 to your computer and use it in GitHub Desktop.
Save marksparrish/98002aa5ea57bf102b859b3b32644bd4 to your computer and use it in GitHub Desktop.
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProductTagTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('product_tag', function (Blueprint $table) {
$table->integer('product_id')->index();
$table->integer('tag_id')->index();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('product_tag');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment