← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/kill-bug-private-model into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/kill-bug-private-model into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/kill-bug-private-model/+merge/106104

All bug queries have been updated to use the new sharing schema, so the legacy schema can start to go away. This branch drops Bug._private and Bug._security_related from the model, allowing us to later drop the columns.

I also started dropping BugTask.heat. It was denormalised from Bug for efficient search sorting, but searches are now on BugTaskFlat.
-- 
https://code.launchpad.net/~wgrant/launchpad/kill-bug-private-model/+merge/106104
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/kill-bug-private-model into lp:launchpad.
=== modified file 'lib/lp/bugs/model/bug.py'
--- lib/lp/bugs/model/bug.py	2012-05-11 13:31:27 +0000
+++ lib/lp/bugs/model/bug.py	2012-05-17 04:12:19 +0000
@@ -350,13 +350,10 @@
         dbName='duplicateof', foreignKey='Bug', default=None)
     datecreated = UtcDateTimeCol(notNull=True, default=UTC_NOW)
     date_last_updated = UtcDateTimeCol(notNull=True, default=UTC_NOW)
-    _private = BoolCol(dbName='private', notNull=True, default=False)
     date_made_private = UtcDateTimeCol(notNull=False, default=None)
     who_made_private = ForeignKey(
         dbName='who_made_private', foreignKey='Person',
         storm_validator=validate_public_person, default=None)
-    _security_related = BoolCol(
-        dbName='security_related', notNull=True, default=False)
     information_type = EnumCol(
         enum=InformationType, notNull=True, default=InformationType.PUBLIC)
 
@@ -1784,10 +1781,6 @@
 
         self.information_type = information_type
         self.updateHeat()
-        # Set the legacy attributes for now.
-        self._private = information_type in PRIVATE_INFORMATION_TYPES
-        self._security_related = (
-            information_type in SECURITY_INFORMATION_TYPES)
         return True
 
     def getRequiredSubscribers(self, information_type, who):

=== modified file 'lib/lp/bugs/model/bugtask.py'
--- lib/lp/bugs/model/bugtask.py	2012-05-14 23:59:33 +0000
+++ lib/lp/bugs/model/bugtask.py	2012-05-17 04:12:19 +0000
@@ -507,7 +507,6 @@
         storm_validator=validate_conjoined_attribute)
     date_left_closed = UtcDateTimeCol(notNull=False, default=None,
         storm_validator=validate_conjoined_attribute)
-    heat = IntCol(notNull=True, default=0)
     owner = ForeignKey(
         dbName='owner', foreignKey='Person',
         storm_validator=validate_public_person, notNull=True)


Follow ups