jackfinal/hyperf-database-dm

hyperf/database 的 dm 驱动程序。

dev-main 2024-06-25 02:00 UTC

This package is not auto-updated.

Last update: 2024-09-17 02:58:09 UTC


README

hyperf-database-dm

hyperf-database-dm 是一个为 Hyperf 提供的 Dm 数据库驱动程序包。hyperf-database-dm 是 Hyperf/Database 的扩展,它使用 DM 扩展与 Dm 进行通信。感谢 @yajra。

文档

Hyperf 版本兼容性

Hyperf
3.1.x3.1.x

快速安装

composer require jackfinal/hyperf-database-dm

配置(可选)

您可以在 .env 文件中设置连接数据

DB_DRIVER=dm
DB_HOST=192.168.45.132
DB_PORT=5236
DB_USERNAME=jack
DB_PASSWORD=1234

然后运行您的 Hyperf 安装...

注意

您可以使用 $table->identity($column, $start = 1, $step = 1) 来替换 $table->bigIncrements('id'); 增量 ID(主键)。

Schema::create('users', function (Blueprint $table) {
  $table->identity('id', 1, 1);
  $table->primary('id');
  $table->datetimes();
  $table->softDeletes();
  $table->comment('Table Comment');
  $table->mediumText('description');  
  $table->string('name', 100);
  $table->text('content');
});

许可证

MIT 许可证(MIT)。有关更多信息,请参阅许可证文件