add updated_at to BookVersion

This commit is contained in:
SvyatoslavArtymovych 2023-04-21 16:13:43 +03:00
parent 4bb616f7d2
commit 299f63d6d2
1 changed files with 3 additions and 0 deletions

View File

@ -1,3 +1,5 @@
from datetime import datetime
from app import db
from app.models.utils import BaseModel
@ -9,6 +11,7 @@ class BookVersion(BaseModel):
id = db.Column(db.Integer, primary_key=True)
semver = db.Column(db.String(1024), unique=False, nullable=False)
exported = db.Column(db.Boolean, default=False)
updated_at = db.Column(db.DateTime, default=datetime.now)
# Foreign keys
derivative_id = db.Column(db.Integer, db.ForeignKey("book_versions.id"))