Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork16
Laravel ClickHouse adds CH client integration, generation & execution of ClickHouse database migrations to the Laravel application.
License
cybercog/laravel-clickhouse
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Laravel ClickHouse database integration.This package includes generation and execution of the ClickHouse database migrations in the Laravel application.
- smi2/phpClickHouse client integration
- Migration creation
- Migration execution
Pull in the package throughComposer.
composer require cybercog/laravel-clickhouse
Add environment variables in.env file.
CLICKHOUSE_HOST=localhostCLICKHOUSE_PORT=8123CLICKHOUSE_USER=defaultCLICKHOUSE_PASSWORD=CLICKHOUSE_DATABASE=default
Publish ClickHouse configuration.
php artisan vendor:publish --provider="Cog\Laravel\Clickhouse\ClickhouseServiceProvider" --tag=configEditconfig/clickhouse.php file.
You can use a singleton objectsmi2/phpClickHouse to query ClickHouse:
app(\ClickHouseDB\Client::class)->select(/* Query */);app(\ClickHouseDB\Client::class)->write(/* Query */);
php artisan make:clickhouse-migration create_example_table
New migration will be created in
database/clickhouse-migrationsdirectory.
php artisan clickhouse:migrate
To remove the interactive question during production migrations, you can use--force option.
php artisan clickhouse:migrate --force
You can specify how many files need to be applied:
php artisan clickhouse:migrate --step=1
Value
0is default — all files
Rolling back migrations is intentionally unavailable. Migrations should go only forward.
Detailed changes for each release are documented in theCHANGELOG.md.
Laravel ClickHousepackage is open-sourced software licensed under theMIT license byAnton Komarev.
CyberCog is a Social Unity of enthusiasts. Research the best solutions in product & software development is our passion.
About
Laravel ClickHouse adds CH client integration, generation & execution of ClickHouse database migrations to the Laravel application.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.

