<filename>apis/alembic/versions/467fc59e6a76_add_project_owner.py<gh_stars>1-10
"""add project owner

Revision ID: 467fc59e6a76
Revises: 252ce5626f65
Create Date: 2021-04-09 11:03:30.072623

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = '467fc59e6a76'
down_revision = '252ce5626f65'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('projects', sa.Column('owner', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'projects', 'user', ['owner'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'projects', type_='foreignkey')
    op.drop_column('projects', 'owner')
    # ### end Alembic commands ###

<filename>apis/alembic/versions/467fc59e6a76_add_project_owner.py<gh_stars>1-10
"""add project owner

Revision ID: 467fc59e6a76
Revises: 252ce5626f65
Create Date: 2021-04-09 11:03:30.072623

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = '467fc59e6a76'
down_revision = '252ce5626f65'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('projects', sa.Column('owner', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'projects', 'user', ['owner'], ['id'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'projects', type_='foreignkey')
    op.drop_column('projects', 'owner')
    # ### end Alembic commands ###

add project owner  Revision ID: 467fc59e6a76 Revises: 252ce5626f65 Create Date: 2021-04-09 11:03:30.072623 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###