waitlists table
The waitlists table in the Airline Reservation Database Schema schema has 7 columns, keyed by id, with 3 foreign keys to bookings, flights and fare_classes.
Ordered queue per flight and class. Clearing a waitlist is what happens when a cancellation frees inventory.
Columns (7)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| booking_id | uuid | not null, references bookings.id | |
| flight_id | uuid | not null, references flights.id | |
| fare_class_id | uuid | not null, references fare_classes.id | |
| position | smallint | not null | |
| status | waitlist_status | not null | |
| created_at | timestamptz | not null |
Indexes (1)
(flight_id, fare_class_id, position)
Relationships
waitlists.booking_idreferencesbookings.idwaitlists.flight_idreferencesflights.idwaitlists.fare_class_idreferencesfare_classes.id