| @@ 7-25 (lines=19) @@ | ||
| 4 | use October\Rain\Database\Updates\Migration; |
|
| 5 | use Schema; |
|
| 6 | ||
| 7 | class CreateOptionValuesTable extends Migration |
|
| 8 | { |
|
| 9 | public function up() |
|
| 10 | { |
|
| 11 | Schema::create('bedard_shop_option_values', function (Blueprint $table) { |
|
| 12 | $table->engine = 'InnoDB'; |
|
| 13 | $table->increments('id'); |
|
| 14 | $table->integer('option_id')->unsigned()->nullable()->index(); |
|
| 15 | $table->integer('sort_order')->unsigned()->default(0)->index(); |
|
| 16 | $table->string('name')->default(''); |
|
| 17 | $table->timestamps(); |
|
| 18 | }); |
|
| 19 | } |
|
| 20 | ||
| 21 | public function down() |
|
| 22 | { |
|
| 23 | Schema::dropIfExists('bedard_shop_option_values'); |
|
| 24 | } |
|
| 25 | } |
|
| 26 | ||
| @@ 7-26 (lines=20) @@ | ||
| 4 | use October\Rain\Database\Updates\Migration; |
|
| 5 | use Schema; |
|
| 6 | ||
| 7 | class CreateOptionsTable extends Migration |
|
| 8 | { |
|
| 9 | public function up() |
|
| 10 | { |
|
| 11 | Schema::create('bedard_shop_options', function (Blueprint $table) { |
|
| 12 | $table->engine = 'InnoDB'; |
|
| 13 | $table->increments('id'); |
|
| 14 | $table->integer('product_id')->unsigned()->nullable()->index(); |
|
| 15 | $table->integer('sort_order')->unsigned()->default(0)->index(); |
|
| 16 | $table->string('name')->default(''); |
|
| 17 | $table->string('placeholder')->default(''); |
|
| 18 | $table->timestamps(); |
|
| 19 | }); |
|
| 20 | } |
|
| 21 | ||
| 22 | public function down() |
|
| 23 | { |
|
| 24 | Schema::dropIfExists('bedard_shop_options'); |
|
| 25 | } |
|
| 26 | } |
|
| 27 | ||