-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from novaforgood/dev
Deploy prod
- Loading branch information
Showing
46 changed files
with
6,170 additions
and
39 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
hasura/metadata/databases/mentorcenter/tables/public_block.yaml
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,41 @@ | ||
table: | ||
name: block | ||
schema: public | ||
object_relationships: | ||
- name: blocked_profile | ||
using: | ||
foreign_key_constraint_on: blocked_profile_id | ||
- name: blocker_profile | ||
using: | ||
foreign_key_constraint_on: blocker_profile_id | ||
insert_permissions: | ||
- role: user | ||
permission: | ||
check: | ||
_or: | ||
- blocker_profile: | ||
user_id: | ||
_eq: X-Hasura-User-Id | ||
columns: | ||
- blocked_profile_id | ||
- blocker_profile_id | ||
select_permissions: | ||
- role: user | ||
permission: | ||
columns: | ||
- id | ||
- blocker_profile_id | ||
- blocked_profile_id | ||
filter: | ||
_or: | ||
- blocker_profile: | ||
user_id: | ||
_eq: X-Hasura-User-Id | ||
delete_permissions: | ||
- role: user | ||
permission: | ||
filter: | ||
_or: | ||
- blocker_profile: | ||
user_id: | ||
_eq: X-Hasura-User-Id |
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
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
31 changes: 31 additions & 0 deletions
31
hasura/migrations/mentorcenter/1684185864247_squashed/down.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,31 @@ | ||
|
||
-- Could not auto-generate a down migration. | ||
-- Please write an appropriate down migration for the SQL below: | ||
-- CREATE OR REPLACE FUNCTION public.profile_blocked_by_user(profile_row profile, hasura_session json) | ||
-- RETURNS boolean | ||
-- LANGUAGE sql | ||
-- STABLE | ||
-- AS $function$ | ||
-- SELECT EXISTS ( | ||
-- SELECT 1 | ||
-- FROM block | ||
-- JOIN profile ON block.blocker_profile_id = profile.id | ||
-- WHERE block.blocker_profile_id = profile.id | ||
-- AND profile.user_id = hasura_session ->> 'x-hasura-user-id' | ||
-- ); | ||
-- $function$; | ||
|
||
-- Could not auto-generate a down migration. | ||
-- Please write an appropriate down migration for the SQL below: | ||
-- CREATE OR REPLACE FUNCTION profile_blocked_by_user(profile_row profile, hasura_session json) | ||
-- RETURNS boolean AS $$ | ||
-- SELECT EXISTS ( | ||
-- SELECT 1 | ||
-- FROM block | ||
-- JOIN profile ON block.blocker_profile_id = profile.id | ||
-- WHERE block.blocker_profile_id = profile_row.id | ||
-- AND profile.user_id = hasura_session ->> 'x-hasura-user-id' | ||
-- ); | ||
-- $$ LANGUAGE sql STABLE; | ||
|
||
DROP TABLE "public"."block"; |
17 changes: 17 additions & 0 deletions
17
hasura/migrations/mentorcenter/1684185864247_squashed/up.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,17 @@ | ||
|
||
CREATE TABLE "public"."block" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "blocker_profile_id" uuid NOT NULL, "blocked_profile_id" uuid NOT NULL, PRIMARY KEY ("id") , FOREIGN KEY ("blocker_profile_id") REFERENCES "public"."profile"("id") ON UPDATE restrict ON DELETE restrict, FOREIGN KEY ("blocked_profile_id") REFERENCES "public"."profile"("id") ON UPDATE restrict ON DELETE restrict, UNIQUE ("blocker_profile_id", "blocked_profile_id"));COMMENT ON TABLE "public"."block" IS E'Each row represents a profile blocking another profile'; | ||
CREATE EXTENSION IF NOT EXISTS pgcrypto; | ||
|
||
CREATE OR REPLACE FUNCTION public.profile_blocked_by_user(profile_row profile, hasura_session json) | ||
RETURNS boolean | ||
LANGUAGE sql | ||
STABLE | ||
AS $function$ | ||
SELECT EXISTS ( | ||
SELECT 1 | ||
FROM block | ||
JOIN profile ON block.blocker_profile_id = profile.id | ||
WHERE block.blocker_profile_id = profile.id | ||
AND profile.user_id = hasura_session ->> 'x-hasura-user-id' | ||
); | ||
$function$; |
16 changes: 16 additions & 0 deletions
16
hasura/migrations/mentorcenter/1684187688275_modify_profile_blocked_by_user_func/down.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,16 @@ | ||
-- Could not auto-generate a down migration. | ||
-- Please write an appropriate down migration for the SQL below: | ||
-- CREATE OR REPLACE FUNCTION public.profile_blocked_by_user(profile_row profile, hasura_session json) | ||
-- RETURNS boolean | ||
-- LANGUAGE sql | ||
-- STABLE | ||
-- AS $function$ | ||
-- SELECT EXISTS ( | ||
-- SELECT 1 | ||
-- FROM block | ||
-- JOIN profile ON block.blocker_profile_id = profile.id | ||
-- WHERE block.blocker_profile_id = profile.id | ||
-- AND block.blocked_profile_id = profile.id | ||
-- AND profile.user_id = hasura_session ->> 'x-hasura-user-id' | ||
-- ); | ||
-- $function$; |
14 changes: 14 additions & 0 deletions
14
hasura/migrations/mentorcenter/1684187688275_modify_profile_blocked_by_user_func/up.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,14 @@ | ||
CREATE OR REPLACE FUNCTION public.profile_blocked_by_user(profile_row profile, hasura_session json) | ||
RETURNS boolean | ||
LANGUAGE sql | ||
STABLE | ||
AS $function$ | ||
SELECT EXISTS ( | ||
SELECT 1 | ||
FROM block | ||
JOIN profile ON block.blocker_profile_id = profile.id | ||
WHERE block.blocker_profile_id = profile.id | ||
AND block.blocked_profile_id = profile.id | ||
AND profile.user_id = hasura_session ->> 'x-hasura-user-id' | ||
); | ||
$function$; |
16 changes: 16 additions & 0 deletions
16
hasura/migrations/mentorcenter/1684188157130_modify_profile_blocked_by_user/down.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,16 @@ | ||
-- Could not auto-generate a down migration. | ||
-- Please write an appropriate down migration for the SQL below: | ||
-- CREATE OR REPLACE FUNCTION public.profile_blocked_by_user(profile_row profile, hasura_session json) | ||
-- RETURNS boolean | ||
-- LANGUAGE sql | ||
-- STABLE | ||
-- AS $function$ | ||
-- SELECT EXISTS ( | ||
-- SELECT 1 | ||
-- FROM block | ||
-- JOIN profile ON block.blocker_profile_id = profile.id | ||
-- WHERE block.blocker_profile_id = profile.id | ||
-- AND block.blocked_profile_id = profile_row.id | ||
-- AND profile.user_id = hasura_session ->> 'x-hasura-user-id' | ||
-- ); | ||
-- $function$; |
14 changes: 14 additions & 0 deletions
14
hasura/migrations/mentorcenter/1684188157130_modify_profile_blocked_by_user/up.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,14 @@ | ||
CREATE OR REPLACE FUNCTION public.profile_blocked_by_user(profile_row profile, hasura_session json) | ||
RETURNS boolean | ||
LANGUAGE sql | ||
STABLE | ||
AS $function$ | ||
SELECT EXISTS ( | ||
SELECT 1 | ||
FROM block | ||
JOIN profile ON block.blocker_profile_id = profile.id | ||
WHERE block.blocker_profile_id = profile.id | ||
AND block.blocked_profile_id = profile_row.id | ||
AND profile.user_id = hasura_session ->> 'x-hasura-user-id' | ||
); | ||
$function$; |
Oops, something went wrong.
163175f
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.
Successfully deployed to the following URLs:
canopy – ./
canopy-git-main-novaforgood.vercel.app
canopy-novaforgood.vercel.app
www.joincanopy.org
joincanopy.org
canopy-prod.vercel.app