update order_item table

This commit is contained in:
2026-01-29 15:53:02 +08:00
parent 6c933d6e8c
commit 4e21ebfe5f
@@ -28,10 +28,10 @@ return new class extends Migration
WHERE order_items.order_id = orders.id
');
// 设置为非空
Schema::table('order_items', function (Blueprint $table) {
$table->timestampTz('created_date')->nullable(false)->change();
});
// 设置为非空(使用原生 SQL 避免 doctrine/dbal 依赖)
Schema::getConnection()->statement('
ALTER TABLE order_items ALTER COLUMN created_date SET NOT NULL
');
// 添加索引
Schema::table('order_items', function (Blueprint $table) {