feat(database): add schema bootstrap and config
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from sqlalchemy import Column, String, Text, Boolean, JSON, ForeignKey
|
||||
from sqlalchemy import Column, String, Text, Boolean, JSON, ForeignKey, Float, Integer, DateTime
|
||||
from sqlalchemy.orm import relationship
|
||||
from app.models.base import BaseModel
|
||||
|
||||
@@ -17,6 +17,14 @@ class Skill(BaseModel):
|
||||
is_builtin = Column(Boolean, default=False, nullable=False)
|
||||
team_id = Column(String(36), ForeignKey("users.id"), nullable=True)
|
||||
is_active = Column(Boolean, default=True)
|
||||
status = Column(String(20), default="active", nullable=False, index=True) # candidate/shadow/active/deprecated/retired
|
||||
scope = Column(JSON, default=list, nullable=False)
|
||||
effectiveness = Column(Float, default=0.0, nullable=False)
|
||||
review_after = Column(DateTime, nullable=True)
|
||||
candidate_count = Column(Integer, default=0, nullable=False)
|
||||
candidate_source_hashes = Column(JSON, default=list, nullable=False)
|
||||
activation_count = Column(Integer, default=0, nullable=False)
|
||||
last_activated_at = Column(DateTime, nullable=True)
|
||||
owner_id = Column(String(36), ForeignKey("users.id"), nullable=False)
|
||||
|
||||
owner = relationship("User", foreign_keys=[owner_id])
|
||||
|
||||
Reference in New Issue
Block a user