-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
control-plane: fix pruning of unchanged specs
This is a quick fix for the pruning of unchanged draft specs. It stops trying to account for inferred schema changes, since those are now part of the spec itself, and the `inferred_schema_md5` column is no longer used. (We can remove it in a subsequent migration).
- Loading branch information
Showing
2 changed files
with
32 additions
and
33 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
supabase/migrations/57_prune_unchanged_draft_specs_inferred_schemas.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
begin; | ||
|
||
create or replace view unchanged_draft_specs as | ||
select | ||
draft_id, | ||
catalog_name, | ||
spec_type, | ||
live_spec_md5, | ||
draft_spec_md5, | ||
inferred_schema_md5, | ||
live_inferred_schema_md5 | ||
from draft_specs_ext d | ||
where draft_spec_md5 = live_spec_md5; | ||
grant select on unchanged_draft_specs to authenticated; | ||
comment on view unchanged_draft_specs is | ||
'View of `draft_specs_ext` that is filtered to only include specs that are identical to the | ||
current `live_specs`.'; | ||
|
||
commit; |
This file contains 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