mirror of
https://github.com/evroon/bracket.git
synced 2026-03-06 08:08:37 -05:00
Drop unique constraint on players.name (#347)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
"""drop unique constraint on players.name
|
||||
|
||||
Revision ID: fa53e635f410
|
||||
Revises: 8bae62f80db7
|
||||
Create Date: 2023-11-25 11:16:18.683799
|
||||
|
||||
"""
|
||||
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str | None = 'fa53e635f410'
|
||||
down_revision: str | None = '8bae62f80db7'
|
||||
branch_labels: str | None = None
|
||||
depends_on: str | None = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index('ix_players_name', table_name='players')
|
||||
op.create_index(op.f('ix_players_name'), 'players', ['name'], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f('ix_players_name'), table_name='players')
|
||||
op.create_index('ix_players_name', 'players', ['name'], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
@@ -134,7 +134,7 @@ players = Table(
|
||||
'players',
|
||||
metadata,
|
||||
Column('id', BigInteger, primary_key=True, index=True),
|
||||
Column('name', String, nullable=False, index=True, unique=True),
|
||||
Column('name', String, nullable=False, index=True),
|
||||
Column('created', DateTimeTZ, nullable=False),
|
||||
Column('tournament_id', BigInteger, ForeignKey('tournaments.id'), index=True, nullable=False),
|
||||
Column('elo_score', Float, nullable=False),
|
||||
|
||||
Reference in New Issue
Block a user