Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def upgrade() -> None:
sa.Column(
"goal_id",
UUID(as_uuid=True),
sa.ForeignKey("llc_goals.id", ondelete="SET NULL"),
nullable=True,
),
sa.Column(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Add LLC extension columns to organizations table.

Revision ID: 20260523_022
Revises: 20260522_021
Revision ID: 20260523_023
Revises: 20260523_022
Create Date: 2026-05-23 00:00:00.000000

GH#8211: Extends the organizations table with sub-company hierarchy, budget
Expand All @@ -14,8 +14,8 @@
import sqlalchemy as sa
from alembic import op

revision: str = "20260523_022"
down_revision: Union[str, None] = "20260522_021"
revision: str = "20260523_023"
down_revision: Union[str, None] = "20260523_022"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Create llc_goals table for 4-level goal hierarchy (GH#8212).

Revision ID: 20260523_022
Revises: 20260522_021
Revision ID: 20260523_024
Revises: 20260523_023
Create Date: 2026-05-23 00:00:00.000000
"""

Expand All @@ -11,8 +11,8 @@
from alembic import op
from sqlalchemy.dialects import postgresql

revision: str = "20260523_022"
down_revision: Union[str, None] = "20260522_021"
revision: str = "20260523_024"
down_revision: Union[str, None] = "20260523_023"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None

Expand Down Expand Up @@ -53,9 +53,17 @@ def upgrade() -> None:
op.create_index("ix_llc_goals_level", "llc_goals", ["level"])
op.create_index("ix_llc_goals_status", "llc_goals", ["status"])
op.create_index("ix_llc_goals_owner_agent_id", "llc_goals", ["owner_agent_id"])
# llc_goals must exist before this FK can be wired — deferred from migration 022.
op.create_foreign_key(
"fk_llc_work_items_goal_id",
"llc_work_items", "llc_goals",
["goal_id"], ["id"],
ondelete="SET NULL",
)


def downgrade() -> None:
op.drop_constraint("fk_llc_work_items_goal_id", "llc_work_items", type_="foreignkey")
op.drop_index("ix_llc_goals_owner_agent_id", table_name="llc_goals")
op.drop_index("ix_llc_goals_status", table_name="llc_goals")
op.drop_index("ix_llc_goals_level", table_name="llc_goals")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
# Author: mrveiss
"""LLC per-agent budget table (GH#8215).

Revision ID: 20260523_022
Revises: 20260522_021
Revision ID: 20260523_025
Revises: 20260523_024
Create Date: 2026-05-23
"""

from alembic import op
import sqlalchemy as sa

revision = "20260523_022"
down_revision = "20260522_021"
revision = "20260523_025"
down_revision = "20260523_024"
branch_labels = None
depends_on = None

Expand Down
Loading