mirror of
https://github.com/simple-login/app.git
synced 2024-11-10 17:35:27 +08:00
39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
"""empty message
|
|
|
|
Revision ID: a8d8aa307b8b
|
|
Revises: 3a87573bf8a8
|
|
Create Date: 2019-11-29 23:39:14.352927
|
|
|
|
"""
|
|
import sqlalchemy_utils
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'a8d8aa307b8b'
|
|
down_revision = '3a87573bf8a8'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('custom_domain',
|
|
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
|
sa.Column('created_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=False),
|
|
sa.Column('updated_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=True),
|
|
sa.Column('user_id', sa.Integer(), nullable=False),
|
|
sa.Column('domain', sa.String(length=128), nullable=False),
|
|
sa.Column('verified', sa.Boolean(), nullable=False),
|
|
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='cascade'),
|
|
sa.PrimaryKeyConstraint('id'),
|
|
sa.UniqueConstraint('domain')
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('custom_domain')
|
|
# ### end Alembic commands ###
|