"""0002_изменил_поле_даты_приема_на_датувремя

Revision ID: f28580d2d60f
Revises: b10579618fb5
Create Date: 2025-03-11 14:44:43.322192

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'f28580d2d60f'
down_revision: Union[str, None] = 'b10579618fb5'
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.add_column('appointments', sa.Column('appointment_datetime', sa.DateTime(), server_default=sa.text('now()'), nullable=False))
    op.drop_column('appointments', 'date')
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('appointments', sa.Column('date', sa.DATE(), server_default=sa.text('now()'), autoincrement=False, nullable=False))
    op.drop_column('appointments', 'appointment_datetime')
    # ### end Alembic commands ###
