fix(db): repair Supabase Preview migration replay failures#305
Merged
Conversation
…nel rewrite Supabase Preview branches fail with SQLSTATE 42P13 when this migration attempts CREATE OR REPLACE on a function whose OUT signature differs from the live database. Drop first, matching the phase-7 migration pattern. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…lumn Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
BigSimmo
marked this pull request as ready for review
July 5, 2026 23:50
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes failing Supabase Preview checks caused by two migration replay issues.
1.
match_document_chunks_textreturn type change (SQLSTATE 42P13)PostgreSQL rejects
CREATE OR REPLACEwhen OUT columns differ from the live database. Added the sameDROP FUNCTION IF EXISTSguard used in phase-7 migrations before recreatingmatch_document_chunks_text.2. Promote migration references non-existent
updated_atcolumns (SQLSTATE 42703)20260706120000_promote_remaining_indexed_documents_public.sql(merged via #294) attempted to setupdated_atondocument_table_factsanddocument_embedding_fields, which only havecreated_at. Removed the invalid column updates.Changes
supabase/migrations/20260705210000_retrieval_owner_filter_sentinel.sql— drop before recreatesupabase/migrations/20260706120000_promote_remaining_indexed_documents_public.sql— omitupdated_aton tables without itsupabase/schema.sql— drop before recreatetests/supabase-schema.test.ts— replay guard testVerification
npm run verify:cheap— passnpm run test -- tests/supabase-schema.test.ts— pass