-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: Move order_expiry_time into settings model #6083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
571198a
917bf7a
cf5bf22
c437b95
da6fde9
03bbf3e
6350314
460a913
8c14e0f
e0539c8
8d10769
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,8 @@ class Setting(db.Model): | |
| secret = db.Column(db.String) | ||
| # Static domain | ||
| static_domain = db.Column(db.String) | ||
| # Order Expiry Time | ||
| order_expiry_time = db.Column(db.Integer, default=15) | ||
|
||
|
|
||
| # | ||
| # STORAGE | ||
|
|
@@ -150,6 +152,7 @@ class Setting(db.Model): | |
|
|
||
| def __init__(self, | ||
| app_environment=Environment.PRODUCTION, | ||
| order_expiry_time=None, | ||
|
||
| aws_key=None, | ||
| aws_secret=None, | ||
| aws_bucket_name=None, | ||
|
|
@@ -199,6 +202,7 @@ def __init__(self, | |
| alipay_publishable_key=None, | ||
| alipay_secret_key=None): | ||
| self.app_environment = app_environment | ||
| self.order_expiry_time = order_expiry_time | ||
| self.aws_key = aws_key | ||
| self.aws_secret = aws_secret | ||
| self.aws_bucket_name = aws_bucket_name | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| """empty message | ||
| Revision ID: 2c7ff9781032 | ||
| Revises: 43e8c59337ae | ||
| Create Date: 2019-06-21 04:33:59.021835 | ||
| """ | ||
|
|
||
| from alembic import op | ||
| import sqlalchemy as sa | ||
| import sqlalchemy_utils | ||
|
|
||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision = '2c7ff9781032' | ||
| down_revision = '43e8c59337ae' | ||
|
|
||
|
|
||
| def upgrade(): | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.drop_column('events', 'order_expiry_time') | ||
| op.drop_column('events_version', 'order_expiry_time') | ||
| op.add_column('settings', sa.Column('order_expiry_time', sa.Integer(), nullable=True)) | ||
kushthedude marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # ### end Alembic commands ### | ||
|
|
||
|
|
||
| def downgrade(): | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.drop_column('settings', 'order_expiry_time') | ||
| op.add_column('events_version', sa.Column('order_expiry_time', sa.INTEGER(), autoincrement=False, nullable=True)) | ||
kushthedude marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| op.add_column('events', sa.Column('order_expiry_time', sa.INTEGER(), autoincrement=False, nullable=True)) | ||
| # ### end Alembic commands ### | ||
Uh oh!
There was an error while loading. Please reload this page.