Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Clickhouse Migrations Bundle Laravel Package

dmamontov/clickhouse-migrations-bundle

View on GitHub
Deep Wiki
Context7

ClickhouseMigrationsBundle

This bundle added the migrations system for clickhouse type Databases into Symfony applications. Database migrations help you version the changes in your database schema and apply them in a predictable way on every server running the application.

Install

composer require dmamontov/clickhouse-migrations-bundle

Clickhouse connection

For use this bundle you need set clickhouse Client as Symfony service. As example:

#config/services.yaml
services:
    ClickHouseDB\Client:
        arguments:
            $connectParams:
                host: 'http://localhost'
                port: 8123
                username: 'username'
                password: ''
                sslCA: 'path_to_ssl_cert'
            $settings:
                database: 'default'

More details about ClickHouseDB\Client settings.

Settings

If you need set migrations, set clickhouse migrations configuration. But this is not necessary, these settings are set by default:

#config/packages/clickhouse_migrations.yaml
clickhouse_migrations:
    table_name: 'migrations_versions'
    migrations_path: '%kernel.project_dir%/clickhouse_migrations'
    migrations_namespace: 'ClickhouseMigrations'

Using

Generate new migration class:

bin/console clickhouse:migrations:generate

Execute all unapplied migrations up:

bin/console clickhouse:migrations:migrate

One last migration down:

bin/console clickhouse:migrations:migrate down
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours