~sircmpwn/meta.sr.ht

ref: 72548bd7545f78670878667674cc7645835a17bd meta.sr.ht/metasrht/alembic/versions/da70e75bc1a4_add_client_id_to_revocation_urls.py -rw-r--r-- 806 bytes
72548bd7Drew DeVault API: Updates per core-go auth changes 1 year, 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""Add client ID to revocation URLs

Revision ID: da70e75bc1a4
Revises: a73e0b144fd3
Create Date: 2017-04-09 22:38:51.860629

"""

# revision identifiers, used by Alembic.
revision = 'da70e75bc1a4'
down_revision = 'a73e0b144fd3'

from alembic import op
import sqlalchemy as sa


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('revocationurl', sa.Column('client_id', sa.Integer(), nullable=False))
    op.create_foreign_key(None, 'revocationurl', 'oauthclient', ['client_id'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'revocationurl', type_='foreignkey')
    op.drop_column('revocationurl', 'client_id')
    # ### end Alembic commands ###