old_contents: """permissions
  
  Revision ID: 32b12866f6a2
  Revises: e025de45166e
  Create Date: 2021-05-03 10:18:09.206486
  
  """
  from pathlib import Path
  from alembic import op
  import sqlalchemy as sa
  
  
  # revision identifiers, used by Alembic.
  revision = '32b12866f6a2'
  down_revision = 'e025de45166e'
  branch_labels = None
  depends_on = 'e025de45166e'
  
  migration_path = Path(__file__)
  migration_sql_path = migration_path.parent.parent / 'sql'
  migration_sql_file = migration_path.with_suffix('.sql').name
  
  upgrade_sql = migration_sql_path / 'upgrade' / migration_sql_file
  downgrade_sql = migration_sql_path / 'downgrade' / migration_sql_file
  
  def upgrade():
      print('===>>> Executing ', upgrade_sql)
      with open(upgrade_sql, 'r') as fp:
          op.execute(fp.read())
  
  def downgrade():
      print('===>>> Executing ', downgrade_sql)
      with open(downgrade_sql, 'r') as fp:
          op.execute(fp.read())
  
new_contents: """permissions
  
  Revision ID: 32b12866f6a2
  Revises: e025de45166e
  Create Date: 2021-05-03 10:18:09.206486
  
  """
  from pathlib import Path
  from alembic import op
  import sqlalchemy as sa
  
  
  # revision identifiers, used by Alembic.
  revision = '32b12866f6a2'
  down_revision = 'e025de45166e'
  branch_labels = None
  depends_on = None
  
  migration_path = Path(__file__)
  migration_sql_path = migration_path.parent.parent / 'sql'
  migration_sql_file = migration_path.with_suffix('.sql').name
  
  upgrade_sql = migration_sql_path / 'upgrade' / migration_sql_file
  downgrade_sql = migration_sql_path / 'downgrade' / migration_sql_file
  
  def upgrade():
      print('===>>> Executing ', upgrade_sql)
      with open(upgrade_sql, 'r') as fp:
          op.execute(fp.read())
  
  def downgrade():
      print('===>>> Executing ', downgrade_sql)
      with open(downgrade_sql, 'r') as fp:
          op.execute(fp.read())
  
subject: fix for https://github.com/sqlalchemy/alembic/issues/843