server: add audio_location and move to external storage if possible

This commit is contained in:
2023-11-16 14:34:33 +01:00
committed by Mathieu Virbel
parent 88f443e2c2
commit 06b29d9bd4
5 changed files with 238 additions and 114 deletions

View File

@@ -0,0 +1,43 @@
"""audio_location
Revision ID: f819277e5169
Revises: 4814901632bc
Create Date: 2023-11-16 10:29:09.351664
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = "f819277e5169"
down_revision: Union[str, None] = "4814901632bc"
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(
"transcript",
sa.Column(
"audio_location", sa.String(), server_default="local", nullable=False
),
)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column(
"transcript",
sa.Column(
"share_mode",
sa.VARCHAR(),
server_default=sa.text("'private'"),
nullable=False,
),
)
# ### end Alembic commands ###