Skip to content

Implement an extra large column type for the pendedkeyvalue.value table.

Mark Sapiro requested to merge msapiro/mailman:pending into master

I need help with this. I am trying to implement a larger column width for the value column in the pendedkeyvalue table for MySQL. The issue is in the current code this column is indexed and for MySQL with large VARCHAR or TEXT columns, the index must be a smaller prefix. The current state of this branch is I removed the index=True argument from the column definition in mailman.model.pending.py. That actually works, but migration tests fail because there's a migration that adds the index on upgrade and drops it on downgrade.

So I would like to add the index with something like SQLAlchemy's

Index('ix_pendedkeyvalue_value', Table.c.value, mysql_length=100)

(see http://docs.sqlalchemy.org/en/latest/dialects/mysql.html#index-length) but I can't find the actual Table object to use there.

Can anyone help with this?

Update: With a big help from @maxking I think this branch is ready to be merged. But there is an issue. First flake8 3.5.0 complains about bare except: of which there are 5, so I added # noqa: E722 on those 5 bare except: clauses and now diffcov complains that 3 of those 5 lines aren't covered. I suppose I could try to add tests for them - sigh ...

Edited by Mark Sapiro

Merge request reports