Verified Commit 958edb61 authored by Peter Stanko's avatar Peter Stanko
Browse files

Adds migration for the project config

parent bf295171
Pipeline #32268 passed with stage
in 7 minutes and 48 seconds
"""empty message
Revision ID: 95c279617916
Revises: 61787ca3cab6
Create Date: 2019-05-12 22:24:31.092439
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '95c279617916'
down_revision = '61787ca3cab6'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint('client_codename_key', 'client', type_='unique')
op.add_column('projectConfig', sa.Column('config_file', sa.String(length=50), nullable=True))
op.add_column('projectConfig', sa.Column('config_subdir', sa.String(length=50), nullable=True))
op.drop_column('projectConfig', 'submission_scheduler_config')
op.drop_column('projectConfig', 'post_submit_script')
op.drop_column('projectConfig', 'pre_submit_script')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('projectConfig', sa.Column('pre_submit_script', sa.TEXT(), autoincrement=False, nullable=True))
op.add_column('projectConfig', sa.Column('post_submit_script', sa.TEXT(), autoincrement=False, nullable=True))
op.add_column('projectConfig', sa.Column('submission_scheduler_config', sa.TEXT(), autoincrement=False, nullable=True))
op.drop_column('projectConfig', 'config_subdir')
op.drop_column('projectConfig', 'config_file')
op.create_unique_constraint('client_codename_key', 'client', ['codename'])
# ### end Alembic commands ###
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment