mirror of
https://github.com/Zproger/Aurum.git
synced 2026-11-07 16:27:22 +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:
35
backend/alembic/versions/9f3a2d7c5e11_add_app_settings.py
Normal file
35
backend/alembic/versions/9f3a2d7c5e11_add_app_settings.py
Normal file
@@ -0,0 +1,35 @@
|
||||
"""add app_settings
|
||||
|
||||
Revision ID: 9f3a2d7c5e11
|
||||
Revises: 1152a14e9d55
|
||||
Create Date: 2026-08-16 12:00:00.000000
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '9f3a2d7c5e11'
|
||||
down_revision: Union[str, None] = '1152a14e9d55'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.create_table(
|
||||
'app_settings',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('currency', sa.String(length=3), nullable=False, server_default='USD'),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
)
|
||||
# Singleton row (id=1) — app boot's seed_default_app_settings() also
|
||||
# get-or-creates it, but seeding it here means it exists immediately
|
||||
# after migrating, even before the app has started once.
|
||||
op.execute("INSERT INTO app_settings (id, currency) VALUES (1, 'USD')")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_table('app_settings')
|
||||
Reference in New Issue
Block a user