# HG changeset patch # User Marcin Kuzminski # Date 2018-04-18 14:32:20 # Node ID caa42fff95f009ef588190df014aee34f5c8380b # Parent dbc112935c0e27e9791e38128d31a70174884cdb db: adjust beaker_cache column size. If this column is created via Beaker itself it uses BLOB for mysql, this can cause some issues with cache sizes not fitting. We move the creation into our script, then it uses proper size. diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -4503,3 +4503,21 @@ class DbSession(Base, BaseModel): accessed = Column('accessed', DateTime, nullable=False) created = Column('created', DateTime, nullable=False) data = Column('data', PickleType, nullable=False) + + + +class BeakerCache(Base, BaseModel): + __tablename__ = 'beaker_cache' + __table_args__ = ( + {'extend_existing': True, 'mysql_engine': 'InnoDB', + 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}, + ) + + def __repr__(self): + return ''.format(self.id) + + id = Column('id', Integer()) + namespace = Column('namespace', String(255), primary_key=True) + accessed = Column('accessed', DateTime, nullable=False) + created = Column('created', DateTime, nullable=False) + data = Column('data', PickleType, nullable=False)