# HG changeset patch # User Marcin Kuzminski # Date 2019-07-03 21:08:33 # Node ID 427b1696fb5a96306dc909366e1163d382ba37fa # Parent 0272016c996f8e71c3d6335f7e81a3f4b1430ffc database: fix migration for mysql. - It's really nice that mysql fails on that dependening on version, and our CI doesn't catch that. diff --git a/rhodecode/lib/dbmigrate/versions/097_version_4_17_0.py b/rhodecode/lib/dbmigrate/versions/097_version_4_17_0.py --- a/rhodecode/lib/dbmigrate/versions/097_version_4_17_0.py +++ b/rhodecode/lib/dbmigrate/versions/097_version_4_17_0.py @@ -4,6 +4,7 @@ import logging from alembic.migration import MigrationContext from alembic.operations import Operations +from sqlalchemy import String from rhodecode.lib.dbmigrate.versions import _reset_base from rhodecode.model import init_model_encryption @@ -28,7 +29,7 @@ def upgrade(migrate_engine): repo_group = db_4_16_0_2.RepoGroup.__table__ with op.batch_alter_table(repo_group.name) as batch_op: - batch_op.alter_column("repo_group_name_hash", nullable=False) + batch_op.alter_column("repo_group_name_hash", type_=String(1024), nullable=False) def downgrade(migrate_engine):