"""org_subscription_required

Revision: 0039
Revision ID: 9f215a58d65
Revises: 448178393554
Create Date: 2015-11-29 11:27:51.279717

"""

# revision identifiers, used by Alembic.
revision = '9f215a58d65'
down_revision = '448178393554'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

def upgrade():
    op.add_column('organizations', sa.Column('subscription_required', sa.Boolean(), nullable=True))
    op.add_column('organizations', sa.Column('payment_method', sa.String(), nullable=True))
    op.execute("UPDATE organizations SET subscription_required = true, payment_method = 'stripe'")


def downgrade():
    op.drop_column('organizations', 'subscription_required')
    op.drop_column('organizations', 'payment_method')