-- Add created_by to users_logs for auditing who (admin) created the user.
-- user_id in users_logs maps to users.user_id (the created user).
-- Run once; if created_by already exists, the ADD COLUMN will error - skip it.

-- If your table is named users_logs:
ALTER TABLE users_logs ADD COLUMN created_by INT NULL;
ALTER TABLE users_logs MODIFY COLUMN created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP;

-- If your table is named user_logs (no 's'), run this instead and ensure app uses user_logs:
-- ALTER TABLE user_logs ADD COLUMN created_by INT NULL;
-- ALTER TABLE user_logs MODIFY COLUMN created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
