"""empty message

Revision ID: 283dc9256301
Revises: 52e82e7e9376
Create Date: 2017-05-01 22:10:11.649870

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '283dc9256301'
down_revision = '52e82e7e9376'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('provision',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('node_id', sa.Integer(), nullable=False),
    sa.Column('applied_at', sa.DateTime(), nullable=True),
    sa.Column('config_version', sa.Integer(), nullable=False),
    sa.Column('ignition_config', sa.Binary(), nullable=True),
    sa.Column('ipxe_config', sa.Text(), nullable=True),
    sa.ForeignKeyConstraint(['node_id'], ['node.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.drop_column('node', 'active_ignition_config')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('node', sa.Column('active_ignition_config', sa.TEXT(), autoincrement=False, nullable=False))
    op.drop_table('provision')
    # ### end Alembic commands ###
