mirror of
https://github.com/simple-login/app.git
synced 2024-11-18 22:53:27 +08:00
39 lines
1.6 KiB
Python
39 lines
1.6 KiB
Python
"""empty message
|
|
|
|
Revision ID: 0b28518684ae
|
|
Revises: a8d8aa307b8b
|
|
Create Date: 2019-11-30 18:22:02.869387
|
|
|
|
"""
|
|
import sqlalchemy_utils
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '0b28518684ae'
|
|
down_revision = 'a8d8aa307b8b'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_constraint('users_stripe_card_token_key', 'users', type_='unique')
|
|
op.drop_constraint('users_stripe_customer_id_key', 'users', type_='unique')
|
|
op.drop_constraint('users_stripe_subscription_id_key', 'users', type_='unique')
|
|
op.drop_column('users', 'stripe_customer_id')
|
|
op.drop_column('users', 'stripe_card_token')
|
|
op.drop_column('users', 'stripe_subscription_id')
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('users', sa.Column('stripe_subscription_id', sa.VARCHAR(length=128), autoincrement=False, nullable=True))
|
|
op.add_column('users', sa.Column('stripe_card_token', sa.VARCHAR(length=128), autoincrement=False, nullable=True))
|
|
op.add_column('users', sa.Column('stripe_customer_id', sa.VARCHAR(length=128), autoincrement=False, nullable=True))
|
|
op.create_unique_constraint('users_stripe_subscription_id_key', 'users', ['stripe_subscription_id'])
|
|
op.create_unique_constraint('users_stripe_customer_id_key', 'users', ['stripe_customer_id'])
|
|
op.create_unique_constraint('users_stripe_card_token_key', 'users', ['stripe_card_token'])
|
|
# ### end Alembic commands ###
|