36 lines
1.3 KiB
Python
36 lines
1.3 KiB
Python
"""Physical legacy schema helpers for recovery fingerprint tests."""
|
|
|
|
from sqlalchemy.engine import Connection
|
|
|
|
|
|
def recreate_0038_benchmark_runs(connection: Connection) -> None:
|
|
"""Replace metadata's current table with the physical pre-0039 benchmark shape."""
|
|
connection.exec_driver_sql("DROP TABLE benchmark_runs")
|
|
connection.exec_driver_sql(
|
|
"""
|
|
CREATE TABLE benchmark_runs (
|
|
id CHAR(32) NOT NULL,
|
|
deployment_id CHAR(32) NOT NULL,
|
|
suite_id CHAR(32) NOT NULL,
|
|
model_revision_sha VARCHAR(64) NOT NULL,
|
|
artifact_sha256 VARCHAR(64) NOT NULL,
|
|
runtime_type VARCHAR(32) NOT NULL,
|
|
runtime_version VARCHAR(128) NOT NULL,
|
|
runtime_image_digest VARCHAR(71),
|
|
launch_arguments JSON NOT NULL,
|
|
suite_revision VARCHAR(128) NOT NULL,
|
|
dataset_revision VARCHAR(255) NOT NULL,
|
|
environment_fingerprint JSON NOT NULL,
|
|
environment_digest VARCHAR(64) NOT NULL,
|
|
seed INTEGER,
|
|
results JSON NOT NULL,
|
|
status VARCHAR(32) NOT NULL,
|
|
comparable BOOLEAN NOT NULL,
|
|
stale_reason TEXT,
|
|
started_at DATETIME NOT NULL,
|
|
completed_at DATETIME,
|
|
PRIMARY KEY (id)
|
|
)
|
|
"""
|
|
)
|