feat: gitpod setup (#91)
* Add setup tasks for gitpod * chore: updating image name * chore: update image to workspace-full * chore: update all instances of workspace:* to file:* * chore: remove workspaces section on package.json * chore: update supabase command to use npx * chore: update gitpod file to use brew to install supabase cli * revert: all instances of file:* to workspace:* * chore: consolidate tasks into two steps * chore: update main to command * Update 20231115082347_remote_schema.sql * check if column exists before creating * Update .gitpod.yml with Supabase setup and project start commands * docs: add gitpod setup to readme * combine all commands * enable gitpod prebuild * remove gitpod prebuild & move dep setup to init * add prebuilds back to config * complete setup gitpod instructions * docs: add docs for gitpod setup --------- Co-authored-by: Obakeng <60041842+obakeng-develops@users.noreply.github.com>
This commit is contained in:
@@ -1258,11 +1258,42 @@ INSERT INTO "public"."question_type" (label, created_at, updated_at, typename) V
|
||||
INSERT INTO "public"."question_type" (label, created_at, updated_at, typename) VALUES ('Paragraph', '2021-08-07 18:49:46.246529+00', '2021-08-15 00:57:38.634665+00', 'TEXTAREA');
|
||||
|
||||
|
||||
alter table "storage"."buckets" drop constraint "buckets_owner_fkey";
|
||||
-- First, let's check if the constraint 'buckets_owner_fkey' exists before trying to drop it.
|
||||
DO $$
|
||||
BEGIN
|
||||
IF EXISTS (SELECT 1 FROM information_schema.constraint_column_usage
|
||||
WHERE table_schema = 'storage'
|
||||
AND table_name = 'buckets'
|
||||
AND constraint_name = 'buckets_owner_fkey') THEN
|
||||
ALTER TABLE "storage"."buckets" DROP CONSTRAINT "buckets_owner_fkey";
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
|
||||
alter table "storage"."buckets" add column "owner_id" text;
|
||||
-- Now, we check if the column 'owner_id' exists in 'buckets' before trying to add it.
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT 1 FROM information_schema.columns
|
||||
WHERE table_schema = 'storage'
|
||||
AND table_name = 'buckets'
|
||||
AND column_name = 'owner_id') THEN
|
||||
ALTER TABLE "storage"."buckets" ADD COLUMN "owner_id" text;
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
|
||||
-- Similarly, check if 'owner_id' exists in 'objects' before adding it.
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT 1 FROM information_schema.columns
|
||||
WHERE table_schema = 'storage'
|
||||
AND table_name = 'objects'
|
||||
AND column_name = 'owner_id') THEN
|
||||
ALTER TABLE "storage"."objects" ADD COLUMN "owner_id" text;
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
|
||||
alter table "storage"."objects" add column "owner_id" text;
|
||||
|
||||
create policy "Anyone can update an avatar. 1oj01fe_0"
|
||||
on "storage"."objects"
|
||||
|
||||
Reference in New Issue
Block a user