--- system-chats-settings-add-user-id

IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID('system_chats_settings') AND name = 'user_id')
BEGIN
    ALTER TABLE system_chats_settings ADD user_id BIGINT references users(id)
END
