This commit is contained in:
2026-04-01 18:31:33 +02:00
parent 6e23e32bb0
commit b5c7c5305a
95 changed files with 9609 additions and 2374 deletions

View File

@@ -0,0 +1,41 @@
"""add_friendships_table
Revision ID: b989aae3e37d
Revises: de721927ff59
Create Date: 2026-03-28 19:14:54.623287
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = 'b989aae3e37d'
down_revision: Union[str, Sequence[str], None] = 'de721927ff59'
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.create_table('friendships',
sa.Column('id', sa.UUID(), nullable=False),
sa.Column('requester_id', sa.UUID(), nullable=False),
sa.Column('addressee_id', sa.UUID(), nullable=False),
sa.Column('status', sa.String(), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(['addressee_id'], ['users.id'], ),
sa.ForeignKeyConstraint(['requester_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('friendships')
# ### end Alembic commands ###