📋 Bookings Table Structure Check


Existing Columns in Bookings Table:

ColumnTypeNullKeyDefault
idint(11)NOPRINULL
booking_referencevarchar(50)NOUNINULL
tenant_idint(11)NOMULNULL
room_idint(11)NOMULNULL
agent_idint(11)YESMULNULL
booking_datetimestampNOcurrent_timestamp()
move_in_datedateNONULL
durationint(11)NONULL
payment_optionenum('monthly','quarterly','biannual','annual')NOmonthly
booking_optionenum('pay_then_inspect','inspect_then_pay')NONULL
payment_locationvarchar(100)YESNULL
inspection_datedateYESNULL
inspection_timetimeYESNULL
statusenum('pending','pending_payment','deposit_paid','inspection_scheduled','inspection_completed','awaiting_full_payment','payment_completed','refund_requested','refunded','cancelled','expired','active','completed','confirmed')NOpending_payment
payment_completed_atdatetimeYESNULL
activated_atdatetimeYESNULL
deposit_paidtinyint(1)NO0
deposit_amountdecimal(10,2)YESNULL
deposit_payment_datetimestampYESNULL
inspection_completedtinyint(1)NO0
inspection_date_completedtimestampYESNULL
agreement_signedtinyint(1)NO0
agreement_signed_datetimestampYESNULL
agreement_filevarchar(255)YESNULL
created_attimestampNOcurrent_timestamp()
updated_attimestampNOcurrent_timestamp()
total_rentdecimal(10,2)NO0.00
security_depositdecimal(10,2)NO0.00
booking_feedecimal(10,2)NO0.00
total_amountdecimal(10,2)NO0.00
amount_paiddecimal(10,2)NO0.00
balancedecimal(10,2)NO0.00
currencyvarchar(3)NOGHS
inspection_statusenum('pending','scheduled','completed','cancelled')YESMULpending
inspection_typeenum('virtual','onsite')YESNULL
inspection_feedbacktextYESNULL
inspection_satisfiedtinyint(1)YESNULL
refund_requestedtinyint(1)NO0
refund_amountdecimal(10,2)YESNULL
refund_statusenum('pending','processing','completed','failed')YESMULNULL
refund_datetimestampYESNULL
full_payment_deadlinetimestampYESNULL
auto_refund_triggeredtinyint(1)NO0
payment_gateway_idint(11)YESMULNULL
hostel_option_idint(11)YESNULL
selected_occupancyint(11)YESNULL
notestextYESNULL
tenant_inspection_confirmedtinyint(1)YES0
landlord_inspection_confirmedtinyint(1)YES0
inspection_confirmed_atdatetimeYESNULL
payment_deadlinedatetimeYESMULNULL
cancellation_reasontextYESNULL
cancelled_byint(11)YESNULL
cancelled_atdatetimeYESMULNULL
refund_feedecimal(10,2)YESNULL
refund_processedtinyint(1)YES0
refund_processed_atdatetimeYESNULL

Column Verification:

✅ id - EXISTS
✅ booking_reference - EXISTS
✅ tenant_id - EXISTS
✅ room_id - EXISTS
✅ agent_id - EXISTS
✅ move_in_date - EXISTS
✅ duration - EXISTS
✅ total_rent - EXISTS
✅ security_deposit - EXISTS
✅ booking_fee - EXISTS
✅ total_amount - EXISTS
✅ amount_paid - EXISTS
✅ balance - EXISTS
✅ currency - EXISTS
✅ status - EXISTS
✅ inspection_status - EXISTS
✅ inspection_type - EXISTS
✅ inspection_date - EXISTS
✅ inspection_time - EXISTS
✅ payment_gateway_id - EXISTS
✅ hostel_option_id - EXISTS
✅ selected_occupancy - EXISTS
✅ deposit_paid - EXISTS
✅ deposit_amount - EXISTS
✅ deposit_payment_date - EXISTS
✅ notes - EXISTS
✅ created_at - EXISTS
✅ updated_at - EXISTS

✅ SUCCESS!

All required columns exist in the bookings table.

Your database is properly configured for bookings.


â„šī¸ Additional Columns (not in required list):

These columns are not required but may be used by other features.


🔗 Quick Links:

Clear CacheTest Booking InsertTest Database Method