diff --git a/sopel/db.py b/sopel/db.py index 8981eefa03..11016213f4 100644 --- a/sopel/db.py +++ b/sopel/db.py @@ -7,7 +7,7 @@ import traceback import typing -from sqlalchemy import Column, create_engine, ForeignKey, Integer, String +from sqlalchemy import Column, create_engine, ForeignKey, Integer, String, Text from sqlalchemy.engine.url import make_url, URL from sqlalchemy.exc import OperationalError, SQLAlchemyError from sqlalchemy.ext.declarative import declarative_base @@ -62,8 +62,8 @@ class NickValues(BASE): __tablename__ = 'nick_values' __table_args__ = MYSQL_TABLE_ARGS nick_id = Column(Integer, ForeignKey('nick_ids.nick_id'), primary_key=True) - key = Column(String(255), primary_key=True) - value = Column(String(255)) + key = Column(Text, primary_key=True) + value = Column(Text) class ChannelValues(BASE): @@ -71,17 +71,17 @@ class ChannelValues(BASE): __tablename__ = 'channel_values' __table_args__ = MYSQL_TABLE_ARGS channel = Column(String(255), primary_key=True) - key = Column(String(255), primary_key=True) - value = Column(String(255)) + key = Column(Text, primary_key=True) + value = Column(Text) class PluginValues(BASE): """Plugin values table SQLAlchemy class.""" __tablename__ = 'plugin_values' __table_args__ = MYSQL_TABLE_ARGS - plugin = Column(String(255), primary_key=True) - key = Column(String(255), primary_key=True) - value = Column(String(255)) + plugin = Column(Text, primary_key=True) + key = Column(Text, primary_key=True) + value = Column(Text) class SopelDB: