¨4.0.1¨

This commit is contained in:
¨NW¨
2023-12-03 14:07:47 +00:00
parent c08b36d1b6
commit f35052522d
1112 changed files with 43019 additions and 24987 deletions

View File

@@ -52,6 +52,7 @@ class CreateOrdersTable extends Migration
});
}
/**
* Reverse the migrations.
*

View File

@@ -26,6 +26,7 @@ class CreateOrderProductsTable extends Migration
});
}
/**
* Reverse the migrations.
*

View File

@@ -24,6 +24,7 @@ class CreateOrderProductOptionsTable extends Migration
});
}
/**
* Reverse the migrations.
*

View File

@@ -24,6 +24,7 @@ class CreateOrderProductOptionValuesTable extends Migration
});
}
/**
* Reverse the migrations.
*

View File

@@ -24,6 +24,7 @@ class CreateOrderTaxesTable extends Migration
});
}
/**
* Reverse the migrations.
*

View File

@@ -18,6 +18,7 @@ class AddValueColumnToOrderProductOptionsTable extends Migration
});
}
/**
* Reverse the migrations.
*

View File

@@ -18,6 +18,7 @@ class AddNoteColumnToOrdersTable extends Migration
});
}
/**
* Reverse the migrations.
*

View File

@@ -15,6 +15,7 @@ class ChangeShippingMethodColumnInOrdersTable extends Migration
DB::statement('ALTER TABLE orders MODIFY shipping_method VARCHAR(191)');
}
/**
* Reverse the migrations.
*

View File

@@ -23,6 +23,7 @@ class CreateOrderDownloadsTable extends Migration
});
}
/**
* Reverse the migrations.
*

View File

@@ -0,0 +1,39 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateOrderProductVariationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('order_product_variations', function (Blueprint $table) {
$table->increments('id');
$table->integer('order_product_id')->unsigned();
$table->integer('variation_id')->unsigned();
$table->string('type');
$table->string('value');
$table->unique(['order_product_id', 'variation_id']);
$table->foreign('order_product_id')->references('id')->on('order_products')->onDelete('cascade');
$table->foreign('variation_id')->references('id')->on('variations')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('order_product_variations');
}
}

View File

@@ -0,0 +1,37 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateOrderProductVariationValuesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('order_product_variation_values', function (Blueprint $table) {
$table->integer('order_product_variation_id')->unsigned();
$table->integer('variation_value_id')->unsigned();
$table->primary(['order_product_variation_id', 'variation_value_id'], 'order_product_variation_id_variation_value_id_primary');
$table->foreign('order_product_variation_id', 'order_product_variation_values_order_product_variation_id')->references('id')->on('order_product_variations')->onDelete('cascade');
$table->foreign('variation_value_id')->references('id')->on('variation_values')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('order_product_variation_values');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddProductVariantIdColumnToOrderProductsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('order_products', function (Blueprint $table) {
$table->foreignId('product_variant_id')->nullable()->after('product_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('order_products', function (Blueprint $table) {
$table->dropColumn('product_variant_id');
});
}
}