mirror of
https://github.com/Zproger/Aurum.git
synced 2026-11-13 19:43:50 +07:00
Initial public release
Aurum — a self-hosted personal finance operating system: cash flow, net worth tracking, budgets, goals, recurring payments, reports, proactive alerts, and a compound-interest returns calculator, all bilingual (RU/EN) and mobile-first. Ships as a three-container Docker Compose stack (Postgres + FastAPI + nginx-served React frontend). See README.md for setup and CONTRIBUTING.md for development.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
"""add risk_level to assets
|
||||
|
||||
Revision ID: f2c8e4a917b3
|
||||
Revises: e91b6d3c5a04
|
||||
Create Date: 2026-08-16 23:30:00.000000
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = 'f2c8e4a917b3'
|
||||
down_revision: Union[str, None] = 'e91b6d3c5a04'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### existing rows need a default or this NOT NULL column addition fails outright. ###
|
||||
op.add_column(
|
||||
'assets',
|
||||
sa.Column(
|
||||
'risk_level',
|
||||
sa.Enum('LOW', 'MEDIUM', 'HIGH', name='risk_level', native_enum=False, length=10),
|
||||
nullable=False,
|
||||
server_default='MEDIUM',
|
||||
),
|
||||
)
|
||||
op.alter_column('assets', 'risk_level', server_default=None)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column('assets', 'risk_level')
|
||||
Reference in New Issue
Block a user