feat: rename activities; keep original Garmin title as a tag
Add Activity.original_name (migrated via init_db ALTER). The rename endpoint stores the import title the first time a user renames and clears it if renamed back. Activity detail page gets inline rename (pencil) UI and shows the original title beneath the new name; the activities list shows it as a small tag too. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -91,6 +91,7 @@ class Activity(Base):
|
||||
id = Column(Integer, primary_key=True)
|
||||
user_id = Column(Integer, ForeignKey("users.id"), nullable=False, index=True)
|
||||
name = Column(String(256), nullable=False)
|
||||
original_name = Column(String(256), nullable=True) # Garmin/import title, kept when user renames
|
||||
sport_type = Column(String(64), nullable=False)
|
||||
start_time = Column(DateTime(timezone=True), nullable=False, index=True)
|
||||
end_time = Column(DateTime(timezone=True), nullable=True)
|
||||
|
||||
Reference in New Issue
Block a user