Columns
Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
---|---|---|---|---|---|---|---|---|---|---|---|
migrated_ticket_id | int4 | 10 | null |
|
|
A primary ID unique to this table, NOT the original ticket ID. |
|||||
migrated_ticket_timestamp | timestamptz | 35,6 | √ | null |
|
|
Timestamp of when the ticket was originally purchased. |
||||
migration_timestamp | timestamptz | 35,6 | √ | null |
|
|
Timestamp of when the ticket was actually migrated. |
||||
game_offer_names | text | 2147483647 | √ | null |
|
|
A human readable offer name (e.g. Standard, 10 book, etc). |
||||
dim_draw_id | int4 | 10 | √ | null |
|
|
Relates to dim_draw, which includes draw number data. |
||||
original_customer_id | text | 2147483647 | √ | null |
|
|
Customer id as it exists in the original database, i.e. stored in node customer table as external_customer_id. |
||||
customer_encoded_id | text | 2147483647 | √ | null |
|
|
PBJ customer encoded id. |
||||
ticket_status_id | int4 | 10 | √ | null |
|
|
0=TICKET_LIMBO; 5=TICKET_CREATING; 10=TICKET_PENDING; 20=TICKET_BUYING; 25=TICKET_IMPORTING; 30=TICKET_PURCHASED; 40=TICKET_PAID; 50=TICKET_CANCELLING; 60=TICKET_CANCELLED; 70=TICKET_FAILED |
||||
sales | numeric | 15,5 | √ | null |
|
|
How much the ticket cost |
||||
prize | numeric | 15,5 | √ | null |
|
|
How much the ticket won |
||||
entry_count | int8 | 19 | √ | null |
|
|
How many games were included in this purchase. |
||||
lottery_names | text | 2147483647 | √ | null |
|
|
Which lotteries were played in this purchase. |
||||
lottery_type_name | text | 2147483647 | √ | null |
|
|
Lotto/Raffle/etc. |
||||
dim_pricing_id | int4 | 10 | null |
|
|
||||||
favourite | bool | 1 | √ | null |
|
|
Was this ticket marked as a favourite. |
||||
replay | bool | 1 | √ | null |
|
|
Was this ticket a replay. |
Indexes
Constraint Name | Type | Sort | Column(s) |
---|---|---|---|
migrated_ticket_sales_pkey | Primary key | Asc | migrated_ticket_id |
idx_migrated_ticket_sales_customer_encoded_id | Performance | Asc | customer_encoded_id |
idx_migrated_ticket_sales_dim_draw_id | Performance | Asc | dim_draw_id |
idx_migrated_ticket_sales_migrated_ticket_timestamp | Performance | Asc | migrated_ticket_timestamp |
idx_migrated_ticket_sales_original_customer_id | Performance | Asc | original_customer_id |
idx_migrated_ticket_sales_ticket_status_id | Performance | Asc | ticket_status_id |