feat(backend): Add DexScreener connector database migration

- Add Alembic migration 85 to add DEXSCREENER_CONNECTOR enum value
- Migration uses IF NOT EXISTS for safe production deployment
- Add integration test script for DexScreener API endpoints
- Verify all endpoints require JWT authentication
- Confirm migration successfully applied (DB version 85)

Story 1.1 Backend: Complete 
- All API endpoints functional (add, delete, test)
- Database schema synchronized
- Integration tests passing
- Ready for Story 1.2 (Frontend UI)
This commit is contained in:
API Test Bot 2026-01-31 17:25:31 +07:00
parent 524d9ab390
commit 8fec08edcd
2 changed files with 164 additions and 0 deletions

View file

@ -0,0 +1,42 @@
"""add dexscreener connector enum
Revision ID: 85_add_dexscreener_connector
Revises: 84_migrate_global_llm_configs_to_auto_mode
Create Date: 2026-01-31 17:14:00.000000
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '85'
down_revision = '84'
branch_labels = None
depends_on = None
def upgrade():
"""Add DEXSCREENER_CONNECTOR to searchsourceconnectortype enum."""
# Add new enum value using raw SQL
# Note: ALTER TYPE ... ADD VALUE cannot be executed inside a transaction block
# Alembic handles this automatically when using op.execute()
op.execute(
"ALTER TYPE searchsourceconnectortype ADD VALUE IF NOT EXISTS 'DEXSCREENER_CONNECTOR'"
)
def downgrade():
"""
Downgrade is not supported for enum value removal in PostgreSQL.
Removing enum values requires:
1. Removing all references to the value
2. Creating a new enum type without the value
3. Migrating all columns to use the new type
4. Dropping the old type
This is complex and risky, so we don't support automatic downgrade.
If you need to remove this enum value, do it manually.
"""
pass