Skip to main content

hr.sequence_counters

Schema: hr
English table: hr.sequence_counters
Italian original table: hr.contatori
Description: Business sequence counters for generating progressive numbers in various tables. Unlike PostgreSQL sequences, these are application-managed counters for user-visible progressive identifiers (e.g., document numbers, employee codes).

Overview

  • Columns: 7
  • Primary key: id
  • Outgoing foreign keys: 1
  • Incoming foreign keys: 0
  • Indexes: 2

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOSurrogate primary key
sc_field_namefield_nameintegerNOIdentifier for the counter (typically a numeric code or field reference)
sc_current_valuefield_valueintegerNOCurrent value of the counter; incremented when new numbers are generated
sc_table_nametable_namecharacter varying(50)NOName of the table for which this counter generates values
tenant_idtenant_idintegerYESMulti-tenancy identifier
colcustomcolcustomjsonbYES'{}'::jsonbCustom fields stored as JSON
_deleted_deletedbooleanYESfalseSoft delete flag for technical purposes

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_sequence_counters_tenanttenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: pk_sequence_countersid
  • Unique: uk_sequence_counters_field_namesc_field_name, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_sc_field_tenantNObtreetenant_id, sc_field_name) WHERE (_deleted = false
idx_sc_tenantNObtreetenant_id