Приложение для тестирования сотрудников клиники методом один вопрос - до пяти ответов один из которых правильный. Сотрудник должен выбрать правильный вариант ответа
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
679 B

"""test versioning
Revision ID: 003
Revises: 002
Create Date: 2026-03-21
"""
from typing import Sequence, Union
import sqlalchemy as sa
from alembic import op
revision: str = "003"
down_revision: Union[str, None] = "002"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
op.add_column(
"tests",
sa.Column("parent_id", sa.Integer(), sa.ForeignKey("tests.id"), nullable=True),
)
op.create_index("ix_tests_parent_id", "tests", ["parent_id"])
def downgrade() -> None:
op.drop_index("ix_tests_parent_id", table_name="tests")
op.drop_column("tests", "parent_id")