Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/models/event_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ def __init__(self,
last4=None,
stripe_token=None,
paypal_token=None,
deleted_at=None
deleted_at=None,
status='due'
):
self.identifier = get_new_identifier()
self.amount = amount
Expand All @@ -94,7 +95,7 @@ def __init__(self,
self.paid_via = paid_via
self.created_at = datetime.utcnow()
self.discount_code_id = discount_code_id
self.status = 'pending'
self.status = status
self.invoice_pdf_url = invoice_pdf_url
self.payment_mode = payment_mode
self.brand = brand
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""change pending invoices

Revision ID: 90d62fe3b5e3
Revises: cd3beca1951a
Create Date: 2019-08-17 16:59:44.044872

"""

from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils


# revision identifiers, used by Alembic.
revision = '90d62fe3b5e3'
down_revision = 'cd3beca1951a'


def upgrade():
op.execute("UPDATE event_invoices SET status = 'due' where status = 'pending';",
execution_options=None)


def downgrade():
op.execute("UPDATE event_invoices SET status = 'pending' where status = 'due';",
execution_options=None)