refactor(reporting): enhance timezone handling and clean up migration

- Updated SQL queries in reporting controllers to join with the timezones table for accurate timezone retrieval.
- Refactored ReportingMembersController to extend ReportingControllerBaseWithTimezone for centralized timezone logic.
- Removed obsolete migration file that added a timezone column to the users table, as it is no longer needed.
This commit is contained in:
chamikaJ
2025-07-24 09:25:50 +05:30
parent 69b2fe1a90
commit de26417247
5 changed files with 29 additions and 25 deletions

View File

@@ -1,8 +0,0 @@
-- Add timezone column to users table
ALTER TABLE users ADD COLUMN IF NOT EXISTS timezone VARCHAR(50) DEFAULT 'UTC';
-- Add index for better query performance
CREATE INDEX IF NOT EXISTS idx_users_timezone ON users(timezone);
-- Update existing users to use their browser timezone (this would be done via application logic)
COMMENT ON COLUMN users.timezone IS 'IANA timezone identifier (e.g., America/New_York, Asia/Tokyo)';