new_contents: """Add RoleState table.
  
  Revision ID: e86b741dc3fc
  Revises: b68e0d8ed9fe
  Create Date: 2017-02-04 14:47:51.072291
  
  """
  from alembic import op
  import sqlalchemy as sa
  from sqlalchemy.dialects import postgresql
  
  # revision identifiers, used by Alembic.
  revision = 'e86b741dc3fc'
  down_revision = 'b68e0d8ed9fe'
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table('rolestate',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('user_id', sa.BigInteger(), nullable=True),
      sa.Column('guild_id', sa.BigInteger(), nullable=False),
      sa.Column('roles', postgresql.ARRAY(sa.Integer()), nullable=True),
      sa.Column('nick', sa.String(), nullable=True),
      sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_table('rolestate')
      # ### end Alembic commands ###
  
subject: Add rolestate migration.