added db migrations and group support, still problems with json serialization
This commit is contained in:
35
migrations/versions/6f980d1e7ac5_.py
Normal file
35
migrations/versions/6f980d1e7ac5_.py
Normal file
@@ -0,0 +1,35 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 6f980d1e7ac5
|
||||
Revises:
|
||||
Create Date: 2019-04-02 13:33:29.319719
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '6f980d1e7ac5'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('groups',
|
||||
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
||||
sa.Column('name', sa.Unicode(length=64), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('name')
|
||||
)
|
||||
op.add_column('user', sa.Column('external_user', sa.Boolean(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('user', 'external_user')
|
||||
op.drop_table('groups')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user