fix(ci): fix alembic DB import and golangci-lint version
- Move Base to app/models/base.py so alembic env.py can import it without triggering engine creation (which connects to hardcoded DB) - Update all 13 models to import Base from app.models.base - Pin golangci-lint to latest (supports Go 1.25) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,8 +9,9 @@ from sqlalchemy import pool
|
||||
from sqlalchemy.engine import Connection
|
||||
from sqlalchemy.ext.asyncio import async_engine_from_config
|
||||
|
||||
# Import all models to register them with Base.metadata
|
||||
from app.database import Base
|
||||
# Import Base without triggering engine creation (app.database creates engines
|
||||
# at module level, which would fail if DATABASE_URL points to a non-existent DB).
|
||||
from app.models.base import Base
|
||||
import app.models.tenant # noqa: F401
|
||||
import app.models.user # noqa: F401
|
||||
import app.models.device # noqa: F401
|
||||
|
||||
Reference in New Issue
Block a user