mirror of
https://github.com/kennethreitz-archive/www.gittip.com.git
synced 2026-06-19 23:00:57 +00:00
18 lines
812 B
Python
18 lines
812 B
Python
from sqlalchemy.schema import Column, ForeignKey
|
|
from sqlalchemy.types import Integer, Text, TIMESTAMP
|
|
|
|
from gittip.orm import db
|
|
|
|
class Absorption(db.Model):
|
|
__tablename__ = 'absorptions'
|
|
|
|
id = Column(Integer, nullable=False, primary_key=True)
|
|
timestamp = Column(TIMESTAMP(timezone=True), nullable=False,
|
|
default="now()")
|
|
absorbed_was = Column(Text, nullable=False)
|
|
absorbed_by = Column(Text, ForeignKey("participants.id",
|
|
onupdate="CASCADE",
|
|
ondelete="RESTRICT"), nullable=False)
|
|
archived_as = Column(Text, ForeignKey("participants.id",
|
|
onupdate="RESTRICT",
|
|
ondelete="RESTRICT"), nullable=False) |