diff --git a/kallithea/controllers/changeset.py b/kallithea/controllers/changeset.py --- a/kallithea/controllers/changeset.py +++ b/kallithea/controllers/changeset.py @@ -257,11 +257,11 @@ class ChangesetController(BaseRepoContro revision=changeset.raw_id)) # Status change comments - mostly from pull requests - comments.update((st.changeset_comment_id, st.comment) + comments.update((st.comment_id, st.comment) for st in ChangesetStatusModel() .get_statuses(c.db_repo.repo_id, changeset.raw_id, with_revisions=True) - if st.changeset_comment_id is not None) + if st.comment_id is not None) inlines = ChangesetCommentsModel() \ .get_inline_comments(c.db_repo.repo_id, diff --git a/kallithea/model/db.py b/kallithea/model/db.py --- a/kallithea/model/db.py +++ b/kallithea/model/db.py @@ -2263,7 +2263,7 @@ class ChangesetStatus(Base, BaseDbModel) user_id = Column(Integer(), ForeignKey('users.user_id'), nullable=False) revision = Column(String(40), nullable=True) status = Column(String(128), nullable=False, default=DEFAULT) - changeset_comment_id = Column(Integer(), ForeignKey('changeset_comments.comment_id'), nullable=False) + comment_id = Column('changeset_comment_id', Integer(), ForeignKey('changeset_comments.comment_id'), nullable=False) modified_at = Column(DateTime(), nullable=False, default=datetime.datetime.now) version = Column(Integer(), nullable=False, default=0) pull_request_id = Column(Integer(), ForeignKey('pull_requests.pull_request_id'), nullable=True)