remove User.is_developer column

This commit is contained in:
Son NK 2019-07-23 22:59:56 +02:00 committed by Son NK
parent 06f51099a5
commit bde3edaf56
2 changed files with 29 additions and 1 deletions

View File

@ -111,7 +111,6 @@ class User(db.Model, ModelMixin, UserMixin):
stripe_subscription_id = db.Column(db.String(128), unique=True)
profile_picture_id = db.Column(db.ForeignKey(File.id), nullable=True)
is_developer = db.Column(db.Boolean, nullable=False, server_default="0")
# contain the list of promo codes user has used. Promo codes are separated by ","
promo_codes = db.Column(db.Text, nullable=True)

View File

@ -0,0 +1,29 @@
"""empty message
Revision ID: 1b7d161d1012
Revises: c6e7fc37ad42
Create Date: 2019-07-23 22:58:59.673800
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1b7d161d1012'
down_revision = 'c6e7fc37ad42'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('users', 'is_developer')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('users', sa.Column('is_developer', sa.BOOLEAN(), server_default=sa.text('false'), autoincrement=False, nullable=False))
# ### end Alembic commands ###