Skip to content
Snippets Groups Projects
Commit bfafe94e authored by Auri's avatar Auri
Browse files

sql/v1tov2: path_full_stem(path) is unique per-bucket

parent a01186b3
No related branches found
No related tags found
1 merge request!4Draft: Migrate the database to schema v2
......@@ -270,8 +270,8 @@ ALTER TABLE object
DROP COLUMN dir,
DROP COLUMN random_key;
CREATE UNIQUE INDEX object_path_full_stem_path_key
ON object (path_full_stem(path))
CREATE UNIQUE INDEX object_bucket_path_full_stem_path_key
ON object (bucket, path_full_stem(path))
WHERE enforce_unique_name;
CREATE FUNCTION _object_before_insert_normalize_path() RETURNS trigger
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment