"""unique constraint for data

Revision ID: 40cd8d3e798e
Revises: 7390745388e4
Create Date: 2025-04-06 17:55:47.709956

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '40cd8d3e798e'
down_revision: Union[str, None] = '7390745388e4'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint('uq_datas_composite', 'datas', ['date', 'stock'])
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('uq_datas_composite', 'datas', type_='unique')
    # ### end Alembic commands ###
