Really change character set of statistics_meta table to utf8 (#56029)

pull/56058/head
Erik Montnemery 2021-09-09 22:55:51 +02:00 committed by GitHub
parent 1fd3faf766
commit 2a8121bdcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -238,7 +238,6 @@ class Statistics(Base): # type: ignore
__table_args__ = (
# Used for fetching statistics for a certain entity at a specific time
Index("ix_statistics_statistic_id_start", "metadata_id", "start"),
{"mysql_default_charset": "utf8mb4", "mysql_collate": "utf8mb4_unicode_ci"},
)
__tablename__ = TABLE_STATISTICS
id = Column(Integer, primary_key=True)
@ -279,6 +278,9 @@ class StatisticMetaData(TypedDict, total=False):
class StatisticsMeta(Base): # type: ignore
"""Statistics meta data."""
__table_args__ = (
{"mysql_default_charset": "utf8mb4", "mysql_collate": "utf8mb4_unicode_ci"},
)
__tablename__ = TABLE_STATISTICS_META
id = Column(Integer, primary_key=True)
statistic_id = Column(String(255), index=True)