~sircmpwn/meta.sr.ht

ref: 72548bd7545f78670878667674cc7645835a17bd meta.sr.ht/metasrht/alembic/versions/7505107f9372_add_invite_table.py -rw-r--r-- 952 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
29
30
"""Add invite table

Revision ID: 7505107f9372
Revises: e3dc9b1bcf42
Create Date: 2017-04-06 18:46:25.124808

"""

# revision identifiers, used by Alembic.
revision = '7505107f9372'
down_revision = 'e3dc9b1bcf42'

from alembic import op
import sqlalchemy as sa


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('invite', sa.Column('invite_hash', sa.String(length=128), nullable=True))
    op.drop_column('invite', 'confirmation_hash')
    op.drop_column('invite', 'email')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('invite', sa.Column('email', sa.VARCHAR(length=256), autoincrement=False, nullable=False))
    op.add_column('invite', sa.Column('confirmation_hash', sa.VARCHAR(length=128), autoincrement=False, nullable=True))
    op.drop_column('invite', 'invite_hash')
    # ### end Alembic commands ###