teldrive/internal/database/migrations/20240531194913_modify_constraint.sql
2024-06-01 10:57:10 +05:30

6 lines
No EOL
287 B
SQL

-- +goose Up
-- +goose StatementBegin
ALTER TABLE teldrive.uploads DROP CONSTRAINT IF EXISTS uploads_pk;
ALTER TABLE teldrive.uploads DROP CONSTRAINT IF EXISTS uploads_pkey;
ALTER TABLE teldrive.uploads ADD CONSTRAINT uploads_pkey PRIMARY KEY (part_id,channel_id);
-- +goose StatementEnd