Merge pull request #770 from dod-ccpo/make-email-non-unique

User no longer has Unique Email
This commit is contained in:
montana-mil 2019-04-17 11:59:30 -04:00 committed by GitHub
commit ec3d4f518f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 1 deletions

View 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 ###

View File

@ -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)