41 lines
1.3 KiB
Python
41 lines
1.3 KiB
Python
"""empty message
|
|
|
|
Revision ID: b20ee72fd9a4
|
|
Revises: 2fe19381f386
|
|
Create Date: 2019-07-01 13:15:05.391100
|
|
|
|
"""
|
|
import sqlalchemy_utils
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'b20ee72fd9a4'
|
|
down_revision = '2fe19381f386'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('partner',
|
|
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('email', sa.String(length=128), nullable=True),
|
|
sa.Column('name', sa.String(length=128), nullable=True),
|
|
sa.Column('website', sa.String(length=1024), nullable=True),
|
|
sa.Column('additional_information', sa.Text(), nullable=True),
|
|
sa.Column('user_id', sa.Integer(), nullable=True),
|
|
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='cascade'),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('partner')
|
|
# ### end Alembic commands ###
|