fix(comments): address code review feedback

- Add onupdate=sa.func.now() to migration updated_at columns
- Use UserProfile.is_blocked.is_(False) instead of == False
- Fix British to American spelling (organised → organized)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/DocuElevate/sessions/3894af37-0f19-457b-8811-f1feb18b17ef
This commit is contained in:
copilot-swe-agent[bot]
2026-03-21 18:30:05 +00:00
parent ad795e200a
commit 4b6412734b
3 changed files with 5 additions and 10 deletions
@@ -34,7 +34,7 @@ def upgrade() -> None:
sa.Column("mentions", sa.Text(), nullable=True),
sa.Column("is_resolved", sa.Boolean(), nullable=False, server_default="0"),
sa.Column("created_at", sa.DateTime(timezone=True), server_default=sa.func.now()),
sa.Column("updated_at", sa.DateTime(timezone=True), server_default=sa.func.now()),
sa.Column("updated_at", sa.DateTime(timezone=True), server_default=sa.func.now(), onupdate=sa.func.now()),
sa.ForeignKeyConstraint(["file_id"], ["files.id"]),
sa.ForeignKeyConstraint(["parent_id"], ["document_comments.id"]),
sa.PrimaryKeyConstraint("id"),
@@ -59,7 +59,7 @@ def upgrade() -> None:
sa.Column("annotation_type", sa.String(50), nullable=False, server_default="note"),
sa.Column("color", sa.String(20), nullable=True),
sa.Column("created_at", sa.DateTime(timezone=True), server_default=sa.func.now()),
sa.Column("updated_at", sa.DateTime(timezone=True), server_default=sa.func.now()),
sa.Column("updated_at", sa.DateTime(timezone=True), server_default=sa.func.now(), onupdate=sa.func.now()),
sa.ForeignKeyConstraint(["file_id"], ["files.id"]),
sa.PrimaryKeyConstraint("id"),
)