launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #27749
[Merge] ~cjwatson/launchpad:misc-jobs-dbenum into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:misc-jobs-dbenum into launchpad:master.
Commit message:
Use DBEnum rather than EnumCol in various jobs
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/412126
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:misc-jobs-dbenum into launchpad:master.
diff --git a/lib/lp/answers/model/questionjob.py b/lib/lp/answers/model/questionjob.py
index 2967daf..7a11475 100644
--- a/lib/lp/answers/model/questionjob.py
+++ b/lib/lp/answers/model/questionjob.py
@@ -34,7 +34,7 @@ from lp.answers.interfaces.questionjob import (
from lp.answers.model.question import Question
from lp.registry.interfaces.person import IPersonSet
from lp.services.config import config
-from lp.services.database.enumcol import EnumCol
+from lp.services.database.enumcol import DBEnum
from lp.services.database.interfaces import IMasterStore
from lp.services.database.stormbase import StormBase
from lp.services.job.model.job import Job
@@ -61,7 +61,7 @@ class QuestionJob(StormBase):
job_id = Int(name='job')
job = Reference(job_id, Job.id)
- job_type = EnumCol(enum=QuestionJobType, notNull=True)
+ job_type = DBEnum(enum=QuestionJobType, allow_none=False)
question_id = Int(name='question')
question = Reference(question_id, Question.id)
diff --git a/lib/lp/charms/model/charmrecipebuildjob.py b/lib/lp/charms/model/charmrecipebuildjob.py
index a0f7993..dba0e4a 100644
--- a/lib/lp/charms/model/charmrecipebuildjob.py
+++ b/lib/lp/charms/model/charmrecipebuildjob.py
@@ -46,7 +46,7 @@ from lp.charms.interfaces.charmrecipebuildjob import (
)
from lp.charms.mail.charmrecipebuild import CharmRecipeBuildMailer
from lp.services.config import config
-from lp.services.database.enumcol import EnumCol
+from lp.services.database.enumcol import DBEnum
from lp.services.database.interfaces import (
IMasterStore,
IStore,
@@ -83,7 +83,7 @@ class CharmRecipeBuildJob(StormBase):
build_id = Int(name="build", allow_none=False)
build = Reference(build_id, "CharmRecipeBuild.id")
- job_type = EnumCol(enum=CharmRecipeBuildJobType, notNull=True)
+ job_type = DBEnum(enum=CharmRecipeBuildJobType, allow_none=False)
metadata = JSON("json_data", allow_none=False)
diff --git a/lib/lp/oci/model/ocirecipejob.py b/lib/lp/oci/model/ocirecipejob.py
index 1f604a9..33f3429 100644
--- a/lib/lp/oci/model/ocirecipejob.py
+++ b/lib/lp/oci/model/ocirecipejob.py
@@ -42,7 +42,7 @@ from lp.registry.interfaces.person import IPersonSet
from lp.services.config import config
from lp.services.database.bulk import load_related
from lp.services.database.decoratedresultset import DecoratedResultSet
-from lp.services.database.enumcol import EnumCol
+from lp.services.database.enumcol import DBEnum
from lp.services.database.interfaces import (
IMasterStore,
IStore,
@@ -81,7 +81,7 @@ class OCIRecipeJob(StormBase):
recipe_id = Int(name='recipe', allow_none=False)
recipe = Reference(recipe_id, 'OCIRecipe.id')
- job_type = EnumCol(enum=OCIRecipeJobType, notNull=True)
+ job_type = DBEnum(enum=OCIRecipeJobType, allow_none=False)
metadata = JSON('json_data', allow_none=False)