update order_item table
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user