diff rhodecode/model/db.py @ 2286:9265958e33bb codereview

Show changes of status inside comments - comments that change status are now associated with status object, and showed in comments blocks
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 17 May 2012 00:02:52 +0200
parents c9e3ea5bb59a
children 8447d35b674e
line wrap: on
line diff
--- a/rhodecode/model/db.py	Wed May 16 23:17:13 2012 +0200
+++ b/rhodecode/model/db.py	Thu May 17 00:02:52 2012 +0200
@@ -1211,6 +1211,7 @@
 
     author = relationship('User', lazy='joined')
     repo = relationship('Repository')
+    status_change = relationship('ChangesetStatus', uselist=False)
 
     @classmethod
     def get_users(cls, revision):
@@ -1247,10 +1248,12 @@
     user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None)
     revision = Column('revision', String(40), nullable=False)
     status = Column('status', String(128), nullable=False, default=DEFAULT)
+    changeset_comment_id = Column('changeset_comment_id', Integer(), ForeignKey('changeset_comments.comment_id'))
     modified_at = Column('modified_at', DateTime(), nullable=False, default=datetime.datetime.now)
 
     author = relationship('User', lazy='joined')
     repo = relationship('Repository')
+    comment = relationship('ChangesetComment', lazy='joined')
 
     @property
     def status_lbl(self):