rating.badge

Cascading Deletes: Deleting rows from this table will cascade to: rating.popularity_parameter, actor.org_unit.

Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: badge_circ_mod_filter_fkey, badge_loc_grp_filter_fkey, badge_popularity_parameter_fkey, badge_scope_fkey, badge_src_filter_fkey.

Columns

Column Type Nullable Default Notes

id PK

integer

No

nextval('rating.badge_id_seq'::regclass)

name

text

No

description

text

Yes

scope FK

integer

No

actor.org_unit(id)

weight

integer

No

1

horizon_age

interval

Yes

importance_age

interval

Yes

importance_interval

interval

No

'1 day'::interval

importance_scale

numeric

Yes

recalc_interval

interval

No

'1 mon'::interval

attr_filter

text

Yes

src_filter FK

integer

Yes

config.bib_source(id)

circ_mod_filter FK

text

Yes

config.circ_modifier(code)

loc_grp_filter FK

integer

Yes

asset.copy_location_group(id)

popularity_parameter FK

integer

No

rating.popularity_parameter(id)

fixed_rating

integer

Yes

percentile

numeric

Yes

discard

integer

No

0

last_calc

timestamp with time zone

Yes

Primary Key

(id)

Foreign Keys

Column(s) References On Delete On Update Deferrable Constraint

circ_mod_filter

config.circ_modifier(code)

SET NULL

CASCADE

DEFERRED

badge_circ_mod_filter_fkey

loc_grp_filter

asset.copy_location_group(id)

SET NULL

CASCADE

DEFERRED

badge_loc_grp_filter_fkey

popularity_parameter

rating.popularity_parameter(id)

CASCADE

CASCADE

DEFERRED

badge_popularity_parameter_fkey

scope

actor.org_unit(id)

CASCADE

CASCADE

DEFERRED

badge_scope_fkey

src_filter

config.bib_source(id)

SET NULL

CASCADE

DEFERRED

badge_src_filter_fkey

Unique Constraints

  • unique_name_scope: (name, scope)

Check Constraints

  • badge_fixed_rating_check: CHECK

  • badge_importance_scale_check: CHECK

  • badge_percentile_check: CHECK

Indexes

Index Method Definition

badge_pkey PK

btree

CREATE UNIQUE INDEX badge_pkey ON rating.badge USING btree (id)

unique_name_scope UNIQUE

btree

CREATE UNIQUE INDEX unique_name_scope ON rating.badge USING btree (name, scope)

Referenced By

The following tables have foreign keys pointing to rating.badge (1 referencing table(s)):

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

rating.record_badge_score

badge

id

record_badge_score_badge_fkey