Исправлен пересчет весовых товаров в онлайн реализации
This commit is contained in:
miroman-afk
2023-08-15 10:54:39 +03:00
parent 468cb21e40
commit a7c1679d12
6 changed files with 76 additions and 34 deletions

View File

@@ -0,0 +1,50 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateItemCountAndItemPriceInOrderItemsToFloatV2 extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('order_items', function (Blueprint $table) {
$table->decimal('item_price', $precision = 16, $scale = 2)->nullable()->change();
});
Schema::table('order_items', function (Blueprint $table) {
$table->decimal('item_count', $precision = 16, $scale = 3)->nullable()->change();
});
Schema::table('shift_online_items', function (Blueprint $table) {
$table->decimal('count', $precision = 16, $scale = 3)->nullable()->change();
});
Schema::table('shift_online_deleted', function (Blueprint $table) {
$table->decimal('count', $precision = 16, $scale = 3)->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('order_items', function (Blueprint $table) {
$table->integer('item_price')->nullable()->change();
});
Schema::table('order_items', function (Blueprint $table) {
$table->integer('item_count')->nullable()->change();
});
Schema::table('shift_online_items', function (Blueprint $table) {
$table->decimal('count', $precision = 16, $scale = 2)->nullable()->change();
});
Schema::table('shift_online_deleted', function (Blueprint $table) {
$table->decimal('count', $precision = 16, $scale = 2)->nullable()->change();
});
}
}