"""Create analytics_raw_transactions table

Revision ID: c2b2cdbc8022
Revises: 
Create Date: 2025-06-09 15:19:36.017861

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'c2b2cdbc8022'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('analytics_raw_transactions',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('cust_id', sa.String(length=10), nullable=True),
    sa.Column('accountid', sa.String(length=10), nullable=True),
    sa.Column('tran_id', sa.String(length=12), nullable=True),
    sa.Column('entry_date', sa.TIMESTAMP(), nullable=True),
    sa.Column('value_date', sa.TIMESTAMP(), nullable=True),
    sa.Column('pstd_date', sa.TIMESTAMP(), nullable=True),
    sa.Column('tran_date', sa.TIMESTAMP(), nullable=True),
    sa.Column('tran_sub_ty', sa.String(length=4), nullable=True),
    sa.Column('part_tran_ty', sa.String(length=4), nullable=True),
    sa.Column('channel', sa.String(length=32), nullable=True),
    sa.Column('tran_amt', sa.Numeric(precision=20, scale=2), nullable=True),
    sa.Column('balance', sa.Numeric(precision=20, scale=2), nullable=True),
    sa.Column('isreverse', sa.String(length=4), nullable=True),
    sa.Column('reverse', sa.String(length=4), nullable=True),
    sa.Column('tran_particular', sa.String(length=100), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('analytics_raw_transactions')
    # ### end Alembic commands ###
