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
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-01