Testing Tenant Profile Updates


Test 1: Checking tenant_profiles table structure

Columns in tenant_profiles table:
- id (int(11))
- user_id (int(11))
- date_of_birth (date)
- gender (enum('male','female','other'))
- occupation (varchar(100))
- emergency_contact_name (varchar(100))
- emergency_contact_phone (varchar(20))
- emergency_contact_relationship (varchar(50))
- address (text)
- preferred_location (varchar(255))
- preferred_room_type (varchar(50))
- preferred_price_min (decimal(10,2))
- preferred_price_max (decimal(10,2))
- preferred_amenities (text)
- tenant_score (int(11))
- has_active_booking (tinyint(1))
- current_room_id (int(11))

Test 2: Checking for timestamp columns

Has 'created_at' column: NO ✗
Has 'updated_at' column: NO ✗
Has 'address' column: NO ✗

Good: The table structure matches the expected schema (no created_at, updated_at, or address columns).

Test 3: Testing Database class methods

Available methods in Database class:
- connect()
- close()
- query()
- getRow()
- getRows()
- insert()
- update()
- delete()
- count()
- beginTransaction()
- commit()
- rollback()
- getLastError()

Database class has 'getRows()' method

Database class does NOT have 'getAll()' method (as expected)


Summary

Status: The following files have been fixed:

Next Steps:

  1. Go to your account page and try updating your personal information
  2. Go to the preferences tab and try updating your room preferences
  3. Check if the tenant_profiles table is being updated correctly