"""Add trusted execution fields to vms table

Revision ID: 2543def8f601
Revises: e682fc8f9506
Create Date: 2024-07-02 13:19:10.675168

"""

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "2543def8f601"
down_revision = "e682fc8f9506"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "vms",
        sa.Column("environment_trusted_execution_policy", sa.Integer(), nullable=True),
    )
    op.add_column(
        "vms",
        sa.Column("environment_trusted_execution_firmware", sa.String(), nullable=True),
    )
    op.add_column(
        "vms",
        sa.Column("node_hash", sa.String(), nullable=True),
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("vms", "environment_trusted_execution_firmware")
    op.drop_column("vms", "environment_trusted_execution_policy")
    op.drop_column("vms", "node_hash")

    # ### end Alembic commands ###
