Coverage for watcher/db/sqlalchemy/alembic/versions/52804f2498c4_add_hostname.py: 71%
10 statements
« prev ^ index » next coverage.py v7.8.2, created at 2025-06-17 12:22 +0000
« prev ^ index » next coverage.py v7.8.2, created at 2025-06-17 12:22 +0000
1"""Add hostname field to both Audit and Action Plan models
3Revision ID: 52804f2498c4
4Revises: a86240e89a29
5Create Date: 2018-06-26 13:06:45.530387
7"""
9# revision identifiers, used by Alembic.
10revision = '52804f2498c4'
11down_revision = 'a86240e89a29'
13from alembic import op
14import sqlalchemy as sa
17def upgrade():
18 for table in ('audits', 'action_plans'):
19 op.add_column(
20 table,
21 sa.Column('hostname', sa.String(length=255), nullable=True))
24def downgrade():
25 for table in ('audits', 'action_plans'):
26 op.drop_column(table, 'hostname')