teldrive/internal/database/migrations/20240531194913_modify_constraint.sql

6 lines
287 B
MySQL
Raw Normal View History

2024-06-01 07:14:47 +08:00
-- +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