"""empty message

Revision ID: 9a65898a0e2f
Revises: aa55bedebb6f
Create Date: 2017-04-30 12:04:42.566828

"""
from alembic import op
import sqlalchemy as sa

from seedbox import config


# revision identifiers, used by Alembic.
revision = '9a65898a0e2f'
down_revision = 'aa55bedebb6f'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('cluster', sa.Column('coreos_channel', sa.String(length=80), nullable=False,
                                       server_default=config.default_coreos_channel))
    op.alter_column('cluster', 'coreos_channel', server_default=None)
    op.add_column('cluster', sa.Column('coreos_version', sa.String(length=80), nullable=False,
                                       server_default=config.default_coreos_version))
    op.alter_column('cluster', 'coreos_version', server_default=None)
    op.alter_column('cluster', 'boot_images_base_url', new_column_name='custom_coreos_images_base_url')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('cluster', 'custom_coreos_images_base_url', new_column_name='boot_images_base_url')
    op.drop_column('cluster', 'coreos_version')
    op.drop_column('cluster', 'coreos_channel')
    # ### end Alembic commands ###
