
# revision identifiers, used by Alembic.
revision = '849170064430'
down_revision = 'a63df077051a'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.add_column('smtpserver', sa.Column('enqueue_job', sa.Boolean(), nullable=False, server_default=sa.false()))


def downgrade():
    op.drop_column('smtpserver', 'enqueue_job')


# revision identifiers, used by Alembic.
revision = '849170064430'
down_revision = 'a63df077051a'

from alembic import op
import sqlalchemy as sa


def upgrade():
    try:
        op.add_column('smtpserver', sa.Column('enqueue_job', sa.Boolean(), nullable=False, server_default=sa.false()))
    except Exception as exx:
        print("Could not add column 'smtpserver.enqueue_job'")
        print(exx)


def downgrade():
    op.drop_column('smtpserver', 'enqueue_job')

Add try-except block to queue migration script
Add try-except block to queue migration script

  
  # revision identifiers, used by Alembic.
  revision = '849170064430'
  down_revision = 'a63df077051a'
  
  from alembic import op
  import sqlalchemy as sa
  
  
  def upgrade():
+     try:
-     op.add_column('smtpserver', sa.Column('enqueue_job', sa.Boolean(), nullable=False, server_default=sa.false()))
+         op.add_column('smtpserver', sa.Column('enqueue_job', sa.Boolean(), nullable=False, server_default=sa.false()))
+     except Exception as exx:
+         print("Could not add column 'smtpserver.enqueue_job'")
+         print(exx)
  
  
  def downgrade():
      op.drop_column('smtpserver', 'enqueue_job')
  
Add try-except block to queue migration script
## Code Before:

# revision identifiers, used by Alembic.
revision = '849170064430'
down_revision = 'a63df077051a'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.add_column('smtpserver', sa.Column('enqueue_job', sa.Boolean(), nullable=False, server_default=sa.false()))


def downgrade():
    op.drop_column('smtpserver', 'enqueue_job')

## Instruction:
Add try-except block to queue migration script
## Code After:

# revision identifiers, used by Alembic.
revision = '849170064430'
down_revision = 'a63df077051a'

from alembic import op
import sqlalchemy as sa


def upgrade():
    try:
        op.add_column('smtpserver', sa.Column('enqueue_job', sa.Boolean(), nullable=False, server_default=sa.false()))
    except Exception as exx:
        print("Could not add column 'smtpserver.enqueue_job'")
        print(exx)


def downgrade():
    op.drop_column('smtpserver', 'enqueue_job')
