承接 dmamontov/clickhouse-migrations-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dmamontov/clickhouse-migrations-bundle

最新稳定版本:1.0.5

Composer 安装命令:

composer require dmamontov/clickhouse-migrations-bundle

包简介

Symfony ClickhouseMigrationsBundle

README 文档

README

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

统计信息

  • 总下载量: 16.34k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-01