# HG changeset patch # User Marcin Kuzminski # Date 2017-07-26 08:29:43 # Node ID 28cc3daf3e589f6d8e7acccc44dd21f1491689e2 # Parent b63bd7fe922248a450c19cbe00d157fe92dd0620 db: fix migration after sqlalchemy upgrade diff --git a/rhodecode/lib/dbmigrate/versions/048_version_3_8_0.py b/rhodecode/lib/dbmigrate/versions/048_version_3_8_0.py --- a/rhodecode/lib/dbmigrate/versions/048_version_3_8_0.py +++ b/rhodecode/lib/dbmigrate/versions/048_version_3_8_0.py @@ -46,7 +46,8 @@ def upgrade(migrate_engine): if repo_name_idx in repo_name_indexes: batch_op.drop_index(repo_name_idx) for name in repo_name_constraints: - batch_op.drop_constraint(name, type_='unique') + if name: # sqlite can have this empty, then it raises an error + batch_op.drop_constraint(name, type_='unique') batch_op.alter_column(repo_name_column.name, type_=Text) batch_op.alter_column(clone_uri_column.name, type_=Text)