text: """Add user_acls join table
  
  Revision ID: 886b65e82e3e
  Revises: d0195eb7ecd0
  Create Date: 2020-10-28 13:22:14.699026
  
  """
  from alembic import op
  import sqlalchemy as sa
  
  
  # revision identifiers, used by Alembic.
  revision = '886b65e82e3e'
  down_revision = 'd0195eb7ecd0'
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table(
          'user_acls',
          sa.Column('created_at', sa.DateTime(), nullable=False),
          sa.Column('modified', sa.DateTime(), nullable=False),
          sa.Column('user_id', sa.Integer(), nullable=False),
          sa.Column('acl_id', sa.String(), nullable=False),
          sa.ForeignKeyConstraint(['acl_id'], ['acls.id'], ondelete='CASCADE'),
          sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='CASCADE'),
          sa.PrimaryKeyConstraint('user_id', 'acl_id'),
      )
      op.create_index(
          'user_acls_reverse_ind', 'user_acls', ['acl_id', 'user_id'], unique=False
      )
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_index('user_acls_reverse_ind', table_name='user_acls')
      op.drop_table('user_acls')
      # ### end Alembic commands ###
  