Added migrations for the database

This commit is contained in:
algizn97
2025-10-11 13:36:38 +05:00
parent 6e0a170f4b
commit 4a7577b977
31 changed files with 1267 additions and 3 deletions

View File

@@ -0,0 +1,34 @@
"""added base_quantity
Revision ID: baf03ce269e0
Revises: 07020b2808d3
Create Date: 2025-10-09 16:49:52.979556
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = 'baf03ce269e0'
down_revision: Union[str, Sequence[str], None] = '07020b2808d3'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user_deals', sa.Column('base_quantity', sa.Float(), nullable=True))
op.drop_column('user_deals', 'trading_type')
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user_deals', sa.Column('trading_type', sa.VARCHAR(), autoincrement=False, nullable=True))
op.drop_column('user_deals', 'base_quantity')
# ### end Alembic commands ###