teldrive/database/migrations/20230911113331_alter_table.sql
2023-09-11 11:40:03 +05:30

8 lines
No EOL
214 B
SQL

-- +goose Up
-- +goose StatementBegin
ALTER TABLE teldrive.files DROP CONSTRAINT unique_file;
ALTER TABLE teldrive.files ADD CONSTRAINT unique_file UNIQUE (name, parent_id, user_id,status)
-- +goose StatementEnd