29 lines
749 B
Python
29 lines
749 B
Python
"""Add LVM/ZFS metrics fields to host_metrics
|
|
|
|
Revision ID: 0008_add_lvm_zfs_metrics
|
|
Revises: 0007_add_alerts_table
|
|
Create Date: 2025-12-12
|
|
|
|
"""
|
|
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
revision: str = '0008_add_lvm_zfs_metrics'
|
|
down_revision: Union[str, None] = '0007_add_alerts_table'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column('host_metrics', sa.Column('lvm_info', sa.JSON(), nullable=True))
|
|
op.add_column('host_metrics', sa.Column('zfs_info', sa.JSON(), nullable=True))
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column('host_metrics', 'zfs_info')
|
|
op.drop_column('host_metrics', 'lvm_info')
|