"Fossies" - the Fresh Open Source Software Archive

Member "indico-2.2.5/indico/migrations/versions/20171101_1149_566d5de4e0e5_add_is_private_column_to_contribution_types.py" (6 Dec 2019, 701 Bytes) of package /linux/www/indico-2.2.5.tar.gz:


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 "20171101_1149_566d5de4e0e5_add_is_private_column_to_contribution_types.py" see the Fossies "Dox" file reference documentation.

    1 """Add is_private column to contribution types table
    2 
    3 Revision ID: 566d5de4e0e5
    4 Revises: 1d512a9ebb30
    5 Create Date: 2017-11-01 11:49:47.532339
    6 """
    7 
    8 import sqlalchemy as sa
    9 from alembic import op
   10 
   11 
   12 # revision identifiers, used by Alembic.
   13 revision = '566d5de4e0e5'
   14 down_revision = '1d512a9ebb30'
   15 branch_labels = None
   16 depends_on = None
   17 
   18 
   19 def upgrade():
   20     op.add_column(
   21         'contribution_types',
   22         sa.Column('is_private', sa.Boolean(), nullable=False, server_default='false'),
   23         schema='events'
   24     )
   25     op.alter_column('contribution_types', 'is_private', server_default=None, schema='events')
   26 
   27 
   28 def downgrade():
   29     op.drop_column('contribution_types', 'is_private', schema='events')