refunds table

The refunds table in the Airline Reservation Database Schema schema has 9 columns, keyed by id, with 2 foreign keys to payments and tickets.

Refunds act on TICKETS, not on bookings, and record the penalty separately so the fare rule applied stays visible.

Columns (9)

Columns of the refunds table
ColumnTypeConstraintsDescription
iduuidprimary key
payment_iduuidnot null, references payments.id
ticket_iduuidreferences tickets.id
statusrefund_statusnot null
amount_minorbigintnot null
penalty_minorbigintnot null
currencychar(3)not null
reasonvarchar(255)
processed_attimestamptz

Indexes (1)

  • (payment_id)

Relationships