Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db: use Text where length not limited #2292

Closed
wants to merge 1 commit into from
Closed
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
16 changes: 8 additions & 8 deletions sopel/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -62,26 +62,26 @@ 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):
"""Channel values table SQLAlchemy class."""
__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:
Expand Down