Skip to content

Commit cbaba94

Browse files
committed
Create workflow_runs table
1 parent 44d223e commit cbaba94

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/databricks/labs/ucx/progress/install.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ def __init__(self, sql_backend: SqlBackend, ucx_catalog: str) -> None:
4747

4848
def run(self) -> None:
4949
self._schema_deployer.deploy_schema()
50+
self._schema_deployer.deploy_table("workflow_runs", WorkflowRun)
5051
logger.info("Installation completed successfully!")

tests/unit/progress/test_install.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,10 @@ def test_history_installation_run_creates_history_schema(mock_backend) -> None:
55
installation = HistoryInstallation(mock_backend, "ucx")
66
installation.run()
77
assert "CREATE SCHEMA IF NOT EXISTS ucx.history" in mock_backend.queries[0]
8+
9+
10+
def test_history_installation_run_creates_workflow_runs_table(mock_backend) -> None:
11+
installation = HistoryInstallation(mock_backend, "ucx")
12+
installation.run()
13+
# Dataclass to schema conversion is tested within the lsql package
14+
assert any("CREATE TABLE IF NOT EXISTS" in query for query in mock_backend.queries)

0 commit comments

Comments
 (0)