- BTC prices: btc_prices table, CSV upload on Import page (auto-detected date/close columns, upsert by date), entities.close_date as the BTC entry mark; statements carry btc_price_cents (as-of) + btc_close_price_cents. LP capital blocks show paid-in vs current value in bitcoin terms. - First login: accounts on the shared default password are flagged (must_change_password) and blocked behind a full-screen password change; external accounts then get a one-time welcome tour with a 2FA offer (users.onboarded_at). - LP portal: Unfunded (callable commitment) metric; Tax documents center aggregating K-1/tax docs across funds, grouped by year. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
44 lines
1.5 KiB
Python
44 lines
1.5 KiB
Python
"""btc_prices table + entities.close_date + first-login flow columns on users
|
|
|
|
Revision ID: a3b4c5d6e7f8
|
|
Revises: f2a3b4c5d6e7
|
|
Create Date: 2026-07-12 09:00:00.000000
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
revision: str = 'a3b4c5d6e7f8'
|
|
down_revision: Union[str, None] = 'f2a3b4c5d6e7'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.create_table(
|
|
'btc_prices',
|
|
sa.Column('id', sa.Integer(), primary_key=True),
|
|
sa.Column('date', sa.Date(), nullable=False, unique=True),
|
|
sa.Column('price_cents', sa.Integer(), nullable=False),
|
|
)
|
|
with op.batch_alter_table('entities', schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column('close_date', sa.Date(), nullable=True))
|
|
with op.batch_alter_table('users', schema=None) as batch_op:
|
|
batch_op.add_column(
|
|
sa.Column('must_change_password', sa.Boolean(), nullable=False,
|
|
server_default=sa.false())
|
|
)
|
|
batch_op.add_column(sa.Column('onboarded_at', sa.DateTime(), nullable=True))
|
|
|
|
|
|
def downgrade() -> None:
|
|
with op.batch_alter_table('users', schema=None) as batch_op:
|
|
batch_op.drop_column('onboarded_at')
|
|
batch_op.drop_column('must_change_password')
|
|
with op.batch_alter_table('entities', schema=None) as batch_op:
|
|
batch_op.drop_column('close_date')
|
|
op.drop_table('btc_prices')
|