Example #1
0
 def query(self):
     return AccountingOperationUpload.query().options(
         load_only(
             AccountingOperationUpload.id,
             AccountingOperationUpload.created_at,
             AccountingOperationUpload.date,
             AccountingOperationUpload.filename,
         ))
def migrate_datas():
    from autonomie_base.models.base import DBSESSION
    session = DBSESSION()
    from autonomie.models.accounting.operations import AccountingOperationUpload
    for entry in AccountingOperationUpload.query():
        entry.filetype = "analytical_balance"
        session.merge(entry)
        session.flush()
def migrate_datas():
    from autonomie_base.models.base import DBSESSION
    session = DBSESSION()
    from autonomie.models.accounting.operations import AccountingOperationUpload
    for entry in AccountingOperationUpload.query():
        entry.filetype = "analytical_balance"
        session.merge(entry)
        session.flush()
 def query(self):
     return AccountingOperationUpload.query().options(
         load_only(
             AccountingOperationUpload.id,
             AccountingOperationUpload.created_at,
             AccountingOperationUpload.date,
             AccountingOperationUpload.filename,
             AccountingOperationUpload.filetype,
         )
     )