18 lines
589 B
SQL
18 lines
589 B
SQL
-- Add personal privacy switch for requiring approval when others invite the user into a group.
|
|
-- Default is off to preserve existing behavior.
|
|
|
|
SET @im_sql = (
|
|
SELECT IF(
|
|
COUNT(*) = 0,
|
|
'ALTER TABLE tinode.im_user_privacy_settings ADD COLUMN group_invite_verification TINYINT NOT NULL DEFAULT 0 AFTER read_receipts',
|
|
'SELECT 1'
|
|
)
|
|
FROM information_schema.columns
|
|
WHERE table_schema = 'tinode'
|
|
AND table_name = 'im_user_privacy_settings'
|
|
AND column_name = 'group_invite_verification'
|
|
);
|
|
PREPARE im_stmt FROM @im_sql;
|
|
EXECUTE im_stmt;
|
|
DEALLOCATE PREPARE im_stmt;
|