Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Clean up Goal model a bit; #141
Browse files Browse the repository at this point in the history
The Goal model is only needed right now by the test suite, and there
only to ensure that the database is torn down properly. I'm actually a
little nervous having this object around, because the `goals` table
should be considered immutable. Harumph.
  • Loading branch information
chadwhitacre committed Apr 3, 2013
1 parent 5e69c45 commit b67c222
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions gittip/models/goal.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ class Goal(db.Model):
id = Column(Integer, nullable=False, primary_key=True)
ctime = Column(TIMESTAMP(timezone=True), nullable=False)
mtime = Column(TIMESTAMP(timezone=True), nullable=False, default="now()")
participant = Column(Text, ForeignKey("participants.id", onupdate="CASCADE",
ondelete="RESTRICT"), nullable=False)
amount = Column(Numeric(precision=35, scale=2), nullable=False)
participant = Column(Text
, ForeignKey( "participants.id"
, onupdate="CASCADE"
, ondelete="RESTRICT"
)
, nullable=False
)
goal = Column(Numeric(precision=35, scale=2), nullable=True)

0 comments on commit b67c222

Please sign in to comment.