From 1ab9a45d1dee5aa5b87ee249fa4640997629b552 Mon Sep 17 00:00:00 2001 From: chenxi Date: Mon, 5 Oct 2026 11:11:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=91=E9=A2=9D/=E5=8D=95=E4=BB=B7=E5=88=97?= =?UTF-8?q?=E7=B2=BE=E5=BA=A6=E6=8F=90=E5=8D=87=E5=88=B0=208=20=E4=BD=8D?= =?UTF-8?q?=E5=B0=8F=E6=95=B0=EF=BC=88=E5=B1=95=E7=A4=BA=E4=BB=8D=E4=B8=A4?= =?UTF-8?q?=E4=BD=8D=EF=BC=89=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=8E=9F=E5=A7=8B?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E7=B2=BE=E5=BA=A6=E4=B8=A2=E5=A4=B1=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=201=20=E5=88=86=E9=92=B1=E5=B7=AE=E5=BC=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...uct_monthly_weighted_average_precision.php | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 database/migrations/2026_10_05_100000_widen_product_monthly_weighted_average_precision.php diff --git a/database/migrations/2026_10_05_100000_widen_product_monthly_weighted_average_precision.php b/database/migrations/2026_10_05_100000_widen_product_monthly_weighted_average_precision.php new file mode 100644 index 00000000..9b67c2c5 --- /dev/null +++ b/database/migrations/2026_10_05_100000_widen_product_monthly_weighted_average_precision.php @@ -0,0 +1,33 @@ +hasTable('product_monthly_weighted_average_rows')) { + return; + } + + foreach (self::COLUMNS as $column) { + DB::connection($connection)->statement( + "alter table `product_monthly_weighted_average_rows` modify `{$column}` decimal(24,8) null", + ); + } + } + + public function down(): void + { + // 缩放回 4 位会丢失精度,这里保持不回退。 + } +};