消费值
parent
d24ff38576
commit
da2bda6d0d
|
|
@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
class AddGrowthValueToProductSpusTable extends Migration
|
class AddSalesValueToProductSpusTable extends Migration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
|
|
@ -14,8 +14,7 @@ class AddGrowthValueToProductSpusTable extends Migration
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('product_spus', function (Blueprint $table) {
|
Schema::table('product_spus', function (Blueprint $table) {
|
||||||
//
|
$table->unsignedDecimal('sales_value', 18, 2)->default(0.00)->comment('销售值');
|
||||||
$table->unsignedBigInteger('growth_value')->default(0)->comment('等级成长值');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -28,7 +27,7 @@ class AddGrowthValueToProductSpusTable extends Migration
|
||||||
{
|
{
|
||||||
Schema::table('product_spus', function (Blueprint $table) {
|
Schema::table('product_spus', function (Blueprint $table) {
|
||||||
//
|
//
|
||||||
$table->dropColumn('product_spus');
|
$table->dropColumn(['sales_value']);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
class AddGrowthValueToProductSkusTable extends Migration
|
class AddSalesValueToProductSkusTable extends Migration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
|
|
@ -14,8 +14,7 @@ class AddGrowthValueToProductSkusTable extends Migration
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('product_skus', function (Blueprint $table) {
|
Schema::table('product_skus', function (Blueprint $table) {
|
||||||
//
|
$table->unsignedDecimal('sales_value', 18, 2)->default(0.00)->comment('销售值');
|
||||||
$table->unsignedBigInteger('growth_value')->default(0)->comment('等级成长值');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -28,7 +27,7 @@ class AddGrowthValueToProductSkusTable extends Migration
|
||||||
{
|
{
|
||||||
Schema::table('product_skus', function (Blueprint $table) {
|
Schema::table('product_skus', function (Blueprint $table) {
|
||||||
//
|
//
|
||||||
$table->dropColumn('product_skus');
|
$table->dropColumn(['sales_value']);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class AddSalesValueToOrderProductsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('order_products', function (Blueprint $table) {
|
||||||
|
$table->unsignedDecimal('sales_value', 18, 2)->default(0.00)->comment('销售值');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('order_products', function (Blueprint $table) {
|
||||||
|
$table->dropColumn(['sales_value']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class AddSalesValueToOrdersTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('orders', function (Blueprint $table) {
|
||||||
|
$table->unsignedDecimal('sales_value', 18, 2)->default(0.00)->comment('总销售值');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('orders', function (Blueprint $table) {
|
||||||
|
$table->dropColumn(['sales_value']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue