Signed-off-by: ITQ <itq.dev@ya.ru>
This commit is contained in:
ITQ
2025-11-22 11:27:15 +03:00
parent 4e0cbfa328
commit 2dd6e53bf8
3 changed files with 37 additions and 3 deletions
+2 -2
View File
@@ -65,10 +65,10 @@ check:
[group("Migrations")] [group("Migrations")]
[doc("Run alembic upgrade")] [doc("Run alembic upgrade")]
migrations-run tag="head": migrations-run tag="head":
CONFIGURATION_PATH=infrastructure/configs/backend/config.toml alembic upgrade {{tag}} CONFIGURATION_PATH=config.toml alembic upgrade {{tag}}
[no-cd] [no-cd]
[group("Migrations")] [group("Migrations")]
[doc("Create new alembic revision")] [doc("Create new alembic revision")]
migrations-make message="": migrations-make message="":
CONFIGURATION_PATH=infrastructure/configs/backend/config.toml alembic revision --autogenerate -m "{{message}}" CONFIGURATION_PATH=config.toml alembic revision --autogenerate -m "{{message}}"
@@ -0,0 +1,34 @@
"""
Revision ID: 2b2091969d4c
Revises: 2ebcb2592cab
Create Date: 2025-11-22 11:24:36.215215
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '2b2091969d4c'
down_revision: Union[str, Sequence[str], None] = '2ebcb2592cab'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('resume', sa.Column('up_resume_id', sa.UUID(), nullable=True))
op.create_foreign_key(None, 'resume', 'resume', ['up_resume_id'], ['id'], ondelete='CASCADE')
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'resume', type_='foreignkey')
op.drop_column('resume', 'up_resume_id')
# ### end Alembic commands ###
@@ -12,10 +12,10 @@ from template_project.application.common.enums import ExperienceType
from template_project.application.resume.entity import ResumeId from template_project.application.resume.entity import ResumeId
from template_project.application.resume.errors import ResumeDoesBelongUserError, ResumeNotFoundError from template_project.application.resume.errors import ResumeDoesBelongUserError, ResumeNotFoundError
from template_project.application.resume.interactors.add import AddResumeInteractor from template_project.application.resume.interactors.add import AddResumeInteractor
from template_project.application.resume.interactors.edit import EditResumeInteractor
from template_project.application.resume.interactors.get import ( from template_project.application.resume.interactors.get import (
GetResumeInteractor, GetResumeInteractor,
GetResumeListInteractor, GetResumeListInteractor,
ResumeListItemResponse,
) )
security = HTTPBearer() security = HTTPBearer()