Skip to content

Commit 82e4392

Browse files
committed
fix: add missing changes to migration
1 parent b205c59 commit 82e4392

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

diracx-db/src/diracx/db/sql/job_logging/db.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
from collections import defaultdict
44
from datetime import datetime, timezone
5-
from typing import Iterable, cast
5+
from typing import Iterable
66

7-
from sqlalchemy import Table, delete, func, select
7+
from sqlalchemy import delete, func, insert, select
88

99
from diracx.core.models.job import JobLoggingRecord, JobStatusReturn
1010

@@ -56,7 +56,7 @@ async def insert_records(
5656
seqnums[record.job_id] = seqnums[record.job_id] + 1
5757

5858
await self.conn.execute(
59-
cast(Table, LoggingInfo.__table__).insert(),
59+
insert(LoggingInfo),
6060
values,
6161
)
6262

diracx-db/src/diracx/db/sql/pilot_agents/schema.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from sqlalchemy import (
77
Double,
88
Index,
9+
String,
910
Text,
1011
)
1112
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
@@ -20,7 +21,11 @@
2021

2122

2223
class PilotAgentsDBBase(DeclarativeBase):
23-
pass
24+
type_annotation_map = {
25+
str32: String(32),
26+
str128: String(128),
27+
str255: String(255),
28+
}
2429

2530

2631
class PilotAgents(PilotAgentsDBBase):

0 commit comments

Comments
 (0)