Merge pull request #770 from dod-ccpo/make-email-non-unique
User no longer has Unique Email
This commit is contained in:
commit
ec3d4f518f
28
alembic/versions/1880551a32e4_user_email_no_longer_unique.py
Normal file
28
alembic/versions/1880551a32e4_user_email_no_longer_unique.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""User email no longer unique
|
||||
|
||||
Revision ID: 1880551a32e4
|
||||
Revises: 014e4bceb947
|
||||
Create Date: 2019-04-17 10:59:10.262137
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '1880551a32e4'
|
||||
down_revision = '014e4bceb947'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_constraint('users_email_key', 'users', type_='unique')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_unique_constraint('users_email_key', 'users', ['email'])
|
||||
# ### end Alembic commands ###
|
@ -31,7 +31,7 @@ class User(
|
||||
primaryjoin="and_(ApplicationRole.user_id==User.id, ApplicationRole.deleted==False)",
|
||||
)
|
||||
|
||||
email = Column(String, unique=True)
|
||||
email = Column(String)
|
||||
dod_id = Column(String, unique=True, nullable=False)
|
||||
first_name = Column(String)
|
||||
last_name = Column(String)
|
||||
|
Loading…
x
Reference in New Issue
Block a user