Skip to content

Revert "Make enrichment_pipeline_runs.status NOT NULL with default 'running'"#152

Merged
Asper Beauty Shop (asperpharma) merged 1 commit into
install-skill-67990from
revert-151-copilot/sub-pr-75
Mar 12, 2026
Merged

Revert "Make enrichment_pipeline_runs.status NOT NULL with default 'running'"#152
Asper Beauty Shop (asperpharma) merged 1 commit into
install-skill-67990from
revert-151-copilot/sub-pr-75

Conversation

@asperpharma
Copy link
Copy Markdown
Member

Reverts #151

Copilot AI review requested due to automatic review settings March 12, 2026 06:20
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 12, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 976ad48d-3d48-4fc0-abb7-84a8aeb02bcc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

🎁 Summarized by CodeRabbit Free

The PR author is not assigned a seat. To perform a comprehensive line-by-line review, please assign a seat to the pull request author through the subscription management page by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request reverts a previous change that added a NOT NULL constraint and a default value to the status column in the enrichment_pipeline_runs table. The purpose is to restore the column's previous behavior, allowing it to be nullable and removing the automatic default assignment.

Highlights

  • Database Schema Reversion: The status column in the enrichment_pipeline_runs table has been reverted to allow NULL values and no longer has a default value of 'running'. This undoes a previous migration that enforced NOT NULL and a default.
Changelog
  • supabase/migrations/20260303100000_digital_tray_products_enrichment_columns.sql
    • Removed the NOT NULL constraint from the status column.
    • Removed the DEFAULT 'running' clause from the status column.
Activity
  • No human activity has been recorded for this pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment Gemini (@gemini-code-assist) Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@asperpharma Asper Beauty Shop (asperpharma) merged commit d05a377 into install-skill-67990 Mar 12, 2026
1 of 2 checks passed
@asperpharma Asper Beauty Shop (asperpharma) deleted the revert-151-copilot/sub-pr-75 branch March 12, 2026 06:20
Copy link
Copy Markdown

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 reverts PR #151, which had made the enrichment_pipeline_runs.status column NOT NULL with a default of 'running'. The revert removes both the NOT NULL constraint and the DEFAULT 'running' clause, keeping only the CHECK constraint.

Changes:

  • Reverts the status column in enrichment_pipeline_runs to be nullable with no default value

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request reverts a change that made the enrichment_pipeline_runs.status column NOT NULL with a default value. While this might be a necessary short-term fix, my review points out that making the status column nullable is a potential data integrity risk. I've suggested alternative approaches that would solve the underlying issue without allowing NULL values, such as keeping the NOT NULL constraint but removing the default, or adding a new explicit initial state.

products_failed INTEGER DEFAULT 0,
errors JSONB DEFAULT '[]',
status TEXT NOT NULL DEFAULT 'running' CHECK (status IN ('running', 'completed', 'failed', 'partial')),
status TEXT CHECK (status IN ('running', 'completed', 'failed', 'partial')),
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.

high

While this revert may fix an immediate problem, making the status column nullable introduces potential data integrity issues and ambiguity. A NULL status is hard to interpret and complicates queries, as they need to handle NULL explicitly.

It's a database design best practice to keep status columns NOT NULL. To resolve the issue that prompted this revert without sacrificing data integrity, please consider one of the following alternatives:

  1. Keep NOT NULL and remove DEFAULT: This would enforce that every INSERT operation explicitly provides a status, which could help uncover issues in client code.

    status TEXT NOT NULL CHECK (status IN ('running', 'completed', 'failed', 'partial')),
  2. Introduce an explicit initial state: If a state before 'running' is needed, it's better to add it to the CHECK constraint rather than using NULL.

    status TEXT NOT NULL DEFAULT 'pending' CHECK (status IN ('pending', 'running', 'completed', 'failed', 'partial')),

These approaches maintain a clear and unambiguous state for every pipeline run.

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