dim_draw

-1 rows


Description

A dimension table to normalise draws for the lotteries

Columns

Column Type Size Nulls Auto Default Children Parents Comments
dim_draw_id serial 10 nextval('dim_draw_dim_draw_id_seq'::regclass)
migrated_and_current_ticket_sales.dim_draw_id Implied Constraint R
migrated_ticket_sales.dim_draw_id migrated_ticket_sales_dim_draw_id R
recurring_purchase.starting_dim_draw_id recurring_purchase_starting_dim_draw_id_fkey R
ticket_sales.dim_draw_id ticket_sales_dim_draw_id_fkey R
wager.cancelled_dim_date_id wager_dim_date_id_fkey R
wager.dim_draw_id wager_dim_draw_id_fkey R

An identifier for this dimension

version int4 10 null

Version of this dimension as it applies to dim_draw_id

date_from timestamp 29,6 null

When this dimension applies from

date_to timestamp 29,6 null

When this dimension applies to

draw_no int4 10 null

Draw number (distinct from its ID)

dim_lottery_id int4 10 null
dim_lottery.dim_lottery_id Implied Constraint R

Ref: see table dim_lottery

draw_prize_pool numeric 14,2 null

Prize pool as it applies to this draw

ranges text 2147483647 null

Ticket ranges which apply to this draw (for raffle lotteries only)

draw_date timestamptz 35,6 null

When this draw was/will be drawn. This will be some time after the draw_stop date

Indexes

Constraint Name Type Sort Column(s)
dim_draw_pkey Primary key Asc dim_draw_id
idx_dim_draw_lookup Performance Asc/Asc draw_no + dim_lottery_id
idx_dim_draw_tk Performance Asc dim_draw_id

Relationships