Skip to content

Commit 79aaeda

Browse files
committed
updates
1 parent dd24e9b commit 79aaeda

File tree

135 files changed

+12998
-17939
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+12998
-17939
lines changed

backend/drizzle/20260312082559_partman_setup/snapshot.json

Lines changed: 0 additions & 5609 deletions
This file was deleted.

backend/drizzle/20260312082600_rls_setup/snapshot.json

Lines changed: 0 additions & 5609 deletions
This file was deleted.

backend/drizzle/20260312082601_seq_triggers_setup/snapshot.json

Lines changed: 0 additions & 5609 deletions
This file was deleted.

backend/drizzle/20260312173718_sour_warpath/migration.sql

Lines changed: 0 additions & 17 deletions
This file was deleted.

backend/drizzle/20260312082556_early_scarecrow/migration.sql renamed to backend/drizzle/20260312182844_brown_ulik/migration.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ CREATE TABLE "attachments" (
3030
"modified_by" varchar(50),
3131
"seq_at" bigint DEFAULT 0 NOT NULL,
3232
"public" boolean DEFAULT false NOT NULL,
33-
"public_access" boolean DEFAULT false NOT NULL,
3433
"bucket_name" varchar(255) NOT NULL,
3534
"group_id" varchar(50),
3635
"filename" varchar(255) NOT NULL,
@@ -407,20 +406,21 @@ ALTER TABLE "unsubscribe_tokens" ADD CONSTRAINT "unsubscribe_tokens_user_id_user
407406
ALTER TABLE "user_activity" ADD CONSTRAINT "user_activity_user_id_users_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE;--> statement-breakpoint
408407
ALTER TABLE "users" ADD CONSTRAINT "users_modified_by_users_id_fkey" FOREIGN KEY ("modified_by") REFERENCES "users"("id");--> statement-breakpoint
409408
CREATE POLICY "attachments_select_policy" ON "attachments" AS PERMISSIVE FOR SELECT TO public USING (
410-
409+
411410
COALESCE(current_setting('app.tenant_id', true), '') != ''
412411
AND "attachments"."tenant_id" = current_setting('app.tenant_id', true)::text
413412

414-
AND (
413+
AND current_setting('app.is_authenticated', true)::boolean = true
414+
AND
415415
COALESCE(current_setting('app.user_id', true), '') != ''
416416
AND EXISTS (
417417
SELECT 1 FROM memberships m
418418
WHERE m.organization_id = "attachments"."organization_id"
419419
AND m.user_id = current_setting('app.user_id', true)::text
420420
AND m.tenant_id = "attachments"."tenant_id"
421421
)
422-
OR "attachments"."public_access" = true)
423-
);--> statement-breakpoint
422+
423+
);--> statement-breakpoint
424424
CREATE POLICY "attachments_insert_policy" ON "attachments" AS PERMISSIVE FOR INSERT TO public WITH CHECK (
425425

426426
COALESCE(current_setting('app.tenant_id', true), '') != ''

backend/drizzle/20260312173718_sour_warpath/snapshot.json renamed to backend/drizzle/20260312182844_brown_ulik/snapshot.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"version": "8",
33
"dialect": "postgres",
4-
"id": "322037b8-82fb-40ee-a8e0-b851f4fbe37c",
4+
"id": "687fcd95-2677-4ae8-bd19-a4dba3d32977",
55
"prevIds": [
6-
"eec75c79-84c0-4f70-b001-11558351b8ad"
6+
"00000000-0000-0000-0000-000000000000"
77
],
88
"ddl": [
99
{

backend/drizzle/20260312082557_cdc_setup/migration.sql renamed to backend/drizzle/20260312182845_cdc_setup/migration.sql

File renamed without changes.

backend/drizzle/20260312082556_early_scarecrow/snapshot.json renamed to backend/drizzle/20260312182845_cdc_setup/snapshot.json

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": "8",
33
"dialect": "postgres",
4-
"id": "eec75c79-84c0-4f70-b001-11558351b8ad",
4+
"id": "687fcd95-2677-4ae8-bd19-a4dba3d32977",
55
"prevIds": [
66
"00000000-0000-0000-0000-000000000000"
77
],
@@ -501,19 +501,6 @@
501501
"schema": "public",
502502
"table": "attachments"
503503
},
504-
{
505-
"type": "boolean",
506-
"typeSchema": null,
507-
"notNull": true,
508-
"dimensions": 0,
509-
"default": "false",
510-
"generated": null,
511-
"identity": null,
512-
"name": "public_access",
513-
"entityType": "columns",
514-
"schema": "public",
515-
"table": "attachments"
516-
},
517504
{
518505
"type": "varchar(255)",
519506
"typeSchema": null,
@@ -5324,7 +5311,7 @@
53245311
"roles": [
53255312
"public"
53265313
],
5327-
"using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"attachments\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND (\n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"attachments\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"attachments\".\"tenant_id\"\n )\n OR \"attachments\".\"public_access\" = true)\n ",
5314+
"using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"attachments\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"attachments\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"attachments\".\"tenant_id\"\n )\n\n",
53285315
"withCheck": null,
53295316
"name": "attachments_select_policy",
53305317
"entityType": "policies",

backend/drizzle/20260312082558_immutability_setup/migration.sql renamed to backend/drizzle/20260312182846_immutability_setup/migration.sql

File renamed without changes.

backend/drizzle/20260312082557_cdc_setup/snapshot.json renamed to backend/drizzle/20260312182846_immutability_setup/snapshot.json

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": "8",
33
"dialect": "postgres",
4-
"id": "eec75c79-84c0-4f70-b001-11558351b8ad",
4+
"id": "687fcd95-2677-4ae8-bd19-a4dba3d32977",
55
"prevIds": [
66
"00000000-0000-0000-0000-000000000000"
77
],
@@ -501,19 +501,6 @@
501501
"schema": "public",
502502
"table": "attachments"
503503
},
504-
{
505-
"type": "boolean",
506-
"typeSchema": null,
507-
"notNull": true,
508-
"dimensions": 0,
509-
"default": "false",
510-
"generated": null,
511-
"identity": null,
512-
"name": "public_access",
513-
"entityType": "columns",
514-
"schema": "public",
515-
"table": "attachments"
516-
},
517504
{
518505
"type": "varchar(255)",
519506
"typeSchema": null,
@@ -5324,7 +5311,7 @@
53245311
"roles": [
53255312
"public"
53265313
],
5327-
"using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"attachments\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND (\n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"attachments\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"attachments\".\"tenant_id\"\n )\n OR \"attachments\".\"public_access\" = true)\n ",
5314+
"using": "\n \n COALESCE(current_setting('app.tenant_id', true), '') != ''\n AND \"attachments\".\"tenant_id\" = current_setting('app.tenant_id', true)::text\n\n AND current_setting('app.is_authenticated', true)::boolean = true\n AND \n COALESCE(current_setting('app.user_id', true), '') != ''\n AND EXISTS (\n SELECT 1 FROM memberships m\n WHERE m.organization_id = \"attachments\".\"organization_id\"\n AND m.user_id = current_setting('app.user_id', true)::text\n AND m.tenant_id = \"attachments\".\"tenant_id\"\n )\n\n",
53285315
"withCheck": null,
53295316
"name": "attachments_select_policy",
53305317
"entityType": "policies",

0 commit comments

Comments
 (0)