"Fossies" - the Fresh Open Source Software Archive

Member "mailman-3.3.7/src/mailman/database/alembic/versions/a46993b05703_increase_pendedkeyvalue_value_size.py" (10 Nov 2022, 684 Bytes) of package /linux/misc/mailman-3.3.7.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "a46993b05703_increase_pendedkeyvalue_value_size.py" see the Fossies "Dox" file reference documentation.

    1 """increase pendedkeyvalue value size
    2 
    3 Revision ID: a46993b05703
    4 Revises: 448a93984c35
    5 Create Date: 2016-12-15 20:43:48.520837
    6 
    7 """
    8 
    9 from alembic import op
   10 from mailman.database.types import SAUnicode, SAUnicodeLarge
   11 
   12 
   13 # revision identifiers, used by Alembic.
   14 revision = 'a46993b05703'
   15 down_revision = '448a93984c35'
   16 
   17 
   18 def upgrade():
   19     # Adding another rule can make the rule Hits/Misses too long for MySQL
   20     # SaUnicode.
   21     with op.batch_alter_table('pendedkeyvalue') as batch_op:
   22         batch_op.alter_column('value', type_=SAUnicodeLarge)
   23 
   24 
   25 def downgrade():
   26     with op.batch_alter_table('pendedkeyvalue') as batch_op:
   27         batch_op.alter_column('value', type_=SAUnicode)