Exemplo n.º 1
0
 def _persist_default_statement_frequency(payment_account_id):
     statement_settings_model = StatementSettingsModel(
         frequency=StatementFrequency.default_frequency().value,
         payment_account_id=payment_account_id)
     statement_settings_model.save()
Exemplo n.º 2
0
def upgrade():
    default_frequency = StatementFrequency.default_frequency().value
    sql = f"INSERT INTO statement_settings (frequency, payment_account_id, from_date) " \
          f"SELECT '{default_frequency}', account_id, CURRENT_DATE FROM bcol_payment_account;"
    op.execute(sql)