完善skills;测试用例生成页面功能初步实现
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
"""add interface fields to srs requirements
|
||||
|
||||
Revision ID: b7217f0c3d92
|
||||
Revises: a4f9c89b7d11
|
||||
Create Date: 2026-04-18 19:10:00.000000
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "b7217f0c3d92"
|
||||
down_revision: Union[str, None] = "a4f9c89b7d11"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column("srs_requirements", sa.Column("section_uid", sa.String(length=64), nullable=True))
|
||||
op.add_column("srs_requirements", sa.Column("interface_name", sa.String(length=255), nullable=True))
|
||||
op.add_column("srs_requirements", sa.Column("interface_type", sa.String(length=128), nullable=True))
|
||||
op.add_column("srs_requirements", sa.Column("data_source", sa.String(length=255), nullable=True))
|
||||
op.add_column("srs_requirements", sa.Column("data_destination", sa.String(length=255), nullable=True))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("srs_requirements", "data_destination")
|
||||
op.drop_column("srs_requirements", "data_source")
|
||||
op.drop_column("srs_requirements", "interface_type")
|
||||
op.drop_column("srs_requirements", "interface_name")
|
||||
op.drop_column("srs_requirements", "section_uid")
|
||||
@@ -0,0 +1,59 @@
|
||||
"""add testing generation history table
|
||||
|
||||
Revision ID: c9f6e7a1bd34
|
||||
Revises: b7217f0c3d92
|
||||
Create Date: 2026-04-26 20:30:00.000000
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "c9f6e7a1bd34"
|
||||
down_revision: Union[str, None] = "b7217f0c3d92"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.create_table(
|
||||
"testing_generations",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("job_id", sa.Integer(), nullable=False),
|
||||
sa.Column("source_job_id", sa.Integer(), nullable=True),
|
||||
sa.Column("source_document_name", sa.String(length=255), nullable=False),
|
||||
sa.Column("generated_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("total_requirements", sa.Integer(), nullable=False, server_default="0"),
|
||||
sa.Column("knowledge_base_id", sa.Integer(), nullable=True),
|
||||
sa.Column("generated_file", sa.JSON(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("updated_at", sa.DateTime(), nullable=False),
|
||||
sa.ForeignKeyConstraint(["job_id"], ["tool_jobs.id"], ondelete="CASCADE"),
|
||||
sa.ForeignKeyConstraint(["knowledge_base_id"], ["knowledge_bases.id"]),
|
||||
sa.ForeignKeyConstraint(["source_job_id"], ["tool_jobs.id"]),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint("job_id"),
|
||||
)
|
||||
op.create_index(op.f("ix_testing_generations_id"), "testing_generations", ["id"], unique=False)
|
||||
op.create_index(
|
||||
op.f("ix_testing_generations_source_job_id"),
|
||||
"testing_generations",
|
||||
["source_job_id"],
|
||||
unique=False,
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_testing_generations_knowledge_base_id"),
|
||||
"testing_generations",
|
||||
["knowledge_base_id"],
|
||||
unique=False,
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_index(op.f("ix_testing_generations_knowledge_base_id"), table_name="testing_generations")
|
||||
op.drop_index(op.f("ix_testing_generations_source_job_id"), table_name="testing_generations")
|
||||
op.drop_index(op.f("ix_testing_generations_id"), table_name="testing_generations")
|
||||
op.drop_table("testing_generations")
|
||||
Reference in New Issue
Block a user