for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Bedard\Shop\Updates;
use October\Rain\Database\Schema\Blueprint;
use October\Rain\Database\Updates\Migration;
use Schema;
class CreateCategoryProductTable extends Migration
{
public function up()
Schema::create('bedard_shop_category_product', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->integer('category_id')->unsigned()->nullable();
$table->integer('product_id')->unsigned()->nullable();
$table->boolean('is_inherited')->index()->default(false);
$table->primary(['category_id', 'product_id'], 'category_product');
});
}
public function down()
Schema::dropIfExists('bedard_shop_category_product');