Skip to content

Commit

Permalink
fix: remove social columns.
Browse files Browse the repository at this point in the history
Closes issue #2017
  • Loading branch information
teleyinex committed Feb 27, 2021
1 parent 90c434f commit 6309bcd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
26 changes: 26 additions & 0 deletions alembic/versions/31c3c2ff9fab_drop_social_network_logins.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""drop social network logins
Revision ID: 31c3c2ff9fab
Revises: a791f9de9ac3
Create Date: 2021-02-27 10:17:17.122501
"""

# revision identifiers, used by Alembic.
revision = '31c3c2ff9fab'
down_revision = 'a791f9de9ac3'

from alembic import op
import sqlalchemy as sa


def upgrade():
op.drop_column('user', 'twitter_user_id')
op.drop_column('user', 'google_user_id')
op.drop_column('user', 'facebook_user_id')


def downgrade():
op.add_column('user', sa.Column('twitter_user_id', sa.BigInteger, unique=True))
op.add_column('user', sa.Column('google_user_id', sa.BigInteger, unique=True))
op.add_column('user', sa.Column('facebook_user_id', sa.BigInteger, unique=True))
3 changes: 0 additions & 3 deletions pybossa/model/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ class User(db.Model, DomainObject, UserMixin):
restrict = Column(Boolean, default=False, nullable=False)
category = Column(Integer)
flags = Column(Integer)
twitter_user_id = Column(BigInteger, unique=True)
facebook_user_id = Column(BigInteger, unique=True)
google_user_id = Column(String, unique=True)
ckan_api = Column(String, unique=True)
newsletter_prompted = Column(Boolean, default=False)
valid_email = Column(Boolean, default=False)
Expand Down

0 comments on commit 6309bcd

Please sign in to comment.