Skip to content

Commit

Permalink
add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
imor committed Dec 5, 2023
1 parent a29461d commit 005a3a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion supabase/migrations/20231205051816_add_default_version.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- The original semver domain defined in 20220117141507_semver.sql doesn't allow null
-- app.semver_struct values, but we need a nullable app.semver column for the new
-- default_version_struct column in the app.packages table (see alter table app.package below).
-- default_version_struct column in the app.packages table (see alter table app.packages below).
-- So we modify the `is_valid` function such that it returns true if the input version itself is
-- null. All the existing tables where app.semver domain is used already have an additional
-- non null constraint, so their behaviour doesn't change.
Expand Down Expand Up @@ -66,6 +66,7 @@ create or replace view public.packages as
limit 1
) newest_ver;

-- grant insert and update permissions to authenticated users on the new default_version_struct column
grant insert (partial_name, handle, control_description, control_relocatable, control_requires, default_version_struct)
on app.packages
to authenticated;
Expand Down

0 comments on commit 005a3a1

Please sign in to comment.