mirror of
https://github.com/markbeep/AudioBookRequest.git
synced 2026-04-29 21:09:15 -05:00
add missing migration
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
"""add succ/failed event type
|
||||
|
||||
Revision ID: 76d7ccb8a116
|
||||
Revises: 497b4366eb45
|
||||
Create Date: 2025-03-08 21:48:18.673994
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "76d7ccb8a116"
|
||||
down_revision: Union[str, None] = "497b4366eb45"
|
||||
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! ###
|
||||
with op.batch_alter_table("notification", schema=None) as batch_op:
|
||||
batch_op.alter_column(
|
||||
"event",
|
||||
existing_type=sa.VARCHAR(length=14),
|
||||
type_=sa.Enum(
|
||||
"on_new_request",
|
||||
"on_successful_download",
|
||||
"on_failed_download",
|
||||
name="eventenum",
|
||||
),
|
||||
existing_nullable=False,
|
||||
)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table("notification", schema=None) as batch_op:
|
||||
batch_op.alter_column(
|
||||
"event",
|
||||
existing_type=sa.Enum(
|
||||
"on_new_request",
|
||||
"on_successful_download",
|
||||
"on_failed_download",
|
||||
name="eventenum",
|
||||
),
|
||||
type_=sa.VARCHAR(length=14),
|
||||
existing_nullable=False,
|
||||
)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user