Initial roborto accounting implementation

This commit is contained in:
rob
2026-08-30 07:16:21 +01:00
commit 97a75d0243
145 changed files with 5525 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
"""Add projects and client/project billing-rate overrides."""
from alembic import op
import sqlalchemy as sa
revision = "0007_projects_rates"
down_revision = "0006_suppliers"
branch_labels = None
depends_on = None
def upgrade() -> None:
op.add_column("clients", sa.Column("default_hourly_rate_micro", sa.Integer()))
op.create_table("projects",
sa.Column("id", sa.Integer(), primary_key=True),
sa.Column("client_id", sa.Integer(), sa.ForeignKey("clients.id"), nullable=False),
sa.Column("name", sa.String(length=200), nullable=False),
sa.Column("code", sa.String(length=80), unique=True),
sa.Column("hourly_rate_micro", sa.Integer()), sa.Column("notes", sa.Text()),
sa.Column("is_active", sa.Boolean(), nullable=False),
sa.Column("created_at", sa.DateTime(), nullable=False),
sa.Column("updated_at", sa.DateTime(), nullable=False))
def downgrade() -> None:
op.drop_table("projects")
op.drop_column("clients", "default_hourly_rate_micro")