Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lnt/server/db/migrations/upgrade_0_to_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ def initialize_compile_definition(session):


def get_base_for_testsuite(test_suite):
UpdatedBase = declarative_base()
UpdatedBase = declarative_base() # type: ignore[misc]
db_key_name = test_suite.db_key_name

class Machine(UpdatedBase):
class Machine(UpdatedBase): # type: ignore[misc,valid-type]
__tablename__ = db_key_name + '_Machine'
# For case sensitive compare.
__table_args__ = {'mysql_collate': 'utf8_bin'}
Expand All @@ -200,7 +200,7 @@ class Machine(UpdatedBase):
class_dict[item.name] = item.column = Column(
item.name, String(256))

class Order(UpdatedBase):
class Order(UpdatedBase): # type: ignore[misc,valid-type]
__tablename__ = db_key_name + '_Order'

id = Column("ID", Integer, primary_key=True)
Expand All @@ -219,7 +219,7 @@ class Order(UpdatedBase):
class_dict[item.name] = item.column = Column(
item.name, String(256))

class Run(UpdatedBase):
class Run(UpdatedBase): # type: ignore[misc,valid-type]
__tablename__ = db_key_name + '_Run'

id = Column("ID", Integer, primary_key=True)
Expand Down Expand Up @@ -247,13 +247,13 @@ class Run(UpdatedBase):
class_dict[item.name] = item.column = Column(
item.name, String(256))

class Test(UpdatedBase):
class Test(UpdatedBase): # type: ignore[misc,valid-type]
__tablename__ = db_key_name + '_Test'
__table_args__ = {'mysql_collate': 'utf8_bin'}
id = Column("ID", Integer, primary_key=True)
name = Column("Name", String(256), unique=True, index=True)

class Sample(UpdatedBase):
class Sample(UpdatedBase): # type: ignore[misc,valid-type]
__tablename__ = db_key_name + '_Sample'

id = Column("ID", Integer, primary_key=True)
Expand Down
Loading