Renamed the "original_id" column to "offset_original_id", and the "original" and "offset" relationships to "offset_original" and "offsets", respectively, in the JournalEntry data model.
This commit is contained in:
parent
c95f4fcc47
commit
c26c4686c5
@ -597,14 +597,14 @@ class JournalEntry(db.Model):
|
|||||||
"""True for a debit entry, or False for a credit entry."""
|
"""True for a debit entry, or False for a credit entry."""
|
||||||
no = db.Column(db.Integer, nullable=False)
|
no = db.Column(db.Integer, nullable=False)
|
||||||
"""The entry number under the transaction and debit or credit."""
|
"""The entry number under the transaction and debit or credit."""
|
||||||
original_id = db.Column(db.Integer,
|
offset_original_id = db.Column(db.Integer,
|
||||||
db.ForeignKey(id, onupdate="CASCADE"),
|
db.ForeignKey(id, onupdate="CASCADE"),
|
||||||
nullable=True)
|
nullable=True)
|
||||||
"""The ID of the original entry when offsetting."""
|
"""The ID of the original entry to offset."""
|
||||||
original = db.relationship("JournalEntry", back_populates="offset",
|
offset_original = db.relationship("JournalEntry", back_populates="offsets",
|
||||||
remote_side=id, passive_deletes=True)
|
remote_side=id, passive_deletes=True)
|
||||||
"""The original entry when offsetting."""
|
"""The original entry to offset."""
|
||||||
offset = db.relationship("JournalEntry", back_populates="original")
|
offsets = db.relationship("JournalEntry", back_populates="offset_original")
|
||||||
"""The offset entries."""
|
"""The offset entries."""
|
||||||
currency_code = db.Column(db.String,
|
currency_code = db.Column(db.String,
|
||||||
db.ForeignKey(Currency.code, onupdate="CASCADE"),
|
db.ForeignKey(Currency.code, onupdate="CASCADE"),
|
||||||
|
Loading…
Reference in New Issue
Block a user