mirror of https://github.com/logos-co/open-law.git
add updated_at to BookVersion
This commit is contained in:
parent
4bb616f7d2
commit
299f63d6d2
|
@ -1,3 +1,5 @@
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
from app import db
|
from app import db
|
||||||
from app.models.utils import BaseModel
|
from app.models.utils import BaseModel
|
||||||
|
|
||||||
|
@ -9,6 +11,7 @@ class BookVersion(BaseModel):
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
semver = db.Column(db.String(1024), unique=False, nullable=False)
|
semver = db.Column(db.String(1024), unique=False, nullable=False)
|
||||||
exported = db.Column(db.Boolean, default=False)
|
exported = db.Column(db.Boolean, default=False)
|
||||||
|
updated_at = db.Column(db.DateTime, default=datetime.now)
|
||||||
|
|
||||||
# Foreign keys
|
# Foreign keys
|
||||||
derivative_id = db.Column(db.Integer, db.ForeignKey("book_versions.id"))
|
derivative_id = db.Column(db.Integer, db.ForeignKey("book_versions.id"))
|
||||||
|
|
Loading…
Reference in New Issue