Skip to content

Commit

Permalink
Removed 'unique' constraint from user_identity field.
Browse files Browse the repository at this point in the history
Signed-off-by: Tomislaw <[email protected]>
  • Loading branch information
Tomislaw committed Sep 13, 2024
1 parent 7e8b47e commit 4413908
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/odr_core/odr_core/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class User(Base):
id = Column(Integer, primary_key=True, index=True)
username = Column(String, unique=True, index=True)
email = Column(String, unique=True, index=True)
identity_provider = Column(String, unique=True, index=True, default="omi")
identity_provider = Column(String, index=True, default="omi")
hashed_password = Column(String)
is_active = Column(Boolean, default=True)
is_superuser = Column(Boolean, default=False)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def upgrade() -> None:
op.add_column('users', sa.Column('identity_provider', sa.String(), nullable=True))
# set default value for identity_provider
op.execute("UPDATE users SET identity_provider = 'omi'")
op.create_index(op.f('ix_users_identity_provider'), 'users', ['identity_provider'], unique=True)
op.create_index(op.f('ix_users_identity_provider'), 'users', ['identity_provider'])
# ### end Alembic commands ###


Expand Down

0 comments on commit 4413908

Please sign in to comment.