Skip to content

Commit 50950ed

Browse files
committed
Merge branch 'master' of github.com:supabase/storage into monitoring/otel-metrics
2 parents 69b1952 + 6c2355f commit 50950ed

Some content is hidden

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

48 files changed

+1398
-1892
lines changed

migrations/tenant/0026-objects-prefixes.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
-- postgres-migrations ignore
12
-- Add level column to objects
23
ALTER TABLE storage.objects ADD COLUMN IF NOT EXISTS level INT NULL;
34

migrations/tenant/0027-search-v2.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
-- postgres-migrations ignore
22
CREATE OR REPLACE FUNCTION storage.search_v2 (
33
prefix text,
44
bucket_name text,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
-- postgres-migrations disable-transaction
2+
-- postgres-migrations ignore
23
CREATE UNIQUE INDEX CONCURRENTLY IF NOT EXISTS idx_name_bucket_level_unique on storage.objects (name COLLATE "C", bucket_id, level);

migrations/tenant/0029-create-prefixes.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
-- postgres-migrations disable-transaction
2+
-- postgres-migrations ignore
23
-- Backfill prefixes table records
34
-- We run this with 50k batch size to avoid long running transaction
45
DO $$

migrations/tenant/0030-update-object-levels.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
-- postgres-migrations disable-transaction
2+
-- postgres-migrations ignore
23
-- Backfill prefixes table records
34
-- We run this with 10k batch size to avoid long running transaction
45
DO $$
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
-- postgres-migrations disable-transaction
2+
-- postgres-migrations ignore
23
CREATE UNIQUE INDEX CONCURRENTLY IF NOT EXISTS "objects_bucket_id_level_idx"
34
ON "storage"."objects" ("bucket_id", level, "name" COLLATE "C");
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
-- postgres-migrations disable-transaction
2+
-- postgres-migrations ignore
23
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_objects_lower_name ON storage.objects ((path_tokens[level]), lower(name) text_pattern_ops, bucket_id, level);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
-- postgres-migrations disable-transaction
2+
-- postgres-migrations ignore
23
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_prefixes_lower_name ON storage.prefixes (bucket_id, level, ((string_to_array(name, '/'))[level]), lower(name) text_pattern_ops);

migrations/tenant/0034-optimize-search-function-v1.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
-- postgres-migrations ignore
12
create or replace function storage.search_v1_optimised (
23
prefix text,
34
bucketname text,

migrations/tenant/0035-add-insert-trigger-prefixes.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
-- postgres-migrations ignore
22
-- This trigger is used to create the hierarchy of prefixes
33
-- When writing directly in the prefixes table
44
CREATE OR REPLACE TRIGGER "prefixes_create_hierarchy"

0 commit comments

Comments
 (0)