feat: Add status and error fields to TTS model and implement background processing for TTS generations

This commit is contained in:
JSC
2025-09-21 14:39:41 +02:00
parent b2e513a915
commit 72ddd98b25
6 changed files with 365 additions and 3 deletions

View File

@@ -0,0 +1,34 @@
"""Add status and error fields to TTS table
Revision ID: 0d9b7f1c367f
Revises: e617c155eea9
Create Date: 2025-09-21 14:09:56.418372
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '0d9b7f1c367f'
down_revision: Union[str, Sequence[str], None] = 'e617c155eea9'
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('tts', sa.Column('status', sa.String(), nullable=False, server_default='pending'))
op.add_column('tts', sa.Column('error', sa.String(), nullable=True))
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('tts', 'error')
op.drop_column('tts', 'status')
# ### end Alembic commands ###