FIXED: TODO-1 (created/modifed times)... added now() and trigger for modifications in the postgres db itself, and altered ORM to know its now datetime, not date -- the trigger extension required datetime and its probably more useful anyway
This commit is contained in:
2
README
2
README
@@ -31,8 +31,6 @@ python3 main.py
|
|||||||
MAYBE-1: when moving a book in a series (which is part of 2 series), do we pop-up offer to move parent/child series orders as well to match (think Thomas Covenant)
|
MAYBE-1: when moving a book in a series (which is part of 2 series), do we pop-up offer to move parent/child series orders as well to match (think Thomas Covenant)
|
||||||
|
|
||||||
#### TODOS:
|
#### TODOS:
|
||||||
TODO-1 consider created/modifed for all fields? but mostly are they set via ORM for new books?
|
|
||||||
* No, not being set...
|
|
||||||
TODO-2 need to delete 1 sub_book from book
|
TODO-2 need to delete 1 sub_book from book
|
||||||
* swap the 'add sub book' for 'remove from parent book' button and then act on it (separate route, simple sql exec and route back to (no-longer) child book)
|
* swap the 'add sub book' for 'remove from parent book' button and then act on it (separate route, simple sql exec and route back to (no-longer) child book)
|
||||||
(noting that deleting a child book already removes the book_sub_book_link)
|
(noting that deleting a child book already removes the book_sub_book_link)
|
||||||
|
|||||||
4
main.py
4
main.py
@@ -87,8 +87,8 @@ class Book(db.Model):
|
|||||||
rating = db.Column(db.Integer, db.ForeignKey('rating.id'))
|
rating = db.Column(db.Integer, db.ForeignKey('rating.id'))
|
||||||
notes = db.Column(db.Text)
|
notes = db.Column(db.Text)
|
||||||
blurb = db.Column(db.Text)
|
blurb = db.Column(db.Text)
|
||||||
created = db.Column(db.Date)
|
created = db.Column(db.DateTime)
|
||||||
modified = db.Column(db.Date)
|
modified = db.Column(db.DateTime)
|
||||||
|
|
||||||
# take actual parent book as there is no real associated sub_book_num data and can just use it
|
# take actual parent book as there is no real associated sub_book_num data and can just use it
|
||||||
parent = db.relationship('Book', secondary=Book_Sub_Book_Link.__table__, primaryjoin="Book.id==Book_Sub_Book_Link.sub_book_id", secondaryjoin="Book.id==Book_Sub_Book_Link.book_id" )
|
parent = db.relationship('Book', secondary=Book_Sub_Book_Link.__table__, primaryjoin="Book.id==Book_Sub_Book_Link.sub_book_id", secondaryjoin="Book.id==Book_Sub_Book_Link.book_id" )
|
||||||
|
|||||||
Reference in New Issue
Block a user