mirror of
https://github.com/simple-login/app.git
synced 2024-09-20 15:05:59 +08:00
add LifetimeCoupon.comment column
This commit is contained in:
parent
ba6ed3cba7
commit
9c528b913c
|
@ -1934,6 +1934,7 @@ class LifetimeCoupon(db.Model, ModelMixin):
|
||||||
code = db.Column(db.String(128), nullable=False, unique=True)
|
code = db.Column(db.String(128), nullable=False, unique=True)
|
||||||
nb_used = db.Column(db.Integer, nullable=False)
|
nb_used = db.Column(db.Integer, nullable=False)
|
||||||
paid = db.Column(db.Boolean, default=False, server_default="0", nullable=False)
|
paid = db.Column(db.Boolean, default=False, server_default="0", nullable=False)
|
||||||
|
comment = db.Column(db.Text, nullable=True)
|
||||||
|
|
||||||
|
|
||||||
class Coupon(db.Model, ModelMixin):
|
class Coupon(db.Model, ModelMixin):
|
||||||
|
|
29
migrations/versions/2021_100416_4913cb3f5a05_.py
Normal file
29
migrations/versions/2021_100416_4913cb3f5a05_.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
"""empty message
|
||||||
|
|
||||||
|
Revision ID: 4913cb3f5a05
|
||||||
|
Revises: 5ee767807344
|
||||||
|
Create Date: 2021-10-04 16:48:11.680029
|
||||||
|
|
||||||
|
"""
|
||||||
|
import sqlalchemy_utils
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '4913cb3f5a05'
|
||||||
|
down_revision = '5ee767807344'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.add_column('lifetime_coupon', sa.Column('comment', sa.Text(), nullable=True))
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_column('lifetime_coupon', 'comment')
|
||||||
|
# ### end Alembic commands ###
|
Loading…
Reference in a new issue