fix(models): add explicit enum names to match migration types
SQLAlchemy's Enum() auto-generates type names from Python class names (e.g., AutonomyLevel -> autonomylevel), but migrations defined them with underscores (e.g., autonomy_level). This mismatch caused: "type 'autonomylevel' does not exist" Added explicit name parameters to all enum columns to match the migration-defined type names: - autonomy_level, project_status, project_complexity, client_mode - agent_status, sprint_status - issue_type, issue_status, issue_priority, sync_status 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,28 +35,28 @@ class Project(Base, UUIDMixin, TimestampMixin):
|
||||
description = Column(Text, nullable=True)
|
||||
|
||||
autonomy_level: Column[AutonomyLevel] = Column(
|
||||
Enum(AutonomyLevel),
|
||||
Enum(AutonomyLevel, name="autonomy_level"),
|
||||
default=AutonomyLevel.MILESTONE,
|
||||
nullable=False,
|
||||
index=True,
|
||||
)
|
||||
|
||||
status: Column[ProjectStatus] = Column(
|
||||
Enum(ProjectStatus),
|
||||
Enum(ProjectStatus, name="project_status"),
|
||||
default=ProjectStatus.ACTIVE,
|
||||
nullable=False,
|
||||
index=True,
|
||||
)
|
||||
|
||||
complexity: Column[ProjectComplexity] = Column(
|
||||
Enum(ProjectComplexity),
|
||||
Enum(ProjectComplexity, name="project_complexity"),
|
||||
default=ProjectComplexity.MEDIUM,
|
||||
nullable=False,
|
||||
index=True,
|
||||
)
|
||||
|
||||
client_mode: Column[ClientMode] = Column(
|
||||
Enum(ClientMode),
|
||||
Enum(ClientMode, name="client_mode"),
|
||||
default=ClientMode.AUTO,
|
||||
nullable=False,
|
||||
index=True,
|
||||
|
||||
Reference in New Issue
Block a user