Initial roborto accounting implementation
This commit is contained in:
@@ -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")
|
||||
Reference in New Issue
Block a user