"""empty message

Revision ID: 4fa2340e9beb
Revises: 4d1350114aac
Create Date: 2015-07-02 18:02:58.662899

"""

# revision identifiers, used by Alembic.
revision = '4fa2340e9beb'
down_revision = '4d1350114aac'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        'org_id_to_cloudify_with_limits',
        sa.Column('id', sa.String(), nullable=False),
        sa.Column('org_id', sa.String(),
                  sa.ForeignKey("allowed_org_ids.org_id"), nullable=False),
        sa.Column('deployment_limits', sa.Integer(), nullable=True),
        sa.Column('number_of_deployments', sa.Integer(), nullable=True),
        sa.Column('cloudify_host', sa.String(), nullable=True),
        sa.Column('cloudify_port', sa.String(), nullable=True),
        sa.Column('created_at', sa.Date(), nullable=True),
        sa.Column('updated_at', sa.Date(), nullable=True),
        sa.PrimaryKeyConstraint('id'),
        sa.UniqueConstraint('org_id'),
    )
    op.add_column(u'allowed_org_ids',
                  sa.Column('created_at',
                            sa.Date(), nullable=True))
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_column(u'allowed_org_ids', 'created_at')
    op.drop_table('org_id_to_cloudify_with_limits')
    ### end Alembic commands ###
