1
0

6a3ed02ee160_new_api_token_internal_access_acl.py 632 B

1234567891011121314151617181920212223242526272829
  1. """empty message
  2. Revision ID: 6a3ed02ee160
  3. Revises: 9cb4580e269a
  4. Create Date: 2018-11-22 14:36:59.024463
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = '6a3ed02ee160'
  10. down_revision = '9cb4580e269a'
  11. def upgrade():
  12. """ Insert the new ACL into the database. """
  13. op.execute(
  14. 'INSERT INTO acls (name, description, created) '
  15. 'VALUES ("internal_access", "Access Pagure internal APIs", NOW());'
  16. )
  17. def downgrade():
  18. """ Remove the added ACL from the database. """
  19. op.execute(
  20. "REMOVE FROM acls WHERE name = 'internal_access';"
  21. )