定制 mavlitov98/clickhouse-migrations 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

mavlitov98/clickhouse-migrations

最新稳定版本:v1.0.0

Composer 安装命令:

composer require mavlitov98/clickhouse-migrations

包简介

README 文档

README

ClickhouseMigrationsBundle

psalm level psalm type coverage

This bundle integrates the Clickhouse Migrations 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.

Installation

composer require mavlitov98/clickhouse-migrations

If you don't use Symfony Flex, you must enable the bundle manually in the application:

// config/bundles.php
// in older Symfony apps, enable the bundle in app/AppKernel.php
return [
    // ...
    ClickhouseMigrations\ClickhouseMigrationsBundle::class => ['all' => true],
];

Configuration

# in config/packages/clickhouse_migrations.yaml

clickhouse_migrations:
  connection: # connection configuration (required)
    host: '%env(CLICKHOUSE_HOST)%'
    port: '%env(CLICKHOUSE_PORT)%'
    username: '%env(CLICKHOUSE_USERNAME)%'
    password: '%env(CLICKHOUSE_PASSWORD)%'
  clickhouse_migrations_version_table: 'ch_migrations' # version table name (optional)
  clickhouse_migrations_path: '%kernel.project_dir%/src/Migrations/Clickhouse' # migration path (optional)
  clickhouse_migrations_namespace: 'App\\Migrations\\Clickhouse' # migration class namespace (optional)

Commands

Generate new migration for ClickHouse:

php bin/console clickhouse-migrations:generate

Apply all generated migrations to ClickHouse:

php bin/console clickhouse-migrations:migrate

Apply or rollback ClickHouse migration:

php bin/console clickhouse-migrations:execute [VersionXXXXXXXXXXXXXX] [up|down]

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-13