| @@ 9-22 (lines=14) @@ | ||
| 6 | ||
| 7 | class CreateCartItemsTable extends Migration |
|
| 8 | { |
|
| 9 | public function up() |
|
| 10 | { |
|
| 11 | Schema::create('bedard_shop_cart_items', function (Blueprint $table) { |
|
| 12 | $table->engine = 'InnoDB'; |
|
| 13 | $table->increments('id'); |
|
| 14 | $table->integer('cart_id')->unsigned()->index(); |
|
| 15 | $table->integer('inventory_id')->unsigned()->index(); |
|
| 16 | $table->integer('product_id')->unsigned()->index(); |
|
| 17 | $table->integer('quantity')->unsigned()->default(0); |
|
| 18 | $table->boolean('is_reduced')->default(false); |
|
| 19 | $table->timestamps(); |
|
| 20 | $table->softDeletes(); |
|
| 21 | }); |
|
| 22 | } |
|
| 23 | ||
| 24 | public function down() |
|
| 25 | { |
|
| @@ 9-23 (lines=15) @@ | ||
| 6 | ||
| 7 | class CreateStatusesTable extends Migration |
|
| 8 | { |
|
| 9 | public function up() |
|
| 10 | { |
|
| 11 | Schema::create('bedard_shop_statuses', function (Blueprint $table) { |
|
| 12 | $table->engine = 'InnoDB'; |
|
| 13 | $table->increments('id'); |
|
| 14 | $table->string('name')->default('')->index(); |
|
| 15 | $table->string('color')->nullable(); |
|
| 16 | $table->string('icon')->nullable(); |
|
| 17 | $table->boolean('is_abandoned')->default(false); |
|
| 18 | $table->boolean('is_default')->default(false); |
|
| 19 | $table->boolean('is_reducing')->default(false); |
|
| 20 | $table->timestamps(); |
|
| 21 | $table->softDeletes(); |
|
| 22 | }); |
|
| 23 | } |
|
| 24 | ||
| 25 | public function down() |
|
| 26 | { |
|