-- Language preference migration (run once on existing databases)
ALTER TABLE users ADD COLUMN locale VARCHAR(5) DEFAULT 'bn' AFTER phone;

INSERT INTO settings (setting_key, setting_value, setting_group)
VALUES ('admin_default_locale', 'en', 'general')
ON DUPLICATE KEY UPDATE setting_key = setting_key;

UPDATE users SET locale = 'bn' WHERE role = 'user' AND (locale IS NULL OR locale = '');
