Repository navigation
Conversation
Policies are now created only when missing (pg_policies) instead of dropped and recreated, and the two CHECK constraints are replaced only when missing or out of date. Supabase's SQL Editor no longer flags the file as destructive, and a re-run is a no-op. The nfc_tags carry-across checks that tags.nfc_id exists. On a database that never got that column it copies from tag_id instead, skipping app-made UUID keys, so the section works when pasted on its own. Checked against Postgres 16: fresh database twice, an old-shape database with only the nfc_tags section, the whole file after it, and a re-run after a detach. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019GVgMQ79V38GrDnnF6mMB7
The old pin built with the Gradle build cache on, so a PR that changes no app source restored every compile task from the cache and CodeQL failed with "could not process any code". android-Actions #37 added --no-build-cache to the CodeQL Build step; 55fd017 is its current main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019GVgMQ79V38GrDnnF6mMB7
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.
What
DROP POLICY. All 20 policies are now created only if they're missing (checked againstpg_policies), instead of being dropped and recreated on every run. Supabase's SQL Editor no longer has a policyDROPto flag as destructive, and a re-run changes nothing.todos_due_period_checkandtags_repeat_unit_checkare replaced only if they're missing or lack the newest allowed value (checked viapg_get_constraintdef). On a database that already matches, nothing runs.nfc_tagssection works on its own. The one-time copy used to readtags.nfc_id, which only exists after an earlier section runs, so running thenfc_tagssection alone on a database without that column failed. It now checks for the column. If it's missing, it copies fromtag_idand skips app-made UUID keys, which mean "no tag".The file still never deletes a table, a column or a row.
Checked against Postgres 16
tags.nfc_id),nfc_tagssection alonetags,scansandtodos; olddue_periodCHECK widenedTests and docs
SchemaSyncTestgains two checks: the schema contains noDROP POLICY,DROP TABLEorDROP COLUMN, and thenfc_tagscopy has thetag_idfallback. The first one fails on the old file.supabase/README.mdand the file header describe the new behaviour.🤖 Generated with Claude Code
https://claude.ai/code/session_019GVgMQ79V38GrDnnF6mMB7
Generated by Claude Code