From 339cab81cd69a65d9dff9cf032dd67abbe660b99 Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Tue, 7 Nov 2017 11:07:51 +0100 Subject: [PATCH] db: reduce size of fingerprint column for mysql compat. - we can get into troubles by having long fingerprint under mysql because we do an index on this column. --- rhodecode/lib/dbmigrate/schema/db_4_9_0_0.py | 2 +- rhodecode/model/db.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rhodecode/lib/dbmigrate/schema/db_4_9_0_0.py b/rhodecode/lib/dbmigrate/schema/db_4_9_0_0.py index ae98eaa5..ba34c628 100644 --- a/rhodecode/lib/dbmigrate/schema/db_4_9_0_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_4_9_0_0.py @@ -1158,7 +1158,7 @@ class UserSshKeys(Base, BaseModel): ssh_key_id = Column('ssh_key_id', Integer(), nullable=False, unique=True, default=None, primary_key=True) ssh_key_data = Column('ssh_key_data', String(10240), nullable=False, unique=None, default=None) - ssh_key_fingerprint = Column('ssh_key_fingerprint', String(1024), nullable=False, unique=None, default=None) + ssh_key_fingerprint = Column('ssh_key_fingerprint', String(255), nullable=False, unique=None, default=None) description = Column('description', UnicodeText().with_variant(UnicodeText(1024), 'mysql')) diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py index a409006a..391ddab8 100644 --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -1207,7 +1207,7 @@ class UserSshKeys(Base, BaseModel): ssh_key_id = Column('ssh_key_id', Integer(), nullable=False, unique=True, default=None, primary_key=True) ssh_key_data = Column('ssh_key_data', String(10240), nullable=False, unique=None, default=None) - ssh_key_fingerprint = Column('ssh_key_fingerprint', String(1024), nullable=False, unique=None, default=None) + ssh_key_fingerprint = Column('ssh_key_fingerprint', String(255), nullable=False, unique=None, default=None) description = Column('description', UnicodeText().with_variant(UnicodeText(1024), 'mysql'))