-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip Fix #1133 I can configure plan prorations as a shop owner
- Loading branch information
1 parent
3ee15c4
commit 754c8ac
Showing
9 changed files
with
220 additions
and
5 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
migrations/versions/d8c120e8212e_add_proration_behavior_stripe_proration_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
"""add proration_behavior stripe_proration_behavior plan subscription | ||
Revision ID: d8c120e8212e | ||
Revises: a4d35e9917f7 | ||
Create Date: 2024-07-27 22:21:26.823294 | ||
""" | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "d8c120e8212e" | ||
down_revision = "a4d35e9917f7" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# "none" not to be confused with "None" | ||
# See | ||
# https://docs.stripe.com/api/subscriptions/create#create_subscription-proration_behavior | ||
with op.batch_alter_table("plan", schema=None) as batch_op: | ||
batch_op.add_column( | ||
sa.Column("proration_behavior", sa.String(), nullable=True, default="none") | ||
) | ||
|
||
# "none" not to be confused with "None" | ||
# See | ||
# https://docs.stripe.com/api/subscriptions/create#create_subscription-proration_behavior | ||
with op.batch_alter_table("subscription", schema=None) as batch_op: | ||
batch_op.add_column( | ||
sa.Column( | ||
"stripe_proration_behavior", sa.String(), nullable=True, default="none" | ||
) | ||
) | ||
|
||
|
||
def downgrade(): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters