mirror of
https://github.com/simple-login/app.git
synced 2024-11-18 22:53:27 +08:00
41 lines
1.3 KiB
Python
41 lines
1.3 KiB
Python
|
"""empty message
|
||
|
|
||
|
Revision ID: 5c77d685df87
|
||
|
Revises: f5133dc851ee
|
||
|
Create Date: 2021-05-10 13:02:39.430387
|
||
|
|
||
|
"""
|
||
|
import sqlalchemy_utils
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = '5c77d685df87'
|
||
|
down_revision = 'f5133dc851ee'
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.create_table('payout',
|
||
|
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
||
|
sa.Column('created_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=False),
|
||
|
sa.Column('updated_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=True),
|
||
|
sa.Column('user_id', sa.Integer(), nullable=False),
|
||
|
sa.Column('amount', sa.Float(), nullable=False),
|
||
|
sa.Column('payment_method', sa.String(length=256), nullable=False),
|
||
|
sa.Column('number_upgraded_account', sa.Integer(), nullable=False),
|
||
|
sa.Column('comment', sa.Text(), nullable=True),
|
||
|
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='cascade'),
|
||
|
sa.PrimaryKeyConstraint('id')
|
||
|
)
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_table('payout')
|
||
|
# ### end Alembic commands ###
|