~sircmpwn/meta.sr.ht

ref: 72548bd7545f78670878667674cc7645835a17bd meta.sr.ht/metasrht/alembic/versions/d950ba31b98d_add_notes_to_users.py -rw-r--r-- 619 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 notes to users

Revision ID: d950ba31b98d
Revises: cb4742f68f2c
Create Date: 2019-03-08 22:49:22.938000

"""

# revision identifiers, used by Alembic.
revision = 'd950ba31b98d'
down_revision = 'cb4742f68f2c'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.create_table('user_notes',
        sa.Column('id', sa.Integer, primary_key=True),
        sa.Column('created', sa.DateTime, nullable=False),
        sa.Column('user_id', sa.Integer,
            sa.ForeignKey('user.id'), nullable=False),
        sa.Column('note', sa.Unicode)
    )


def downgrade():
    op.drop_table('user_notes')