Initial commit: Pixel AI comic/video creation platform
- FastAPI backend with SQLModel, Alembic migrations, AgentScope agents - Next.js 15 frontend with React 19, Tailwind, Zustand, React Flow - Multi-provider AI system (DashScope, Kling, MiniMax, Volcengine, OpenAI, etc.) - All HTTP clients migrated from sync requests to async httpx - Admin-managed API keys via environment variables - SSRF vulnerability fixed in ensure_url()
This commit is contained in:
34
backend/alembic/versions/rename_style_preset_to_style_id.py
Normal file
34
backend/alembic/versions/rename_style_preset_to_style_id.py
Normal file
@@ -0,0 +1,34 @@
|
||||
"""rename style_preset to style_id
|
||||
|
||||
Revision ID: rename_style_preset
|
||||
Revises: add_cinematic_fields, add_provider_to_tasks
|
||||
Create Date: 2024-02-11
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from typing import Union, Sequence
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'rename_style_preset'
|
||||
down_revision: Union[str, Sequence[str], None] = ('add_cinematic_fields', 'add_provider_to_tasks')
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
"""Rename style_preset column to style_id in projects table"""
|
||||
# SQLite doesn't support ALTER COLUMN RENAME directly
|
||||
# We need to use a workaround with table recreation
|
||||
|
||||
with op.batch_alter_table('projects', schema=None) as batch_op:
|
||||
# Rename the column
|
||||
batch_op.alter_column('style_preset', new_column_name='style_id')
|
||||
|
||||
|
||||
def downgrade():
|
||||
"""Revert style_id column back to style_preset"""
|
||||
with op.batch_alter_table('projects', schema=None) as batch_op:
|
||||
# Rename back
|
||||
batch_op.alter_column('style_id', new_column_name='style_preset')
|
||||
Reference in New Issue
Block a user