42 lines
1.3 KiB
Python
42 lines
1.3 KiB
Python
"""Adding notifications
|
|
|
|
Revision ID: 4c8915e461b3
|
|
Revises: 3b718f59b8ce
|
|
Create Date: 2015-07-24 14:34:57.316273
|
|
|
|
"""
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '4c8915e461b3'
|
|
down_revision = '3b718f59b8ce'
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.dialects import postgresql
|
|
|
|
import sqlalchemy_utils
|
|
|
|
|
|
def upgrade():
|
|
### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('notifications',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('label', sa.String(length=128), nullable=True),
|
|
sa.Column('description', sa.Text(), nullable=True),
|
|
sa.Column('options', sqlalchemy_utils.types.json.JSONType(), nullable=True),
|
|
sa.Column('active', sa.Boolean(), nullable=True),
|
|
sa.Column('plugin_name', sa.String(length=32), nullable=True),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
op.drop_column(u'certificates', 'challenge')
|
|
op.drop_column(u'certificates', 'csr_config')
|
|
### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column(u'certificates', sa.Column('csr_config', sa.TEXT(), autoincrement=False, nullable=True))
|
|
op.add_column(u'certificates', sa.Column('challenge', postgresql.BYTEA(), autoincrement=False, nullable=True))
|
|
op.drop_table('notifications')
|
|
### end Alembic commands ###
|