2026-06-06 23:51:30 -04:00
|
|
|
-- +goose Up
|
|
|
|
|
-- +goose StatementBegin
|
2026-05-22 20:26:11 -04:00
|
|
|
UPDATE public.users
|
|
|
|
|
SET max_profiles = 5
|
|
|
|
|
WHERE max_profiles < 1;
|
|
|
|
|
|
|
|
|
|
ALTER TABLE public.users
|
|
|
|
|
ALTER COLUMN max_profiles SET DEFAULT 5,
|
|
|
|
|
ADD CONSTRAINT users_max_profiles_min_check CHECK (max_profiles >= 1);
|
|
|
|
|
|
|
|
|
|
UPDATE public.server_settings
|
|
|
|
|
SET value = '5'
|
|
|
|
|
WHERE key = 'defaults.max_profiles'
|
|
|
|
|
AND (value IS NULL OR value = '' OR value = '0');
|
2026-06-06 23:51:30 -04:00
|
|
|
-- +goose StatementEnd
|
|
|
|
|
|
|
|
|
|
-- +goose Down
|
|
|
|
|
-- +goose StatementBegin
|
|
|
|
|
ALTER TABLE public.users
|
|
|
|
|
DROP CONSTRAINT IF EXISTS users_max_profiles_min_check,
|
|
|
|
|
ALTER COLUMN max_profiles SET DEFAULT 0;
|
|
|
|
|
-- +goose StatementEnd
|