Skip to content

Update jobs table#94

Merged
hladush merged 1 commit intomainfrom
ihladush/update_jobs_table
Feb 23, 2026
Merged

Update jobs table#94
hladush merged 1 commit intomainfrom
ihladush/update_jobs_table

Conversation

@hladush
Copy link
Contributor

@hladush hladush commented Feb 23, 2026

Increases the field length for the job_context column to accommodate autogenerated SQL for wide tables.

Testing

Run on local machine
image

Copilot AI review requested due to automatic review settings February 23, 2026 16:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Heimdall jobs table schema to support larger job_context payloads so autogenerated SQL for wide tables fits without truncation/errors.

Changes:

  • Adds an idempotent migration block to expand jobs.job_context to VARCHAR(131070) when the current length is smaller.
  • Separates the existing cancelled_by cleanup DO $$ block from the new job_context migration by closing the first block explicitly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +34 to +37
do $$ begin
if exists (select 1 from information_schema.columns where table_name = 'jobs' and column_name = 'job_context' and character_maximum_length < 131070) then
alter table jobs alter column job_context TYPE VARCHAR(131070);
end if;
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The create table statement still declares job_context as varchar(65535), but this new migration expands it to varchar(131070). Consider updating the create table column definition (and/or adding a short rationale comment here) so the file reflects the intended final schema and avoids an extra ALTER TABLE on fresh installs.

Copilot uses AI. Check for mistakes.
@hladush hladush merged commit 4c220e0 into main Feb 23, 2026
11 checks passed
@hladush hladush deleted the ihladush/update_jobs_table branch February 23, 2026 17:12
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.

4 participants