Database Migrations for ClickHouse.
Project description
Houseplant: Database Migrations for ClickHouse
Houseplant is a CLI tool that helps you manage database migrations for ClickHouse.
Here's how you can manage your ClickHouse migrations.
$ houseplant init ✨ Project initialized successfully! $ houseplant generate "add events" ✨ Generated migration: ch/migrations/20240101000000_add_events.yml $ houseplant migrate:status Database: june_development ┏━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓ ┃ Status ┃ Migration ID ┃ Migration Name ┃ ┡━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩ │ up │ 20240101000000 │ add events │ └────────┴────────────────┴────────────────┘ $ houseplant migrate ✓ Applied migration 20241121003230_add_events.yml $ houseplant migrate:up VERSION=20241121003230 ✓ Applied migration 20241121003230_add_events.yml $ houseplant migrate:down VERSION=20241121003230 ✓ Rolled back migration 20241121003230_add_events.yml
Why Houseplant?
- Schema Management: Houseplant automatically tracks and manages your ClickHouse schema changes, making it easy to evolve your data model over time
- Developer Experience: Write migrations in YAML format, making them easy to read, review, and maintain
- Environment Support: Different configurations for development, testing, and production environments
- Rich CLI: Comes with an intuitive command-line interface for all migration operations
Installation
You can install Houseplant using pip:
$ pip install houseplant
Configuration
Houseplant uses the following environment variables to connect to your ClickHouse instance:
HOUSEPLANT_ENV: The current environmentCLICKHOUSE_HOST: Host address of your ClickHouse server (default: "localhost")CLICKHOUSE_PORT: Port number for ClickHouse (default: 9000)CLICKHOUSE_DB: Database name (default: "development")CLICKHOUSE_USER: Username for authentication (default: "default")CLICKHOUSE_PASSWORD: Password for authentication (default: "")CLICKHOUSE_SECURE: Enable secure connection via thesecureflag of ClickHouse client (default: False)CLICKHOUSE_VERIFY: Enable certificate verifiactionverifyflag of ClickHouse client (default: False)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file houseplant-0.2.5.tar.gz.
File metadata
- Download URL: houseplant-0.2.5.tar.gz
- Upload date:
- Size: 298.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ea20288e44738b091836c80b8ce4b1bdfc7edc9044895e3835b7edb8c0a051a
|
|
| MD5 |
c95b59a517e06876e06ea0492066c514
|
|
| BLAKE2b-256 |
bee17a29d5c0b182ecb6a5b4e44adfffc68a91dbee727684f82ba44b8f99b587
|
Provenance
The following attestation bundles were made for houseplant-0.2.5.tar.gz:
Publisher:
release.yml on juneHQ/houseplant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
houseplant-0.2.5.tar.gz -
Subject digest:
1ea20288e44738b091836c80b8ce4b1bdfc7edc9044895e3835b7edb8c0a051a - Sigstore transparency entry: 175091056
- Sigstore integration time:
-
Permalink:
juneHQ/houseplant@8511058682363e0a1a380721500ff7037fbf2957 -
Branch / Tag:
refs/tags/v0.2.5 - Owner: https://github.com/juneHQ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8511058682363e0a1a380721500ff7037fbf2957 -
Trigger Event:
push
-
Statement type:
File details
Details for the file houseplant-0.2.5-py3-none-any.whl.
File metadata
- Download URL: houseplant-0.2.5-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe45a3b00e5642a02acd725bd8e5c05aa2322da750b699be0a4ae08d1247c6da
|
|
| MD5 |
a78e66d2a64e1cbd532e7dcb5b160fcd
|
|
| BLAKE2b-256 |
4d44db2311424f2a1d0526796164f2878385daeb93f0f424c290f023e229b73f
|
Provenance
The following attestation bundles were made for houseplant-0.2.5-py3-none-any.whl:
Publisher:
release.yml on juneHQ/houseplant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
houseplant-0.2.5-py3-none-any.whl -
Subject digest:
fe45a3b00e5642a02acd725bd8e5c05aa2322da750b699be0a4ae08d1247c6da - Sigstore transparency entry: 175091058
- Sigstore integration time:
-
Permalink:
juneHQ/houseplant@8511058682363e0a1a380721500ff7037fbf2957 -
Branch / Tag:
refs/tags/v0.2.5 - Owner: https://github.com/juneHQ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8511058682363e0a1a380721500ff7037fbf2957 -
Trigger Event:
push
-
Statement type: