text: """empty message
  
  Revision ID: 1672e12c53dd
  Revises: a51bfef2da80
  Create Date: 2016-05-18 11:17:18.537921
  
  """
  
  # revision identifiers, used by Alembic.
  revision = '1672e12c53dd'
  down_revision = 'a51bfef2da80'
  
  from alembic import op
  import sqlalchemy as sa
  
  
  tag = sa.Table(
      'tag',
      sa.MetaData(),
      sa.Column('id', sa.Integer, primary_key=True),
      sa.Column('name', sa.String),
      sa.Column('namespace', sa.String),
      sa.Column('user_id', sa.Integer)
  )
  
  
  competency_names = [
      'Delivering Value for Money',
      'Seeing the Big Picture',
      'Changing and Improving',
      'Making Effective Decisions',
      'Leading and Communicating',
      'Collaborating and Partnering',
      'Building Capability for All',
      'Achieving Commercial Outcomes',
      'Managing a Quality Service',
      'Delivering at Pace']
  
  
  def upgrade():
      ### commands auto generated by Alembic - please adjust! ###
      op.add_column('tag', sa.Column('namespace', sa.String(), nullable=True))
      ### end Alembic commands ###
  
      # add competency tags
      for name in competency_names:
          print('inserting {} tag'.format(name))
          op.execute(tag.insert().values(namespace='Competency', name=name))
  
  
  def downgrade():
  
      # remove competency tags
      for name in competency_names:
          op.execute(tag.delete().where(sa.and_(
              tag.c.namespace == 'Competency',
              tag.c.name == name)))
  
      ### commands auto generated by Alembic - please adjust! ###
      op.drop_column('tag', 'namespace')
      ### end Alembic commands ###
  