feat: restructure menu and add file import
- Consolidate "Add word" menu with submenu (Manual, Thematic, Import) - Add file import support (.txt, .md) with AI batch translation - Add vocabulary pagination with navigation buttons - Add "Add word" button in tasks for new words mode - Fix undefined variables bug in vocabulary confirm handler - Add localization keys for add_menu in ru/en/ja 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
28
migrations/versions/20251205_add_wordsource_ai_task.py
Normal file
28
migrations/versions/20251205_add_wordsource_ai_task.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""add ai_task value to wordsource enum
|
||||
|
||||
Revision ID: 20251205_wordsource_ai_task
|
||||
Revises: 20251205_levels_by_lang
|
||||
Create Date: 2025-12-05
|
||||
"""
|
||||
|
||||
from alembic import op
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '20251205_wordsource_ai_task'
|
||||
down_revision = '20251205_levels_by_lang'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# Добавляем новое значение в enum wordsource
|
||||
# SQLAlchemy отправляет имя enum (uppercase), а не значение
|
||||
op.execute("ALTER TYPE wordsource ADD VALUE IF NOT EXISTS 'AI_TASK'")
|
||||
|
||||
|
||||
def downgrade():
|
||||
# PostgreSQL не поддерживает удаление значений из enum напрямую
|
||||
# Для отката нужно пересоздать enum, что сложно и опасно
|
||||
# Оставляем значение в enum (оно просто не будет использоваться)
|
||||
pass
|
||||
Reference in New Issue
Block a user