ALTER TABLE telegram_bot_settings ALTER COLUMN command_auto_delete_seconds SET DEFAULT 60; -- The preceding migration introduced this setting with a disabled default. -- Enable the requested cleanup for existing installations while retaining 0 -- as the explicit opt-out value in the administration UI. UPDATE telegram_bot_settings SET command_auto_delete_seconds = 60 WHERE singleton AND command_auto_delete_seconds = 0;