Mercurial > kallithea
changeset 6319:f4059fe16118
db: rename ChangesetStatus.changeset_comment_id to comment_id
This ensures consistency with the existing "comment" relationship, as
well as the foreign key (ChangesetComment.comment_id).
author | Søren Løvborg <sorenl@unity3d.com> |
---|---|
date | Mon, 19 Sep 2016 14:46:12 +0200 |
parents | 2d216fd7d5a2 |
children | 296581686f02 |
files | kallithea/controllers/changeset.py kallithea/model/db.py |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/changeset.py Mon Sep 19 14:41:11 2016 +0200 +++ b/kallithea/controllers/changeset.py Mon Sep 19 14:46:12 2016 +0200 @@ -257,11 +257,11 @@ 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,
--- a/kallithea/model/db.py Mon Sep 19 14:41:11 2016 +0200 +++ b/kallithea/model/db.py Mon Sep 19 14:46:12 2016 +0200 @@ -2263,7 +2263,7 @@ 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)