MySQL · 907 bytes Raw Blame History
1 -- SPDX-License-Identifier: AGPL-3.0-or-later
2 --
3 -- PRO07: raise the profile_pins position cap from 6 to 100 so Pro
4 -- users can pin more than the Free baseline. The cap stays small —
5 -- 100 is "effectively unlimited for product copy, bounded for DB
6 -- sanity" per PRO01. The Free cap stays at entitlements.FreeProfilePinsCap;
7 -- enforcement lives in the handler (selectedProfilePinIDs + the per-
8 -- feature enforce flag), this migration only relaxes the table
9 -- constraint that backed the pre-PRO07 single cap.
10
11 -- +goose Up
12 ALTER TABLE profile_pins
13 DROP CONSTRAINT profile_pins_position_range;
14 ALTER TABLE profile_pins
15 ADD CONSTRAINT profile_pins_position_range CHECK (position BETWEEN 1 AND 100);
16
17 -- +goose Down
18 ALTER TABLE profile_pins
19 DROP CONSTRAINT profile_pins_position_range;
20 ALTER TABLE profile_pins
21 ADD CONSTRAINT profile_pins_position_range CHECK (position BETWEEN 1 AND 6);
22