booking.resource

Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: resource_owner_fkey, resource_type_fkey.

Columns

Column Type Nullable Default Notes

id PK

integer

No

nextval('booking.resource_id_seq'::regclass)

owner FK

integer

No

actor.org_unit(id)

type FK

integer

No

booking.resource_type(id)

overbook

boolean

No

false

barcode

text

No

deposit

boolean

No

false

deposit_amount

numeric(8,2)

No

0.00

user_fee

numeric(8,2)

No

0.00

Primary Key

(id)

Foreign Keys

Column(s) References On Delete On Update Deferrable Constraint

owner

actor.org_unit(id)

NO ACTION

NO ACTION

DEFERRED

resource_owner_fkey

type

booking.resource_type(id)

NO ACTION

NO ACTION

DEFERRED

resource_type_fkey

Unique Constraints

  • br_unique: (owner, barcode)

Indexes

Index Method Definition

resource_pkey PK

btree

CREATE UNIQUE INDEX resource_pkey ON booking.resource USING btree (id)

br_unique UNIQUE

btree

CREATE UNIQUE INDEX br_unique ON booking.resource USING btree (owner, barcode)

Referenced By

The following tables have foreign keys pointing to booking.resource (4 referencing table(s)):

Table Referencing Column(s) Referenced Column(s) Constraint

action.reservation_transit_copy

target_copy

id

artc_tc_fkey

booking.reservation

current_resource

id

reservation_current_resource_fkey

booking.reservation

target_resource

id

reservation_target_resource_fkey

booking.resource_attr_map

resource

id

resource_attr_map_resource_fkey