Skip to content

fix: remove erroneously added context_policy column from init.sql - #3517

Open
JasonW404 wants to merge 1 commit into
developfrom
fix/init_sql
Open

fix: remove erroneously added context_policy column from init.sql#3517
JasonW404 wants to merge 1 commit into
developfrom
fix/init_sql

Conversation

@JasonW404

Copy link
Copy Markdown
Member

Summary

Remove the context_policy JSONB column that was mistakenly added directly to deploy/sql/init.sql.

Problem

The context_policy column was incorrectly inserted into the ag_tenant_agent_t table definition in init.sql. Per the project's SQL management convention, init.sql must remain as the static baseline schema — all subsequent schema changes should only be introduced through versioned migration files under deploy/sql/migrations/.

Fix

  • Removed line 303 (context_policy JSONB,) from deploy/sql/init.sql
  • The column is already correctly defined in migration file v2.3.0_0718_add_agent_context_policy.sql, which uses ADD COLUMN IF NOT EXISTS for idempotent application

Impact

  • No functional change — the migration file already handles adding this column for both fresh and existing deployments
  • Restores init.sql to its correct static baseline state
  • Prevents the column from being created twice (once by init.sql, once by migration) on fresh deployments

The context_policy JSONB column was mistakenly added directly to
init.sql. It should only be introduced via the existing migration
v2.3.0_0718_add_agent_context_policy.sql, which uses
ADD COLUMN IF NOT EXISTS for idempotent application.
@JasonW404
JasonW404 requested a review from WMC001 as a code owner July 28, 2026 02:02
Copilot AI review requested due to automatic review settings July 28, 2026 02:02
@JasonW404
JasonW404 requested a review from Dallas98 as a code owner July 28, 2026 02:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants