From eaea9a91254ea3b950bdee53c938eeaa8a47c695 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Mon, 14 Sep 2009 16:40:56 -0400 Subject: Avoid some ambiguity - Tree.{tree,repodata}_time are IntCol --- israwhidebroken/model.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/israwhidebroken/model.py b/israwhidebroken/model.py index 6e8bcbd..ed75005 100644 --- a/israwhidebroken/model.py +++ b/israwhidebroken/model.py @@ -17,9 +17,12 @@ __connection__ = hub = PackageHub('israwhidebroken') class Tree(SQLObject): arch = StringCol(length=10, notNone=True) - # These could be null if repodata/images are missing - tree_time = DateTimeCol() - repodata_time = DateTimeCol() + # These could be null if repodata/images are missing. + # They're IntCol because I don't want to deal with converting + # between the representation in the file(s) and weirdo datetime + # or timestamp columns. + tree_time = IntCol() + repodata_time = IntCol() # A tree can have many results you might want to look at results = MultipleJoin('TestResult') @@ -43,4 +46,4 @@ class TestResult(SQLObject): # XXX list of bug IDs? bug_id = IntCol() # timestamp this result was entered - timestamp = DateTimeCol(notNone=True) + timestamp = DateTimeCol(notNone=True, default=datetime.now) -- cgit