--up

ALTER TABLE samples ALTER COLUMN s3_key DROP NOT NULL;
ALTER TABLE samples ADD CONSTRAINT samples_at_least_one_s3_key CHECK (NOT (s3_key IS NULL AND compressed_s3_key IS NULL));

--down

ALTER TABLE samples ALTER COLUMN s3_key SET NOT NULL;
ALTER TABLE samples DROP CONSTRAINT samples_at_least_one_s3_key;
