| @@ 7-24 (lines=18) @@ | ||
| 4 | use October\Rain\Database\Schema\Blueprint; |
|
| 5 | use October\Rain\Database\Updates\Migration; |
|
| 6 | ||
| 7 | class CreateCartsTable extends Migration |
|
| 8 | { |
|
| 9 | public function up() |
|
| 10 | { |
|
| 11 | Schema::create('bedard_shop_carts', function (Blueprint $table) { |
|
| 12 | $table->engine = 'InnoDB'; |
|
| 13 | $table->increments('id'); |
|
| 14 | $table->integer('promotion_id')->unsigned()->nullable()->index(); |
|
| 15 | $table->string('token', 40)->unique(); |
|
| 16 | $table->timestamps(); |
|
| 17 | }); |
|
| 18 | } |
|
| 19 | ||
| 20 | public function down() |
|
| 21 | { |
|
| 22 | Schema::dropIfExists('bedard_shop_carts'); |
|
| 23 | } |
|
| 24 | } |
|
| 25 | ||
| @@ 7-24 (lines=18) @@ | ||
| 4 | use October\Rain\Database\Schema\Blueprint; |
|
| 5 | use October\Rain\Database\Updates\Migration; |
|
| 6 | ||
| 7 | class CreateDriverConfigsTable extends Migration |
|
| 8 | { |
|
| 9 | public function up() |
|
| 10 | { |
|
| 11 | Schema::create('bedard_shop_driver_configs', function(Blueprint $table) { |
|
| 12 | $table->engine = 'InnoDB'; |
|
| 13 | $table->increments('id'); |
|
| 14 | $table->string('driver')->default(''); |
|
| 15 | $table->json('config'); |
|
| 16 | $table->timestamps(); |
|
| 17 | }); |
|
| 18 | } |
|
| 19 | ||
| 20 | public function down() |
|
| 21 | { |
|
| 22 | Schema::dropIfExists('bedard_shop_driver_configs'); |
|
| 23 | } |
|
| 24 | } |
|
| 25 | ||