getghostr/cockroachdb-laravel
最新稳定版本:v0.5.0
Composer 安装命令:
composer require getghostr/cockroachdb-laravel
包简介
Simple CockroachDB driver for Laravel 6+
README 文档
README
Simple CockroachDB driver for Laravel 6+
Installation
You can install the package via composer:
composer require getghostr/cockroachdb-laravel
Usage
Step 1
If you're not using package discovery please add the following to your providers array in config/app.php:
Ghostr\Cockroach\CockroachServiceProvider::class,
Step 2
Head over to your config/database.php and add the following to your connections array:
'cockroach' => [ 'driver' => 'cockroach', 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '5432'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', 'prefix_indexes' => true, 'schema' => 'public', 'sslmode' => 'prefer', ],
Special features
Index stored columns
This package adds support for index stored columns
They can be declared in migrations like so:
Schema::table('my_table', function (Blueprint $table) { // Single stored column $table->index('col1')->storing('col2'); // Multiple stored columns $table->index('col1')->storing(['col2', 'col3']) })
NOTE: Index name generation is unaffected by stored columns
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 9.23k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-01-28