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.
feat(db): Onda 19 — precisão explícita em 21 colunas numeric (item 5.4) #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
feat(db): Onda 19 — precisão explícita em 21 colunas numeric (item 5.4) #214
Changes from all commits
36d50f2File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this migration is applied from a clean database built from the repository migrations,
public.fn_quotes_calc_real_values()is never created (repo-wide search ofsupabase/migrationsandrecoveryonly finds this call), so PostgreSQL will fail atCREATE TRIGGER ... EXECUTE FUNCTIONand roll back the migration before any later steps run. Either recreate the trigger against the existing checked-in function (validate_quote_real_discount) or add/commit the missing function before this trigger is created.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same clean-migration path fails here because
public.fn_kit_print_area_normalizar_eixos()is not defined anywhere in the checked-in migrations or recovery SQL;CREATE TRIGGERrequires the referenced trigger function to already exist. This makessupabase db reset/new environment provisioning depend on untracked production drift instead of the repository state.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/redeploy/REDEPLOY-FASE2-EXECUTION-LOG.mdclassifiesv_audit_paradoxos_gravacaoas internal/service-role-only and says those views were hardened withsecurity_invoker=trueplus role revokes; dropping and recreating it here does not restore either setting. In environments with the same exposed-schema/default grants, this silently reverts the view to owner-rights semantics and can expose the underlying pricing audit rows without the intended RLS/role boundary, so the migration should reapply theALTER VIEW ... SET (security_invoker = true)and grants/revokes after creation.Useful? React with 👍 / 👎.
Uh oh!
There was an error while loading. Please reload this page.