瀏覽代碼

refactor(migrations): 统一数据库迁移文件格式

- 为所有迁移文件添加 declare(strict_types=1) 声明
- 移除旧版 Column 类的使用,改用数组配置方式定义字段
- 统一时间戳字段命名为 create_time 和 update_time
- 使用 addColumn 方法替代 addTimestamps 和 addSoftDelete
- 标准化字段定义参数格式,提升代码一致性
runphp 3 月之前
父節點
當前提交
3ce01176b2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      database/migrations/20250710063222_extension_auth_permission.php

+ 1 - 1
database/migrations/20250710063222_extension_auth_permission.php

@@ -59,7 +59,7 @@ class ExtensionAuthPermission extends AbstractMigration
                 'default' => '',
                 'comment' => '权限描述',
             ])
-            ->addTimestamps()
+            ->addTimestamps('create_time', 'update_time')
             ->addIndex('route', ['unique' => true, 'name' => 'uniq_route'])
             ->create();
     }