Skip to content

Commit

Permalink
db: use Text where length not limited
Browse files Browse the repository at this point in the history
  • Loading branch information
RhinosF1 authored May 29, 2022
1 parent 36b7c2f commit e4094bb
Showing 1 changed file with 8 additions and 8 deletions.
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

0 comments on commit e4094bb

Please sign in to comment.