fix: add missing timestamps to ssh_keys model
SSHKey model was missing created_at/updated_at columns which the API response model expected. Add TimestampMixin and Alembic migration.
This commit is contained in:
@@ -5,14 +5,14 @@ from sqlalchemy import ForeignKey, String, Text
|
||||
from sqlalchemy import Uuid as UUID
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
|
||||
from src.models.base import Base, UUIDPrimaryKeyMixin
|
||||
from src.models.base import Base, TimestampMixin, UUIDPrimaryKeyMixin
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from src.models.project import Project
|
||||
from src.models.user import User
|
||||
|
||||
|
||||
class SSHKey(UUIDPrimaryKeyMixin, Base):
|
||||
class SSHKey(UUIDPrimaryKeyMixin, TimestampMixin, Base):
|
||||
__tablename__ = "ssh_keys"
|
||||
|
||||
name: Mapped[str] = mapped_column(String(255))
|
||||
|
||||
Reference in New Issue
Block a user