29 lines
647 B
Python
29 lines
647 B
Python
"""thumbnail format setting (jpg | png)
|
|
|
|
Revision ID: 006
|
|
Revises: 005
|
|
Create Date: 2026-03-01
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
from alembic import op
|
|
|
|
revision: str = "006"
|
|
down_revision: Union[str, None] = "005"
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.execute(
|
|
"INSERT INTO system_settings (key, value, updated_at) VALUES "
|
|
"('thumbnail_format', 'jpg', NOW()) "
|
|
"ON CONFLICT (key) DO NOTHING"
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.execute(
|
|
"DELETE FROM system_settings WHERE key = 'thumbnail_format'"
|
|
)
|