Skip to content

Instantly share code, notes, and snippets.

@lolobosse
Created May 3, 2019 14:58
Show Gist options
  • Save lolobosse/897a9e6d2be8cebfb2b3d2c6eff49744 to your computer and use it in GitHub Desktop.
Save lolobosse/897a9e6d2be8cebfb2b3d2c6eff49744 to your computer and use it in GitHub Desktop.
class Task(db.Model):
__tablename__ = 'task_tb'
id = db.Column(db.Integer, primary_key=True)
type = db.Column(db.String(SLen.NAME))
arguments = db.Column(db.String(2000))
created_at = db.Column(db.DateTime, default=func.now())
__table_args__ = (UniqueConstraint('type', 'arguments', name='unique_task'),)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment