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 CreateCartItemsTable extends Migration
{
public function up()
Schema::create('bedard_shop_cart_items', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->integer('cart_id')->unsigned()->index();
$table->integer('inventory_id')->unsigned()->index();
$table->integer('product_id')->unsigned()->index();
$table->integer('quantity')->unsigned()->default(0);
$table->boolean('is_reduced')->default(false);
$table->timestamps();
$table->softDeletes();
});
}
public function down()
Schema::dropIfExists('bedard_shop_cart_items');