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
|
WHERE order_items.order_id = orders.id
|
||||||
');
|
');
|
||||||
|
|
||||||
// 设置为非空
|
// 设置为非空(使用原生 SQL 避免 doctrine/dbal 依赖)
|
||||||
Schema::table('order_items', function (Blueprint $table) {
|
Schema::getConnection()->statement('
|
||||||
$table->timestampTz('created_date')->nullable(false)->change();
|
ALTER TABLE order_items ALTER COLUMN created_date SET NOT NULL
|
||||||
});
|
');
|
||||||
|
|
||||||
// 添加索引
|
// 添加索引
|
||||||
Schema::table('order_items', function (Blueprint $table) {
|
Schema::table('order_items', function (Blueprint $table) {
|
||||||
|
|||||||
Reference in New Issue
Block a user