37 lines
1.5 KiB
Python
37 lines
1.5 KiB
Python
"""auto
|
|
|
|
Revision ID: 67c4c7974afa
|
|
Revises: 681a78158447
|
|
Create Date: 2026-08-11 13:52:11.674108+00:00
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
import sqlmodel # SQLModel renders AutoString() into migrations but adds no import
|
|
|
|
|
|
revision: str = '67c4c7974afa'
|
|
down_revision: Union[str, None] = '681a78158447'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('inbox_messages', sa.Column('assigned_job_post_id', sa.Uuid(), nullable=True), schema='app')
|
|
op.create_index(op.f('ix_inbox_messages_assigned_job_post_id'), 'inbox_messages', ['assigned_job_post_id'], unique=False, schema='app')
|
|
op.create_foreign_key(op.f('fk_inbox_messages_assigned_job_post_id_job_posts'), 'inbox_messages', 'job_posts', ['assigned_job_post_id'], ['id'], source_schema='app', referent_schema='app')
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_constraint(op.f('fk_inbox_messages_assigned_job_post_id_job_posts'), 'inbox_messages', schema='app', type_='foreignkey')
|
|
op.drop_index(op.f('ix_inbox_messages_assigned_job_post_id'), table_name='inbox_messages', schema='app')
|
|
op.drop_column('inbox_messages', 'assigned_job_post_id', schema='app')
|
|
# ### end Alembic commands ###
|