From a678180d079b3715e1a5022f03a600198653935d Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Mon, 2 Feb 2026 16:51:06 +0530 Subject: [PATCH] Remove HR completely: delete hr API; baseline alembic without HR tables --- .../versions/4dffc5312eb8_remove_hr_module.py | 35 --- ...nitial_company_os_sqlmodel.cpython-312.pyc | Bin 1026 -> 0 bytes ...9c1e3c2a_company_os_schema.cpython-312.pyc | Bin 11517 -> 0 bytes .../ce4f1502f674_create_tasks.cpython-312.pyc | Bin 2594 -> 0 bytes .../versions/bacd5e6a253d_baseline_schema.py | 271 ++++++++---------- backend/app/__pycache__/main.cpython-312.pyc | Bin 1857 -> 0 bytes backend/app/api/hr.py | 16 -- 7 files changed, 121 insertions(+), 201 deletions(-) delete mode 100644 backend/alembic/versions/4dffc5312eb8_remove_hr_module.py delete mode 100644 backend/alembic/versions/__pycache__/157587037601_initial_company_os_sqlmodel.cpython-312.pyc delete mode 100644 backend/alembic/versions/__pycache__/5c0c9c1e3c2a_company_os_schema.cpython-312.pyc delete mode 100644 backend/alembic/versions/__pycache__/ce4f1502f674_create_tasks.cpython-312.pyc delete mode 100644 backend/app/__pycache__/main.cpython-312.pyc delete mode 100644 backend/app/api/hr.py diff --git a/backend/alembic/versions/4dffc5312eb8_remove_hr_module.py b/backend/alembic/versions/4dffc5312eb8_remove_hr_module.py deleted file mode 100644 index 44a83b22..00000000 --- a/backend/alembic/versions/4dffc5312eb8_remove_hr_module.py +++ /dev/null @@ -1,35 +0,0 @@ -"""remove hr module - -Revision ID: 4dffc5312eb8 -Revises: bacd5e6a253d -Create Date: 2026-02-02 16:46:47.579836 - -""" - -from typing import Sequence, Union - -import sqlalchemy as sa -from alembic import op - -# revision identifiers, used by Alembic. -revision: str = "4dffc5312eb8" -down_revision: Union[str, Sequence[str], None] = "bacd5e6a253d" -branch_labels: Union[str, Sequence[str], None] = None -depends_on: Union[str, Sequence[str], None] = None - - -def upgrade() -> None: - """Upgrade schema.""" - - # Drop HR tables. If they don't exist (fresh db + baseline changed later), be safe. - op.execute("DROP TABLE IF EXISTS headcount_requests CASCADE") - op.execute("DROP TABLE IF EXISTS employment_actions CASCADE") - op.execute("DROP TABLE IF EXISTS agent_onboardings CASCADE") - - -def downgrade() -> None: - """Downgrade schema.""" - - # We intentionally do not recreate the HR tables; HR module is removed. - # If ever needed, re-introduce with a new migration. - pass diff --git a/backend/alembic/versions/__pycache__/157587037601_initial_company_os_sqlmodel.cpython-312.pyc b/backend/alembic/versions/__pycache__/157587037601_initial_company_os_sqlmodel.cpython-312.pyc deleted file mode 100644 index 2f3445e9e4329ff0e8d49fc72166f744c193144b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1026 zcmah|zi-n(6h7Pe;kfzHRuqIlV5v(3N}QymDN)5j8Ca@{s*9J?#dkCY|48qg7FR+< zh@oRU6}FBb@t?4?>Vl3DF|b7xgw%;UHx&h`aFXA>Pv5(H@B3_jC=?7J*2~=&?hh4! z&k~%i)F?TAFOog53NWw%Rq!Rq5&;ekzEzuT&DH9s3}J24xK9a+h`A_2+icVt zbCp`7QmdPd*>-)deWy{KzgufHYliVvr~ze_>nmivPXdSV^lBh3FDqOPdrLfjz5&H0P!jcNuv8xBSqO3HK*%#u+;hbt=_Hj- z^6W@1O-p15Ey$B@#$08H%Hg@jBFak;q96z(6iH7Yq`JH!CxiT#61~YBe~o#fFNm+N z?~!}-ny6F6!(tJJnxZJ*)Qpn)Sp>@T7jXF#xH8ni#La=eJ$(dje5^MIh3)>%%Ilf^ z**BH9mky>Xho$NfX#Rt#HU`G_gPrM}XZzaj^L>0UdFwEL`v^3SGn$h7UKAm*=NGG0 B35@^% diff --git a/backend/alembic/versions/__pycache__/5c0c9c1e3c2a_company_os_schema.cpython-312.pyc b/backend/alembic/versions/__pycache__/5c0c9c1e3c2a_company_os_schema.cpython-312.pyc deleted file mode 100644 index 5dd817ae90ec71e209ede49897b70688472f3090..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00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5FYUeT9c_@xcF9CNN+7AG zTPEt>)V$Im6D~9rrPpei*n|L4eWy%pNY!C2kckTY#%7t=qD|Q@6XjZchfJ*3>XlCk zN>v9OEG;}M#`vh$wOYyb`x!3i_bV2#7@V4Tl%jYPrAlt#5*l72aZ8z%1 zDklo0b(M4ZRSCns=e70vBlXX#+?Q;hdqy{pUc8a>#b-Ad$+>;bz9V69zqG`SM$4;< LIZoq7RYU&+f1?H{ diff --git a/backend/alembic/versions/__pycache__/ce4f1502f674_create_tasks.cpython-312.pyc b/backend/alembic/versions/__pycache__/ce4f1502f674_create_tasks.cpython-312.pyc deleted file mode 100644 index 85c6f9cfbcf9fef2fe3355c870bc76849cc4ecf5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2594 zcmcIlOKclO7~Wm4*Y?Ivn&7n1@Gwnj>z2fc8;24VklH{=OCRb(73Q$o>`d%U_ubQMia^aV5tY)2Na-;sIYi>Z5hNrkacO1q(7+9G$gLugkb2^uwKv(cDJ@8hv^)RI z|D2is|Nb8m37Lb@`Ps+%S7DC(oh|$!Hi)%lAZEEs9OCjE;*ntRrjQrRP(H-7b;uCS za6atOq9NrYD4dVt7?zQA6f}{TZ^9v13pn&cGvztLCcU}qpD zAFpc+g4#eT+mr3@>dAKX^ro`ef$ZUdT(0}gzMdnwURhp+;JLIwqZjbiGPX2K!w#C7;@ykr3cVH}`#NsX?I7vbe;&!U$+=XE7Y$d%0BC^8ZL$ zjx04|{ufrG0jqJ}*5E8p-Roc@#Ct5C*3PeRX*^++ zuq`|hw(PM3X+V@_2a{`S1z(s9Dd z9+1bwFc4wk3XV#p*P72n<}ZC z!j zTbHWRzuh6^>Z_^d)diyimHj@yG(@zwR#SXf$5HjW2p8k`xt z{Zci#e{t7J-^#vk+J6#HkTl%HmPWxcz-ttr0P(a&5hxnJ&4ZRd5Wi70!g6S-(P*|5 z;&#BXQMyoAVmdt0ItUGKOKFh~a6uTLL-xvEnktrRLI#WV43-hGONy6hWIu>OTVxxa zBssv8*}2I<#)`3i>X|1!u-*rs!*u-AIDO;vtv$1QXZB8CueQCmvj0bMfIS9mPXoQ% zvjjya5$u+Ubtb)oMid3vnxat2t(2fj2)j?hE{H}NN!tk1xoW5egNq7znaM<$Ob7~w zwkV2fSvH^mOKn9Vtj!XJWrVdIFN?i+A34s$=uy)~WdpxWj({9%na%|K9)x(F|5K27 z@vml%@BD+?`75{UL6mEKWimR|S>;~-r8hU3m?}?SxP9Qx;kmBG None: """Upgrade schema.""" - # ### commands auto generated by Alembic - please adjust! ### - op.create_table('departments', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('name', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('head_employee_id', sa.Integer(), nullable=True), - sa.PrimaryKeyConstraint('id') + + # Departments (FK to employees added after employees table exists) + op.create_table( + "departments", + sa.Column("id", sa.Integer(), nullable=False), + sa.Column("name", sqlmodel.sql.sqltypes.AutoString(), nullable=False), + sa.Column("head_employee_id", sa.Integer(), nullable=True), + sa.PrimaryKeyConstraint("id"), ) - op.create_index(op.f('ix_departments_name'), 'departments', ['name'], unique=True) - op.create_table('employees', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('name', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('employee_type', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('department_id', sa.Integer(), nullable=True), - sa.Column('manager_id', sa.Integer(), nullable=True), - sa.Column('title', sqlmodel.sql.sqltypes.AutoString(), nullable=True), - sa.Column('status', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('openclaw_session_key', sqlmodel.sql.sqltypes.AutoString(), nullable=True), - sa.Column('notify_enabled', sa.Boolean(), nullable=False), - sa.ForeignKeyConstraint(['department_id'], ['departments.id'], ), - sa.ForeignKeyConstraint(['manager_id'], ['employees.id'], ), - sa.PrimaryKeyConstraint('id') + op.create_index(op.f("ix_departments_name"), "departments", ["name"], unique=True) + + # Employees + op.create_table( + "employees", + sa.Column("id", sa.Integer(), nullable=False), + sa.Column("name", sqlmodel.sql.sqltypes.AutoString(), nullable=False), + sa.Column("employee_type", sqlmodel.sql.sqltypes.AutoString(), nullable=False), + sa.Column("department_id", sa.Integer(), nullable=True), + sa.Column("manager_id", sa.Integer(), nullable=True), + sa.Column("title", sqlmodel.sql.sqltypes.AutoString(), nullable=True), + sa.Column("status", sqlmodel.sql.sqltypes.AutoString(), nullable=False), + sa.Column("openclaw_session_key", sqlmodel.sql.sqltypes.AutoString(), nullable=True), + sa.Column("notify_enabled", sa.Boolean(), nullable=False), + sa.ForeignKeyConstraint(["department_id"], ["departments.id"]), + sa.ForeignKeyConstraint(["manager_id"], ["employees.id"]), + sa.PrimaryKeyConstraint("id"), ) - op.create_foreign_key(None, 'departments', 'employees', ['head_employee_id'], ['id']) - op.create_table('projects', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('name', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('status', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.PrimaryKeyConstraint('id') + + # Break the departments<->employees cycle: add this FK after both tables exist + op.create_foreign_key(None, "departments", "employees", ["head_employee_id"], ["id"]) + + # Projects + op.create_table( + "projects", + sa.Column("id", sa.Integer(), nullable=False), + sa.Column("name", sqlmodel.sql.sqltypes.AutoString(), nullable=False), + sa.Column("status", sqlmodel.sql.sqltypes.AutoString(), nullable=False), + sa.PrimaryKeyConstraint("id"), ) - op.create_index(op.f('ix_projects_name'), 'projects', ['name'], unique=True) - op.create_table('activities', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('actor_employee_id', sa.Integer(), nullable=True), - sa.Column('entity_type', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('entity_id', sa.Integer(), nullable=True), - sa.Column('verb', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('payload_json', sqlmodel.sql.sqltypes.AutoString(), nullable=True), - sa.Column('created_at', sa.DateTime(), nullable=False), - sa.ForeignKeyConstraint(['actor_employee_id'], ['employees.id'], ), - sa.PrimaryKeyConstraint('id') + op.create_index(op.f("ix_projects_name"), "projects", ["name"], unique=True) + + # Activities + op.create_table( + "activities", + sa.Column("id", sa.Integer(), nullable=False), + sa.Column("actor_employee_id", sa.Integer(), nullable=True), + sa.Column("entity_type", sqlmodel.sql.sqltypes.AutoString(), nullable=False), + sa.Column("entity_id", sa.Integer(), nullable=True), + sa.Column("verb", sqlmodel.sql.sqltypes.AutoString(), nullable=False), + sa.Column("payload_json", sqlmodel.sql.sqltypes.AutoString(), nullable=True), + sa.Column("created_at", sa.DateTime(), nullable=False), + sa.ForeignKeyConstraint(["actor_employee_id"], ["employees.id"]), + sa.PrimaryKeyConstraint("id"), ) - op.create_table('agent_onboardings', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('agent_name', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('role_title', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('prompt', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('cron_interval_ms', sa.Integer(), nullable=True), - sa.Column('tools_json', sqlmodel.sql.sqltypes.AutoString(), nullable=True), - sa.Column('owner_hr_id', sa.Integer(), nullable=True), - sa.Column('employee_id', sa.Integer(), nullable=True), - sa.Column('status', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('spawned_agent_id', sqlmodel.sql.sqltypes.AutoString(), nullable=True), - sa.Column('session_key', sqlmodel.sql.sqltypes.AutoString(), nullable=True), - sa.Column('notes', sqlmodel.sql.sqltypes.AutoString(), nullable=True), - sa.Column('created_at', sa.DateTime(), nullable=False), - sa.Column('updated_at', sa.DateTime(), nullable=False), - sa.ForeignKeyConstraint(['employee_id'], ['employees.id'], ), - sa.ForeignKeyConstraint(['owner_hr_id'], ['employees.id'], ), - sa.PrimaryKeyConstraint('id') + + # Project members + op.create_table( + "project_members", + sa.Column("id", sa.Integer(), nullable=False), + sa.Column("project_id", sa.Integer(), nullable=False), + sa.Column("employee_id", sa.Integer(), nullable=False), + sa.Column("role", sqlmodel.sql.sqltypes.AutoString(), nullable=True), + sa.ForeignKeyConstraint(["employee_id"], ["employees.id"]), + sa.ForeignKeyConstraint(["project_id"], ["projects.id"]), + sa.PrimaryKeyConstraint("id"), ) - op.create_table('employment_actions', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('employee_id', sa.Integer(), nullable=False), - sa.Column('issued_by_employee_id', sa.Integer(), nullable=False), - sa.Column('action_type', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('notes', sqlmodel.sql.sqltypes.AutoString(), nullable=True), - sa.Column('idempotency_key', sqlmodel.sql.sqltypes.AutoString(), nullable=True), - sa.Column('created_at', sa.DateTime(), nullable=False), - sa.ForeignKeyConstraint(['employee_id'], ['employees.id'], ), - sa.ForeignKeyConstraint(['issued_by_employee_id'], ['employees.id'], ), - sa.PrimaryKeyConstraint('id') + + # Tasks + op.create_table( + "tasks", + sa.Column("id", sa.Integer(), nullable=False), + sa.Column("project_id", sa.Integer(), nullable=False), + sa.Column("title", sqlmodel.sql.sqltypes.AutoString(), nullable=False), + sa.Column("description", sqlmodel.sql.sqltypes.AutoString(), nullable=True), + sa.Column("status", sqlmodel.sql.sqltypes.AutoString(), nullable=False), + sa.Column("assignee_employee_id", sa.Integer(), nullable=True), + sa.Column("reviewer_employee_id", sa.Integer(), nullable=True), + sa.Column("created_by_employee_id", sa.Integer(), nullable=True), + sa.Column("created_at", sa.DateTime(), nullable=False), + sa.Column("updated_at", sa.DateTime(), nullable=False), + sa.ForeignKeyConstraint(["assignee_employee_id"], ["employees.id"]), + sa.ForeignKeyConstraint(["created_by_employee_id"], ["employees.id"]), + sa.ForeignKeyConstraint(["project_id"], ["projects.id"]), + sa.ForeignKeyConstraint(["reviewer_employee_id"], ["employees.id"]), + sa.PrimaryKeyConstraint("id"), ) - op.create_index(op.f('ix_employment_actions_idempotency_key'), 'employment_actions', ['idempotency_key'], unique=True) - op.create_table('project_members', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('project_id', sa.Integer(), nullable=False), - sa.Column('employee_id', sa.Integer(), nullable=False), - sa.Column('role', sqlmodel.sql.sqltypes.AutoString(), nullable=True), - sa.ForeignKeyConstraint(['employee_id'], ['employees.id'], ), - sa.ForeignKeyConstraint(['project_id'], ['projects.id'], ), - sa.PrimaryKeyConstraint('id') + op.create_index(op.f("ix_tasks_project_id"), "tasks", ["project_id"], unique=False) + op.create_index(op.f("ix_tasks_status"), "tasks", ["status"], unique=False) + + # Task comments + op.create_table( + "task_comments", + sa.Column("id", sa.Integer(), nullable=False), + sa.Column("task_id", sa.Integer(), nullable=False), + sa.Column("author_employee_id", sa.Integer(), nullable=True), + sa.Column("reply_to_comment_id", sa.Integer(), nullable=True), + sa.Column("body", sqlmodel.sql.sqltypes.AutoString(), nullable=False), + sa.Column("created_at", sa.DateTime(), nullable=False), + sa.ForeignKeyConstraint(["author_employee_id"], ["employees.id"]), + sa.ForeignKeyConstraint(["reply_to_comment_id"], ["task_comments.id"]), + sa.ForeignKeyConstraint(["task_id"], ["tasks.id"]), + sa.PrimaryKeyConstraint("id"), ) - op.create_table('tasks', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('project_id', sa.Integer(), nullable=False), - sa.Column('title', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('description', sqlmodel.sql.sqltypes.AutoString(), nullable=True), - sa.Column('status', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('assignee_employee_id', sa.Integer(), nullable=True), - sa.Column('reviewer_employee_id', sa.Integer(), nullable=True), - sa.Column('created_by_employee_id', sa.Integer(), nullable=True), - sa.Column('created_at', sa.DateTime(), nullable=False), - sa.Column('updated_at', sa.DateTime(), nullable=False), - sa.ForeignKeyConstraint(['assignee_employee_id'], ['employees.id'], ), - sa.ForeignKeyConstraint(['created_by_employee_id'], ['employees.id'], ), - sa.ForeignKeyConstraint(['project_id'], ['projects.id'], ), - sa.ForeignKeyConstraint(['reviewer_employee_id'], ['employees.id'], ), - sa.PrimaryKeyConstraint('id') - ) - op.create_index(op.f('ix_tasks_project_id'), 'tasks', ['project_id'], unique=False) - op.create_index(op.f('ix_tasks_status'), 'tasks', ['status'], unique=False) - op.create_table('headcount_requests', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('department_id', sa.Integer(), nullable=False), - sa.Column('requested_by_manager_id', sa.Integer(), nullable=False), - sa.Column('role_title', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('employee_type', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('quantity', sa.Integer(), nullable=False), - sa.Column('justification', sqlmodel.sql.sqltypes.AutoString(), nullable=True), - sa.Column('status', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('fulfilled_employee_id', sa.Integer(), nullable=True), - sa.Column('fulfilled_onboarding_id', sa.Integer(), nullable=True), - sa.Column('fulfilled_at', sa.DateTime(), nullable=True), - sa.Column('created_at', sa.DateTime(), nullable=False), - sa.ForeignKeyConstraint(['department_id'], ['departments.id'], ), - sa.ForeignKeyConstraint(['fulfilled_employee_id'], ['employees.id'], ), - sa.ForeignKeyConstraint(['fulfilled_onboarding_id'], ['agent_onboardings.id'], ), - sa.ForeignKeyConstraint(['requested_by_manager_id'], ['employees.id'], ), - sa.PrimaryKeyConstraint('id') - ) - op.create_table('task_comments', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('task_id', sa.Integer(), nullable=False), - sa.Column('author_employee_id', sa.Integer(), nullable=True), - sa.Column('reply_to_comment_id', sa.Integer(), nullable=True), - sa.Column('body', sqlmodel.sql.sqltypes.AutoString(), nullable=False), - sa.Column('created_at', sa.DateTime(), nullable=False), - sa.ForeignKeyConstraint(['author_employee_id'], ['employees.id'], ), - sa.ForeignKeyConstraint(['reply_to_comment_id'], ['task_comments.id'], ), - sa.ForeignKeyConstraint(['task_id'], ['tasks.id'], ), - sa.PrimaryKeyConstraint('id') - ) - op.create_index(op.f('ix_task_comments_task_id'), 'task_comments', ['task_id'], unique=False) - # ### end Alembic commands ### + op.create_index(op.f("ix_task_comments_task_id"), "task_comments", ["task_id"], unique=False) def downgrade() -> None: """Downgrade schema.""" - # ### commands auto generated by Alembic - please adjust! ### - op.drop_index(op.f('ix_task_comments_task_id'), table_name='task_comments') - op.drop_table('task_comments') - op.drop_table('headcount_requests') - op.drop_index(op.f('ix_tasks_status'), table_name='tasks') - op.drop_index(op.f('ix_tasks_project_id'), table_name='tasks') - op.drop_table('tasks') - op.drop_table('project_members') - op.drop_index(op.f('ix_employment_actions_idempotency_key'), table_name='employment_actions') - op.drop_table('employment_actions') - op.drop_table('agent_onboardings') - op.drop_table('activities') - op.drop_index(op.f('ix_projects_name'), table_name='projects') - op.drop_table('projects') - op.drop_table('employees') - op.drop_index(op.f('ix_departments_name'), table_name='departments') - op.drop_table('departments') - # ### end Alembic commands ### + + op.drop_index(op.f("ix_task_comments_task_id"), table_name="task_comments") + op.drop_table("task_comments") + + op.drop_index(op.f("ix_tasks_status"), table_name="tasks") + op.drop_index(op.f("ix_tasks_project_id"), table_name="tasks") + op.drop_table("tasks") + + op.drop_table("project_members") + + op.drop_table("activities") + + op.drop_index(op.f("ix_projects_name"), table_name="projects") + op.drop_table("projects") + + op.drop_table("employees") + + op.drop_index(op.f("ix_departments_name"), table_name="departments") + op.drop_table("departments") diff --git a/backend/app/__pycache__/main.cpython-312.pyc b/backend/app/__pycache__/main.cpython-312.pyc deleted file mode 100644 index 49a249ce96b508686bea9a84c38a31a918dc9db8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1857 zcmah}%}*Ow5TCcZ{=i>=F&GGOXdy+8s0~F80@74zqDqkxf|{HxRo3G7uou?5*4s4* z+NeZIRVt+lIi>$XL=HXn*c_@JdVyjU`Xo!K+8lbLp_g*%?AmLnNZKd8(QjscZ{Ezj z+5IsZ4FRrC9(|?_DFDAYinjs{Kn@oqfX6_A5*^AUM~H(ZT`J2t*~PN1lzlm$ixu5p z4&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a/backend/app/api/hr.py +++ /dev/null @@ -1,16 +0,0 @@ -"""HR module removed. - -Mission Control now uses the org/people module (employees) for provisioning. -""" - -from fastapi import APIRouter - -router = APIRouter(prefix="/hr", tags=["hr"]) - - -@router.get("/") -def hr_removed(): - return { - "ok": False, - "error": "HR module removed; use /employees endpoints for provisioning", - }