GitLab CE

The whole DevOps platform: projects, merge requests, CI, security, packages, and much more. 1,429 tables: the stress test. Far past the explorer's comfort zone, kept in on purpose. Domains here are by table-name prefix, not by judgment.

1429 tables · 14379 columns · 1861 foreign keys · 111 domains  |  39 errors · 161 warnings · 1668 notes

Generated from gitlabhq@v19.3.1.sql on 2026-09-05.

Conventions

Conventions are claims. Findings below are where the schema breaks them.

Findings

Errors (39)

F787agent_organization_authorizations agent_id, organization_idjunction-uniqueness

Junction table allows duplicate links

agent_organization_authorizations looks like a many-to-many link table but has no unique constraint across (agent_id, organization_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE agent_organization_authorizations ADD PRIMARY KEY (agent_id, organization_id);
F788analytics_cycle_analytics_value_stream_settings namespace_id, value_stream_idjunction-uniqueness

Junction table allows duplicate links

analytics_cycle_analytics_value_stream_settings looks like a many-to-many link table but has no unique constraint across (namespace_id, value_stream_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE analytics_cycle_analytics_value_stream_settings ADD PRIMARY KEY (namespace_id, value_stream_id);
F1346application_settings namespace_storage_forks_cost_factormoney-float

Monetary value stored as float

namespace_storage_forks_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.

Fix Use NUMERIC(p, s) or integer minor units.

ALTER TABLE application_settings ALTER COLUMN namespace_storage_forks_cost_factor TYPE numeric(14,2);
F1347application_settings sentry_clientside_traces_sample_ratemoney-float

Monetary value stored as float

sentry_clientside_traces_sample_rate is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.

Fix Use NUMERIC(p, s) or integer minor units.

ALTER TABLE application_settings ALTER COLUMN sentry_clientside_traces_sample_rate TYPE numeric(14,2);
F789audit_events_streaming_http_group_namespace_filters external_audit_event_destination_id, namespace_idjunction-uniqueness

Junction table allows duplicate links

audit_events_streaming_http_group_namespace_filters looks like a many-to-many link table but has no unique constraint across (external_audit_event_destination_id, namespace_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE audit_events_streaming_http_group_namespace_filters ADD PRIMARY KEY (external_audit_event_destination_id, namespace_id);
F790audit_events_streaming_http_instance_namespace_filters audit_events_instance_external_audit_event_destination_id, namespace_idjunction-uniqueness

Junction table allows duplicate links

audit_events_streaming_http_instance_namespace_filters looks like a many-to-many link table but has no unique constraint across (audit_events_instance_external_audit_event_destination_id, namespace_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE audit_events_streaming_http_instance_namespace_filters ADD PRIMARY KEY (audit_events_instance_external_audit_event_destination_id, namespace_id);
F1348ci_runners public_projects_minutes_cost_factormoney-float

Monetary value stored as float

public_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.

Fix Use NUMERIC(p, s) or integer minor units.

ALTER TABLE ci_runners ALTER COLUMN public_projects_minutes_cost_factor TYPE numeric(14,2);
F1349ci_runners private_projects_minutes_cost_factormoney-float

Monetary value stored as float

private_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.

Fix Use NUMERIC(p, s) or integer minor units.

ALTER TABLE ci_runners ALTER COLUMN private_projects_minutes_cost_factor TYPE numeric(14,2);
F791cluster_projects cluster_id, project_idjunction-uniqueness

Junction table allows duplicate links

cluster_projects looks like a many-to-many link table but has no unique constraint across (cluster_id, project_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE cluster_projects ADD PRIMARY KEY (cluster_id, project_id);
F792csv_issue_imports project_id, user_idjunction-uniqueness

Junction table allows duplicate links

csv_issue_imports looks like a many-to-many link table but has no unique constraint across (project_id, user_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE csv_issue_imports ADD PRIMARY KEY (project_id, user_id);
F793duo_workflows_workloads project_id, workflow_idjunction-uniqueness

Junction table allows duplicate links

duo_workflows_workloads looks like a many-to-many link table but has no unique constraint across (project_id, workflow_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE duo_workflows_workloads ADD PRIMARY KEY (project_id, workflow_id);
F794group_deletion_schedules group_id, user_idjunction-uniqueness

Junction table allows duplicate links

group_deletion_schedules looks like a many-to-many link table but has no unique constraint across (group_id, user_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE group_deletion_schedules ADD PRIMARY KEY (group_id, user_id);
F1350group_type_ci_runners public_projects_minutes_cost_factormoney-float

Monetary value stored as float

public_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.

Fix Use NUMERIC(p, s) or integer minor units.

ALTER TABLE group_type_ci_runners ALTER COLUMN public_projects_minutes_cost_factor TYPE numeric(14,2);
F1351group_type_ci_runners private_projects_minutes_cost_factormoney-float

Monetary value stored as float

private_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.

Fix Use NUMERIC(p, s) or integer minor units.

ALTER TABLE group_type_ci_runners ALTER COLUMN private_projects_minutes_cost_factor TYPE numeric(14,2);
F795insights namespace_id, project_idjunction-uniqueness

Junction table allows duplicate links

insights looks like a many-to-many link table but has no unique constraint across (namespace_id, project_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE insights ADD PRIMARY KEY (namespace_id, project_id);
F1352instance_type_ci_runners public_projects_minutes_cost_factormoney-float

Monetary value stored as float

public_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.

Fix Use NUMERIC(p, s) or integer minor units.

ALTER TABLE instance_type_ci_runners ALTER COLUMN public_projects_minutes_cost_factor TYPE numeric(14,2);
F1353instance_type_ci_runners private_projects_minutes_cost_factormoney-float

Monetary value stored as float

private_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.

Fix Use NUMERIC(p, s) or integer minor units.

ALTER TABLE instance_type_ci_runners ALTER COLUMN private_projects_minutes_cost_factor TYPE numeric(14,2);
F796lfs_file_locks project_id, user_idjunction-uniqueness

Junction table allows duplicate links

lfs_file_locks looks like a many-to-many link table but has no unique constraint across (project_id, user_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE lfs_file_locks ADD PRIMARY KEY (project_id, user_id);
F797merge_request_merge_schedules merge_request_id, project_idjunction-uniqueness

Junction table allows duplicate links

merge_request_merge_schedules looks like a many-to-many link table but has no unique constraint across (merge_request_id, project_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE merge_request_merge_schedules ADD PRIMARY KEY (merge_request_id, project_id);
F798namespace_import_users namespace_id, user_idjunction-uniqueness

Junction table allows duplicate links

namespace_import_users looks like a many-to-many link table but has no unique constraint across (namespace_id, user_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE namespace_import_users ADD PRIMARY KEY (namespace_id, user_id);
F799namespace_secret_counts namespace_id, root_namespace_idjunction-uniqueness

Junction table allows duplicate links

namespace_secret_counts looks like a many-to-many link table but has no unique constraint across (namespace_id, root_namespace_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE namespace_secret_counts ADD PRIMARY KEY (namespace_id, root_namespace_id);
F800oauth_openid_requests access_grant_id, organization_idjunction-uniqueness

Junction table allows duplicate links

oauth_openid_requests looks like a many-to-many link table but has no unique constraint across (access_grant_id, organization_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE oauth_openid_requests ADD PRIMARY KEY (access_grant_id, organization_id);
F801observability_traces_issues_connections issue_id, project_idjunction-uniqueness

Junction table allows duplicate links

observability_traces_issues_connections looks like a many-to-many link table but has no unique constraint across (issue_id, project_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE observability_traces_issues_connections ADD PRIMARY KEY (issue_id, project_id);
F785p_ci_job_definition_instances job_definition_id, job_id, partition_idjunction-uniqueness

Junction table allows duplicate links

p_ci_job_definition_instances looks like a many-to-many link table but has no unique constraint across (job_definition_id, job_id, partition_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE p_ci_job_definition_instances ADD PRIMARY KEY (job_definition_id, job_id, partition_id);
F786p_generated_ref_commits merge_request_iid, project_idjunction-uniqueness

Junction table allows duplicate links

p_generated_ref_commits looks like a many-to-many link table but has no unique constraint across (merge_request_iid, project_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE p_generated_ref_commits ADD PRIMARY KEY (merge_request_iid, project_id);
F802packages_pypi_file_metadata package_file_id, project_idjunction-uniqueness

Junction table allows duplicate links

packages_pypi_file_metadata looks like a many-to-many link table but has no unique constraint across (package_file_id, project_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE packages_pypi_file_metadata ADD PRIMARY KEY (package_file_id, project_id);
F803personal_access_token_last_used_ips organization_id, personal_access_token_idjunction-uniqueness

Junction table allows duplicate links

personal_access_token_last_used_ips looks like a many-to-many link table but has no unique constraint across (organization_id, personal_access_token_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE personal_access_token_last_used_ips ADD PRIMARY KEY (organization_id, personal_access_token_id);
F1354project_type_ci_runners public_projects_minutes_cost_factormoney-float

Monetary value stored as float

public_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.

Fix Use NUMERIC(p, s) or integer minor units.

ALTER TABLE project_type_ci_runners ALTER COLUMN public_projects_minutes_cost_factor TYPE numeric(14,2);
F1355project_type_ci_runners private_projects_minutes_cost_factormoney-float

Monetary value stored as float

private_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.

Fix Use NUMERIC(p, s) or integer minor units.

ALTER TABLE project_type_ci_runners ALTER COLUMN private_projects_minutes_cost_factor TYPE numeric(14,2);
F804projects_branch_rules_squash_options project_id, protected_branch_idjunction-uniqueness

Junction table allows duplicate links

projects_branch_rules_squash_options looks like a many-to-many link table but has no unique constraint across (project_id, protected_branch_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE projects_branch_rules_squash_options ADD PRIMARY KEY (project_id, protected_branch_id);
F805security_policy_schedule_pipelines project_id, security_policy_idjunction-uniqueness

Junction table allows duplicate links

security_policy_schedule_pipelines looks like a many-to-many link table but has no unique constraint across (project_id, security_policy_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE security_policy_schedule_pipelines ADD PRIMARY KEY (project_id, security_policy_id);
F806user_admin_roles admin_role_id, user_idjunction-uniqueness

Junction table allows duplicate links

user_admin_roles looks like a many-to-many link table but has no unique constraint across (admin_role_id, user_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE user_admin_roles ADD PRIMARY KEY (admin_role_id, user_id);
F807user_member_roles member_role_id, user_idjunction-uniqueness

Junction table allows duplicate links

user_member_roles looks like a many-to-many link table but has no unique constraint across (member_role_id, user_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE user_member_roles ADD PRIMARY KEY (member_role_id, user_id);
F808vulnerability_finding_ascp_component_links ascp_component_id, vulnerability_occurrence_idjunction-uniqueness

Junction table allows duplicate links

vulnerability_finding_ascp_component_links looks like a many-to-many link table but has no unique constraint across (ascp_component_id, vulnerability_occurrence_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE vulnerability_finding_ascp_component_links ADD PRIMARY KEY (ascp_component_id, vulnerability_occurrence_id);
F809work_item_colors issue_id, namespace_idjunction-uniqueness

Junction table allows duplicate links

work_item_colors looks like a many-to-many link table but has no unique constraint across (issue_id, namespace_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE work_item_colors ADD PRIMARY KEY (issue_id, namespace_id);
F810work_item_type_custom_lifecycles lifecycle_id, namespace_idjunction-uniqueness

Junction table allows duplicate links

work_item_type_custom_lifecycles looks like a many-to-many link table but has no unique constraint across (lifecycle_id, namespace_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE work_item_type_custom_lifecycles ADD PRIMARY KEY (lifecycle_id, namespace_id);
F811workspace_agentk_states project_id, workspace_idjunction-uniqueness

Junction table allows duplicate links

workspace_agentk_states looks like a many-to-many link table but has no unique constraint across (project_id, workspace_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE workspace_agentk_states ADD PRIMARY KEY (project_id, workspace_id);
F812workspace_tokens project_id, workspace_idjunction-uniqueness

Junction table allows duplicate links

workspace_tokens looks like a many-to-many link table but has no unique constraint across (project_id, workspace_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE workspace_tokens ADD PRIMARY KEY (project_id, workspace_id);
F813zoekt_replicas namespace_id, zoekt_enabled_namespace_idjunction-uniqueness

Junction table allows duplicate links

zoekt_replicas looks like a many-to-many link table but has no unique constraint across (namespace_id, zoekt_enabled_namespace_id). The same pair can be inserted twice; every join through it will double-count.

Fix Use the FK pair as the primary key (or add a UNIQUE).

ALTER TABLE zoekt_replicas ADD PRIMARY KEY (namespace_id, zoekt_enabled_namespace_id);

Warnings (161)

F826abuse_report_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE abuse_report_uploads ADD CONSTRAINT abuse_report_uploads_model_type_check CHECK (model_type IN (...));
F899abuse_report_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F827achievement_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE achievement_uploads ADD CONSTRAINT achievement_uploads_model_type_check CHECK (model_type IN (...));
F900achievement_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

Foreign-key cycle

ai_catalog_item_versions → ai_catalog_items → ai_catalog_item_versions. Rows must be inserted with a deferred constraint or a NULL-then-update dance; backups/restores and truncation have no valid order; ON DELETE CASCADE can loop.

Fix Break the cycle (move one FK to a link table) or mark one FK DEFERRABLE INITIALLY DEFERRED.

F888ai_catalog_items organization_id, identifier, item_typesoft-delete-unique

Soft delete collides with non-partial UNIQUE

ai_catalog_items soft-deletes via deleted_at, but (organization_id, identifier, item_type) is unique across live AND deleted rows. A user who deletes their account can never sign up again with the same value, and ON CONFLICT upserts will resurrect ghosts.

Fix Replace with a partial unique index scoped to live rows.

DROP CONSTRAINT/INDEX ...; CREATE UNIQUE INDEX ai_catalog_items_organization_id_identifier_item_type_live ON ai_catalog_items(organization_id, identifier, item_type) WHERE deleted_at IS NULL;
F828ai_vectorizable_file_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE ai_vectorizable_file_uploads ADD CONSTRAINT ai_vectorizable_file_uploads_model_type_check CHECK (model_type IN (...));
F901ai_vectorizable_file_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F829alert_management_alert_metric_image_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE alert_management_alert_metric_image_uploads ADD CONSTRAINT alert_management_alert_metric_image_uploads_model_type_check CHECK (model_type IN (...));
F902alert_management_alert_metric_image_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F830appearance_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE appearance_uploads ADD CONSTRAINT appearance_uploads_model_type_check CHECK (model_type IN (...));
F903appearance_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F818audit_events entity_typeundocumented-enum

Enum-like column with no CHECK

entity_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE audit_events ADD CONSTRAINT audit_events_entity_type_check CHECK (entity_type IN (...));
F891audit_events entity_type, entity_idpolymorphic-reference

Polymorphic reference without referential integrity

entity_id points at different tables depending on entity_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F892audit_events target_type, target_idpolymorphic-reference

Polymorphic reference without referential integrity

target_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F831award_emoji awardable_typeundocumented-enum

Enum-like column with no CHECK

awardable_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE award_emoji ADD CONSTRAINT award_emoji_awardable_type_check CHECK (awardable_type IN (...));
F904award_emoji awardable_type, awardable_idpolymorphic-reference

Polymorphic reference without referential integrity

awardable_id points at different tables depending on awardable_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F832badges typeundocumented-enum

Enum-like column with no CHECK

type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE badges ADD CONSTRAINT badges_type_check CHECK (type IN (...));
F833bulk_import_export_upload_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE bulk_import_export_upload_uploads ADD CONSTRAINT bulk_import_export_upload_uploads_model_type_check CHECK (model_type IN (...));
F905bulk_import_export_upload_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F015ci_build_trace_chunks partition_id, build_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan ci_build_trace_chunks to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_build_trace_chunks maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_ci_build_trace_chunks_partition_id_build_id ON ci_build_trace_chunks(partition_id, build_id);
F016ci_daily_build_group_report_results partition_id, last_pipeline_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_daily_build_group_report_results to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_daily_build_group_report_results maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_ci_daily_build_group_report_results_partition_id_last_pipeline_id ON ci_daily_build_group_report_results(partition_id, last_pipeline_id);
F017ci_job_variables partition_id, job_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan ci_job_variables to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_job_variables maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_ci_job_variables_partition_id_job_id ON ci_job_variables(partition_id, job_id);
F018ci_pipeline_artifacts partition_id, pipeline_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_pipeline_artifacts to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_pipeline_artifacts maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_ci_pipeline_artifacts_partition_id_pipeline_id ON ci_pipeline_artifacts(partition_id, pipeline_id);
F019ci_pipeline_chat_data partition_id, pipeline_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_pipeline_chat_data to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_pipeline_chat_data maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_ci_pipeline_chat_data_partition_id_pipeline_id ON ci_pipeline_chat_data(partition_id, pipeline_id);
F020ci_pipeline_messages partition_id, pipeline_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_pipeline_messages to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_pipeline_messages maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_ci_pipeline_messages_partition_id_pipeline_id ON ci_pipeline_messages(partition_id, pipeline_id);
F021ci_pipeline_metadata partition_id, pipeline_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_pipeline_metadata to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_pipeline_metadata maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_ci_pipeline_metadata_partition_id_pipeline_id ON ci_pipeline_metadata(partition_id, pipeline_id);
F022ci_resources partition_id, build_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan ci_resources to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_resources maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add a partial index, scoped to the rows that have a value. partition_id, build_id is nullable, so the NULL rows are not indexed at all and the write cost is a fraction of a full index, while the constraint check still uses it.

CREATE INDEX CONCURRENTLY idx_ci_resources_partition_id_build_id ON ci_resources(partition_id, build_id) WHERE partition_id IS NOT NULL AND build_id IS NOT NULL;
F906ci_runner_controller_runner_level_scopings_instance_type runner_type, runner_idpolymorphic-reference

Polymorphic reference without referential integrity

runner_id points at different tables depending on runner_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F907ci_runner_machines runner_type, runner_idpolymorphic-reference

Polymorphic reference without referential integrity

runner_id points at different tables depending on runner_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F908ci_runner_taggings runner_type, runner_idpolymorphic-reference

Polymorphic reference without referential integrity

runner_id points at different tables depending on runner_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F909ci_running_builds runner_type, runner_idpolymorphic-reference

Polymorphic reference without referential integrity

runner_id points at different tables depending on runner_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F023ci_sources_pipelines source_partition_id, source_job_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan ci_sources_pipelines to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_sources_pipelines maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add a partial index, scoped to the rows that have a value. source_partition_id, source_job_id is nullable, so the NULL rows are not indexed at all and the write cost is a fraction of a full index, while the constraint check still uses it.

CREATE INDEX CONCURRENTLY idx_ci_sources_pipelines_source_partition_id_source_job_id ON ci_sources_pipelines(source_partition_id, source_job_id) WHERE source_partition_id IS NOT NULL AND source_job_id IS NOT NULL;
F024ci_sources_pipelines source_partition_id, source_pipeline_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_sources_pipelines to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_sources_pipelines maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add a partial index, scoped to the rows that have a value. source_partition_id, source_pipeline_id is nullable, so the NULL rows are not indexed at all and the write cost is a fraction of a full index, while the constraint check still uses it.

CREATE INDEX CONCURRENTLY idx_ci_sources_pipelines_source_partition_id_source_pipeline_id ON ci_sources_pipelines(source_partition_id, source_pipeline_id) WHERE source_partition_id IS NOT NULL AND source_pipeline_id IS NOT NULL;
F025ci_sources_pipelines partition_id, pipeline_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_sources_pipelines to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_sources_pipelines maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add a partial index, scoped to the rows that have a value. partition_id, pipeline_id is nullable, so the NULL rows are not indexed at all and the write cost is a fraction of a full index, while the constraint check still uses it.

CREATE INDEX CONCURRENTLY idx_ci_sources_pipelines_partition_id_pipeline_id ON ci_sources_pipelines(partition_id, pipeline_id) WHERE partition_id IS NOT NULL AND pipeline_id IS NOT NULL;
F026ci_sources_projects partition_id, pipeline_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_sources_projects to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_sources_projects maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_ci_sources_projects_partition_id_pipeline_id ON ci_sources_projects(partition_id, pipeline_id);
F027ci_unit_test_failures partition_id, build_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan ci_unit_test_failures to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_unit_test_failures maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_ci_unit_test_failures_partition_id_build_id ON ci_unit_test_failures(partition_id, build_id);
F834ci_variables environment_scopeundocumented-enum

Enum-like column with no CHECK

environment_scope is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE ci_variables ADD CONSTRAINT ci_variables_environment_scope_check CHECK (environment_scope IN (...));
F835cluster_providers_gcp machine_typeundocumented-enum

Enum-like column with no CHECK

machine_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE cluster_providers_gcp ADD CONSTRAINT cluster_providers_gcp_machine_type_check CHECK (machine_type IN (...));
F836clusters environment_scopeundocumented-enum

Enum-like column with no CHECK

environment_scope is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE clusters ADD CONSTRAINT clusters_environment_scope_check CHECK (environment_scope IN (...));
F837dependency_list_export_part_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE dependency_list_export_part_uploads ADD CONSTRAINT dependency_list_export_part_uploads_model_type_check CHECK (model_type IN (...));
F910dependency_list_export_part_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F838dependency_list_export_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE dependency_list_export_uploads ADD CONSTRAINT dependency_list_export_uploads_model_type_check CHECK (model_type IN (...));
F911dependency_list_export_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F839deployments deployable_typeundocumented-enum

Enum-like column with no CHECK

deployable_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE deployments ADD CONSTRAINT deployments_deployable_type_check CHECK (deployable_type IN (...));
F912deployments deployable_type, deployable_idpolymorphic-reference

Polymorphic reference without referential integrity

deployable_id points at different tables depending on deployable_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F840design_management_action_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE design_management_action_uploads ADD CONSTRAINT design_management_action_uploads_model_type_check CHECK (model_type IN (...));
F913design_management_action_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F841environments environment_typeundocumented-enum

Enum-like column with no CHECK

environment_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE environments ADD CONSTRAINT environments_environment_type_check CHECK (environment_type IN (...));
F842environments stateundocumented-enum

Enum-like column with no CHECK

state is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE environments ADD CONSTRAINT environments_state_check CHECK (state IN (...));
F843events target_typeundocumented-enum

Enum-like column with no CHECK

target_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE events ADD CONSTRAINT events_target_type_check CHECK (target_type IN (...));
F914events target_type, target_idpolymorphic-reference

Polymorphic reference without referential integrity

target_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F844geo_nodes selective_sync_typeundocumented-enum

Enum-like column with no CHECK

selective_sync_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE geo_nodes ADD CONSTRAINT geo_nodes_selective_sync_type_check CHECK (selective_sync_type IN (...));
F893group_audit_events target_type, target_idpolymorphic-reference

Polymorphic reference without referential integrity

target_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F916iam_outbox entity_type, entity_idpolymorphic-reference

Polymorphic reference without referential integrity

entity_id points at different tables depending on entity_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F846import_export_upload_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE import_export_upload_uploads ADD CONSTRAINT import_export_upload_uploads_model_type_check CHECK (model_type IN (...));
F917import_export_upload_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F894instance_audit_events target_type, target_idpolymorphic-reference

Polymorphic reference without referential integrity

target_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F847integrations categoryundocumented-enum

Enum-like column with no CHECK

category is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE integrations ADD CONSTRAINT integrations_category_check CHECK (category IN (...));
F848issuable_metric_image_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE issuable_metric_image_uploads ADD CONSTRAINT issuable_metric_image_uploads_model_type_check CHECK (model_type IN (...));
F918issuable_metric_image_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F1839issuesfk-cycle

Foreign-key cycle

issues → epics → work_item_parent_links → issues. Rows must be inserted with a deferred constraint or a NULL-then-update dance; backups/restores and truncation have no valid order; ON DELETE CASCADE can loop.

Fix Break the cycle (move one FK to a link table) or mark one FK DEFERRABLE INITIALLY DEFERRED.

F1840issuesfk-cycle

Foreign-key cycle

issues → epics → issues. Rows must be inserted with a deferred constraint or a NULL-then-update dance; backups/restores and truncation have no valid order; ON DELETE CASCADE can loop.

Fix Break the cycle (move one FK to a link table) or mark one FK DEFERRABLE INITIALLY DEFERRED.

F849keys typeundocumented-enum

Enum-like column with no CHECK

type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE keys ADD CONSTRAINT keys_type_check CHECK (type IN (...));
F850label_links target_typeundocumented-enum

Enum-like column with no CHECK

target_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE label_links ADD CONSTRAINT label_links_target_type_check CHECK (target_type IN (...));
F919label_links target_type, target_idpolymorphic-reference

Polymorphic reference without referential integrity

target_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F851labels typeundocumented-enum

Enum-like column with no CHECK

type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE labels ADD CONSTRAINT labels_type_check CHECK (type IN (...));
F852members source_typeundocumented-enum

Enum-like column with no CHECK

source_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE members ADD CONSTRAINT members_source_type_check CHECK (source_type IN (...));
F853members typeundocumented-enum

Enum-like column with no CHECK

type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE members ADD CONSTRAINT members_type_check CHECK (type IN (...));
F920members source_type, source_idpolymorphic-reference

Polymorphic reference without referential integrity

source_id points at different tables depending on source_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F854merge_request_diff_files a_modeundocumented-enum

Enum-like column with no CHECK

a_mode is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE merge_request_diff_files ADD CONSTRAINT merge_request_diff_files_a_mode_check CHECK (a_mode IN (...));
F855merge_request_diff_files b_modeundocumented-enum

Enum-like column with no CHECK

b_mode is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE merge_request_diff_files ADD CONSTRAINT merge_request_diff_files_b_mode_check CHECK (b_mode IN (...));
F822merge_request_diff_files_99208b8fac a_modeundocumented-enum

Enum-like column with no CHECK

a_mode is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE merge_request_diff_files_99208b8fac ADD CONSTRAINT merge_request_diff_files_99208b8fac_a_mode_check CHECK (a_mode IN (...));
F823merge_request_diff_files_99208b8fac b_modeundocumented-enum

Enum-like column with no CHECK

b_mode is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE merge_request_diff_files_99208b8fac ADD CONSTRAINT merge_request_diff_files_99208b8fac_b_mode_check CHECK (b_mode IN (...));
F856merge_request_diffs stateundocumented-enum

Enum-like column with no CHECK

state is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE merge_request_diffs ADD CONSTRAINT merge_request_diffs_state_check CHECK (state IN (...));
F1841merge_requestsfk-cycle

Foreign-key cycle

merge_requests → merge_request_diffs → merge_requests. Rows must be inserted with a deferred constraint or a NULL-then-update dance; backups/restores and truncation have no valid order; ON DELETE CASCADE can loop.

Fix Break the cycle (move one FK to a link table) or mark one FK DEFERRABLE INITIALLY DEFERRED.

F857merge_requests merge_statusundocumented-enum

Enum-like column with no CHECK

merge_status is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE merge_requests ADD CONSTRAINT merge_requests_merge_status_check CHECK (merge_status IN (...));
F858milestones stateundocumented-enum

Enum-like column with no CHECK

state is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE milestones ADD CONSTRAINT milestones_state_check CHECK (state IN (...));
F859namespace_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE namespace_uploads ADD CONSTRAINT namespace_uploads_model_type_check CHECK (model_type IN (...));
F921namespace_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F814namespaces typeundocumented-enum

Enum-like column with no CHECK

type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE namespaces ADD CONSTRAINT namespaces_type_check CHECK (type IN (...));
F815namespaces ldap_sync_statusundocumented-enum

Enum-like column with no CHECK

ldap_sync_status is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE namespaces ADD CONSTRAINT namespaces_ldap_sync_status_check CHECK (ldap_sync_status IN (...));
F860note_diff_files a_modeundocumented-enum

Enum-like column with no CHECK

a_mode is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE note_diff_files ADD CONSTRAINT note_diff_files_a_mode_check CHECK (a_mode IN (...));
F861note_diff_files b_modeundocumented-enum

Enum-like column with no CHECK

b_mode is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE note_diff_files ADD CONSTRAINT note_diff_files_b_mode_check CHECK (b_mode IN (...));
F862notes typeundocumented-enum

Enum-like column with no CHECK

type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE notes ADD CONSTRAINT notes_type_check CHECK (type IN (...));
F922notes noteable_type, noteable_idpolymorphic-reference

Polymorphic reference without referential integrity

noteable_id points at different tables depending on noteable_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F863notification_settings source_typeundocumented-enum

Enum-like column with no CHECK

source_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE notification_settings ADD CONSTRAINT notification_settings_source_type_check CHECK (source_type IN (...));
F923notification_settings source_type, source_idpolymorphic-reference

Polymorphic reference without referential integrity

source_id points at different tables depending on source_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F864oauth_applications owner_typeundocumented-enum

Enum-like column with no CHECK

owner_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE oauth_applications ADD CONSTRAINT oauth_applications_owner_type_check CHECK (owner_type IN (...));
F924oauth_applications owner_type, owner_idpolymorphic-reference

Polymorphic reference without referential integrity

owner_id points at different tables depending on owner_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F865organization_detail_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE organization_detail_uploads ADD CONSTRAINT organization_detail_uploads_model_type_check CHECK (model_type IN (...));
F925organization_detail_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F001p_ci_build_needs partition_id, build_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan p_ci_build_needs to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_build_needs maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_p_ci_build_needs_partition_id_build_id ON p_ci_build_needs(partition_id, build_id);
F002p_ci_build_trace_metadata partition_id, trace_artifact_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_job_artifacts must scan p_ci_build_trace_metadata to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_build_trace_metadata maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_job_artifacts rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add a partial index, scoped to the rows that have a value. partition_id, trace_artifact_id is nullable, so the NULL rows are not indexed at all and the write cost is a fraction of a full index, while the constraint check still uses it.

CREATE INDEX CONCURRENTLY idx_p_ci_build_trace_metadata_partition_id_trace_artifact_id ON p_ci_build_trace_metadata(partition_id, trace_artifact_id) WHERE partition_id IS NOT NULL AND trace_artifact_id IS NOT NULL;
F003p_ci_builds partition_id, stage_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_stages must scan p_ci_builds to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_builds maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_stages rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add a partial index, scoped to the rows that have a value. partition_id, stage_id is nullable, so the NULL rows are not indexed at all and the write cost is a fraction of a full index, while the constraint check still uses it.

CREATE INDEX CONCURRENTLY idx_p_ci_builds_partition_id_stage_id ON p_ci_builds(partition_id, stage_id) WHERE partition_id IS NOT NULL AND stage_id IS NOT NULL;
F004p_ci_builds upstream_pipeline_partition_id, upstream_pipeline_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan p_ci_builds to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_builds maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add a partial index, scoped to the rows that have a value. upstream_pipeline_partition_id, upstream_pipeline_id is nullable, so the NULL rows are not indexed at all and the write cost is a fraction of a full index, while the constraint check still uses it.

CREATE INDEX CONCURRENTLY idx_p_ci_builds_upstream_pipeline_partition_id_upstream_pipeline_id ON p_ci_builds(upstream_pipeline_partition_id, upstream_pipeline_id) WHERE upstream_pipeline_partition_id IS NOT NULL AND upstream_pipeline_id IS NOT NULL;
F005p_ci_builds auto_canceled_by_partition_id, auto_canceled_by_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan p_ci_builds to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_builds maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add a partial index, scoped to the rows that have a value. auto_canceled_by_partition_id, auto_canceled_by_id is nullable, so the NULL rows are not indexed at all and the write cost is a fraction of a full index, while the constraint check still uses it.

CREATE INDEX CONCURRENTLY idx_p_ci_builds_auto_canceled_by_partition_id_auto_canceled_by_id ON p_ci_builds(auto_canceled_by_partition_id, auto_canceled_by_id) WHERE auto_canceled_by_partition_id IS NOT NULL AND auto_canceled_by_id IS NOT NULL;
F006p_ci_builds partition_id, commit_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan p_ci_builds to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_builds maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add a partial index, scoped to the rows that have a value. partition_id, commit_id is nullable, so the NULL rows are not indexed at all and the write cost is a fraction of a full index, while the constraint check still uses it.

CREATE INDEX CONCURRENTLY idx_p_ci_builds_partition_id_commit_id ON p_ci_builds(partition_id, commit_id) WHERE partition_id IS NOT NULL AND commit_id IS NOT NULL;
F819p_ci_builds statusundocumented-enum

Enum-like column with no CHECK

status is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE p_ci_builds ADD CONSTRAINT p_ci_builds_status_check CHECK (status IN (...));
F820p_ci_builds typeundocumented-enum

Enum-like column with no CHECK

type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE p_ci_builds ADD CONSTRAINT p_ci_builds_type_check CHECK (type IN (...));
F014p_ci_builds_partition_overrides partition_id, build_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan p_ci_builds_partition_overrides to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_builds_partition_overrides maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_p_ci_builds_partition_overrides_partition_id_build_id ON p_ci_builds_partition_overrides(partition_id, build_id);
F007p_ci_job_artifacts partition_id, job_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan p_ci_job_artifacts to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_job_artifacts maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_p_ci_job_artifacts_partition_id_job_id ON p_ci_job_artifacts(partition_id, job_id);
F008p_ci_job_definition_instances partition_id, job_definition_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_job_definitions must scan p_ci_job_definition_instances to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_job_definition_instances maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_job_definitions rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_p_ci_job_definition_instances_partition_id_job_definition_id ON p_ci_job_definition_instances(partition_id, job_definition_id);
F009p_ci_job_inputs partition_id, job_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan p_ci_job_inputs to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_job_inputs maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_p_ci_job_inputs_partition_id_job_id ON p_ci_job_inputs(partition_id, job_id);
F010p_ci_job_messages partition_id, job_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan p_ci_job_messages to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_job_messages maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_p_ci_job_messages_partition_id_job_id ON p_ci_job_messages(partition_id, job_id);
F011p_ci_pipeline_variables partition_id, pipeline_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan p_ci_pipeline_variables to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_pipeline_variables maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add an index on the FK column(s).

CREATE INDEX CONCURRENTLY idx_p_ci_pipeline_variables_partition_id_pipeline_id ON p_ci_pipeline_variables(partition_id, pipeline_id);
F012p_ci_pipelines auto_canceled_by_partition_id, auto_canceled_by_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan p_ci_pipelines to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_pipelines maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add a partial index, scoped to the rows that have a value. auto_canceled_by_partition_id, auto_canceled_by_id is nullable, so the NULL rows are not indexed at all and the write cost is a fraction of a full index, while the constraint check still uses it.

CREATE INDEX CONCURRENTLY idx_p_ci_pipelines_auto_canceled_by_partition_id_auto_canceled_by_id ON p_ci_pipelines(auto_canceled_by_partition_id, auto_canceled_by_id) WHERE auto_canceled_by_partition_id IS NOT NULL AND auto_canceled_by_id IS NOT NULL;
F821p_ci_pipelines statusundocumented-enum

Enum-like column with no CHECK

status is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE p_ci_pipelines ADD CONSTRAINT p_ci_pipelines_status_check CHECK (status IN (...));
F013p_ci_stages partition_id, pipeline_idfk-index

Foreign key without index

PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan p_ci_stages to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_stages maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.

Fix Add a partial index, scoped to the rows that have a value. partition_id, pipeline_id is nullable, so the NULL rows are not indexed at all and the write cost is a fraction of a full index, while the constraint check still uses it.

CREATE INDEX CONCURRENTLY idx_p_ci_stages_partition_id_pipeline_id ON p_ci_stages(partition_id, pipeline_id) WHERE partition_id IS NOT NULL AND pipeline_id IS NOT NULL;
F895p_sent_notifications noteable_type, noteable_idpolymorphic-reference

Polymorphic reference without referential integrity

noteable_id points at different tables depending on noteable_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F867pool_repositories stateundocumented-enum

Enum-like column with no CHECK

state is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE pool_repositories ADD CONSTRAINT pool_repositories_state_check CHECK (state IN (...));
F896project_audit_events target_type, target_idpolymorphic-reference

Polymorphic reference without referential integrity

target_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE project_import_export_relation_export_upload_uploads ADD CONSTRAINT project_import_export_relation_export_upload_uploads_model_type_check CHECK (model_type IN (...));
F926project_import_export_relation_export_upload_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F869project_mirror_data statusundocumented-enum

Enum-like column with no CHECK

status is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE project_mirror_data ADD CONSTRAINT project_mirror_data_status_check CHECK (status IN (...));
F870project_topic_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE project_topic_uploads ADD CONSTRAINT project_topic_uploads_model_type_check CHECK (model_type IN (...));
F927project_topic_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F871project_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE project_uploads ADD CONSTRAINT project_uploads_model_type_check CHECK (model_type IN (...));
F928project_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F816projects import_typeundocumented-enum

Enum-like column with no CHECK

import_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE projects ADD CONSTRAINT projects_import_type_check CHECK (import_type IN (...));
F872redirect_routes source_typeundocumented-enum

Enum-like column with no CHECK

source_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE redirect_routes ADD CONSTRAINT redirect_routes_source_type_check CHECK (source_type IN (...));
F929redirect_routes source_type, source_idpolymorphic-reference

Polymorphic reference without referential integrity

source_id points at different tables depending on source_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F873remote_mirrors update_statusundocumented-enum

Enum-like column with no CHECK

update_status is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE remote_mirrors ADD CONSTRAINT remote_mirrors_update_status_check CHECK (update_status IN (...));
F845routes source_typeundocumented-enum

Enum-like column with no CHECK

source_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE routes ADD CONSTRAINT routes_source_type_check CHECK (source_type IN (...));
F915routes source_type, source_idpolymorphic-reference

Polymorphic reference without referential integrity

source_id points at different tables depending on source_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F874snippet_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE snippet_uploads ADD CONSTRAINT snippet_uploads_model_type_check CHECK (model_type IN (...));
F930snippet_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F866snippets typeundocumented-enum

Enum-like column with no CHECK

type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE snippets ADD CONSTRAINT snippets_type_check CHECK (type IN (...));
F875spam_logs noteable_typeundocumented-enum

Enum-like column with no CHECK

noteable_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE spam_logs ADD CONSTRAINT spam_logs_noteable_type_check CHECK (noteable_type IN (...));
F931subscription_user_add_on_assignment_versions item_type, item_idpolymorphic-reference

Polymorphic reference without referential integrity

item_id points at different tables depending on item_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F876subscriptions subscribable_typeundocumented-enum

Enum-like column with no CHECK

subscribable_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE subscriptions ADD CONSTRAINT subscriptions_subscribable_type_check CHECK (subscribable_type IN (...));
F932subscriptions subscribable_type, subscribable_idpolymorphic-reference

Polymorphic reference without referential integrity

subscribable_id points at different tables depending on subscribable_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F889terraform_states project_id, namesoft-delete-unique

Soft delete collides with non-partial UNIQUE

terraform_states soft-deletes via deleted_at, but (project_id, name) is unique across live AND deleted rows. A user who deletes their account can never sign up again with the same value, and ON CONFLICT upserts will resurrect ghosts.

Fix Replace with a partial unique index scoped to live rows.

DROP CONSTRAINT/INDEX ...; CREATE UNIQUE INDEX terraform_states_project_id_name_live ON terraform_states(project_id, name) WHERE deleted_at IS NULL;
F890terraform_states uuidsoft-delete-unique

Soft delete collides with non-partial UNIQUE

terraform_states soft-deletes via deleted_at, but (uuid) is unique across live AND deleted rows. A user who deletes their account can never sign up again with the same value, and ON CONFLICT upserts will resurrect ghosts.

Fix Replace with a partial unique index scoped to live rows.

DROP CONSTRAINT/INDEX ...; CREATE UNIQUE INDEX terraform_states_uuid_live ON terraform_states(uuid) WHERE deleted_at IS NULL;
F877todos target_typeundocumented-enum

Enum-like column with no CHECK

target_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE todos ADD CONSTRAINT todos_target_type_check CHECK (target_type IN (...));
F878todos stateundocumented-enum

Enum-like column with no CHECK

state is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE todos ADD CONSTRAINT todos_state_check CHECK (state IN (...));
F933todos target_type, target_idpolymorphic-reference

Polymorphic reference without referential integrity

target_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F825uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE uploads ADD CONSTRAINT uploads_model_type_check CHECK (model_type IN (...));
F898uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F879user_agent_details subject_typeundocumented-enum

Enum-like column with no CHECK

subject_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE user_agent_details ADD CONSTRAINT user_agent_details_subject_type_check CHECK (subject_type IN (...));
F934user_agent_details subject_type, subject_idpolymorphic-reference

Polymorphic reference without referential integrity

subject_id points at different tables depending on subject_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F897user_audit_events target_type, target_idpolymorphic-reference

Polymorphic reference without referential integrity

target_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F880user_permission_export_upload_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE user_permission_export_upload_uploads ADD CONSTRAINT user_permission_export_upload_uploads_model_type_check CHECK (model_type IN (...));
F935user_permission_export_upload_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F881user_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE user_uploads ADD CONSTRAINT user_uploads_model_type_check CHECK (model_type IN (...));
F936user_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F817users stateundocumented-enum

Enum-like column with no CHECK

state is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE users ADD CONSTRAINT users_state_check CHECK (state IN (...));
F1843vulnerabilitiesfk-cycle

Foreign-key cycle

vulnerabilities → vulnerability_occurrences → vulnerabilities. Rows must be inserted with a deferred constraint or a NULL-then-update dance; backups/restores and truncation have no valid order; ON DELETE CASCADE can loop.

Fix Break the cycle (move one FK to a link table) or mark one FK DEFERRABLE INITIALLY DEFERRED.

F882vulnerability_archive_export_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE vulnerability_archive_export_uploads ADD CONSTRAINT vulnerability_archive_export_uploads_model_type_check CHECK (model_type IN (...));
F937vulnerability_archive_export_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F883vulnerability_export_part_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE vulnerability_export_part_uploads ADD CONSTRAINT vulnerability_export_part_uploads_model_type_check CHECK (model_type IN (...));
F938vulnerability_export_part_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F884vulnerability_export_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE vulnerability_export_uploads ADD CONSTRAINT vulnerability_export_uploads_model_type_check CHECK (model_type IN (...));
F939vulnerability_export_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F885vulnerability_identifiers external_typeundocumented-enum

Enum-like column with no CHECK

external_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE vulnerability_identifiers ADD CONSTRAINT vulnerability_identifiers_external_type_check CHECK (external_type IN (...));
F940vulnerability_identifiers external_type, external_idpolymorphic-reference

Polymorphic reference without referential integrity

external_id points at different tables depending on external_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F886vulnerability_remediation_uploads model_typeundocumented-enum

Enum-like column with no CHECK

model_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE vulnerability_remediation_uploads ADD CONSTRAINT vulnerability_remediation_uploads_model_type_check CHECK (model_type IN (...));
F941vulnerability_remediation_uploads model_type, model_idpolymorphic-reference

Polymorphic reference without referential integrity

model_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

F824web_hook_logs_daily response_statusundocumented-enum

Enum-like column with no CHECK

response_status is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE web_hook_logs_daily ADD CONSTRAINT web_hook_logs_daily_response_status_check CHECK (response_status IN (...));
F887web_hooks typeundocumented-enum

Enum-like column with no CHECK

type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.

Fix Add a CHECK constraint (cheap, easy to evolve) or a lookup table if values need metadata. Avoid native ENUM types unless the set is truly frozen.

ALTER TABLE web_hooks ADD CONSTRAINT web_hooks_type_check CHECK (type IN (...));
F942workspaces_agent_config_versions item_type, item_idpolymorphic-reference

Polymorphic reference without referential integrity

item_id points at different tables depending on item_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.

Fix Either one nullable FK per target with a CHECK that exactly one is set, or a supertype table that the targets reference.

Notes (1668)

F050abuse_events organization_idfk-nullable

Nullable foreign key

abuse_events.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F051abuse_events user_idfk-nullable

Nullable foreign key

abuse_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F052abuse_events abuse_report_idfk-nullable

Nullable foreign key

abuse_events.abuse_report_id may be NULL, so the relationship to abuse_reports is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F946abuse_events organization_id, user_id, abuse_report_idexclusive-arc

Either/or foreign keys without a CHECK

abuse_events has several nullable FKs (organization_id, user_id, abuse_report_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE abuse_events ADD CONSTRAINT abuse_events_one_target CHECK ((organization_id IS NOT NULL)::int + (user_id IS NOT NULL)::int + (abuse_report_id IS NOT NULL)::int = 1);
F053abuse_report_events user_idfk-nullable

Nullable foreign key

abuse_report_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F054abuse_report_events organization_idfk-nullable

Nullable foreign key

abuse_report_events.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F947abuse_report_events user_id, organization_idexclusive-arc

Either/or foreign keys without a CHECK

abuse_report_events has several nullable FKs (user_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE abuse_report_events ADD CONSTRAINT abuse_report_events_one_target CHECK ((user_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int = 1);
F1123abuse_report_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE abuse_report_uploads ALTER COLUMN created_at TYPE timestamptz;
F059abuse_report_user_mentions organization_idfk-nullable

Nullable foreign key

abuse_report_user_mentions.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F060abuse_reports assignee_idfk-nullable

Nullable foreign key

abuse_reports.assignee_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F061abuse_reports reporter_idfk-nullable

Nullable foreign key

abuse_reports.reporter_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F062abuse_reports resolved_by_idfk-nullable

Nullable foreign key

abuse_reports.resolved_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F063abuse_reports organization_idfk-nullable

Nullable foreign key

abuse_reports.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1124abuse_reports created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE abuse_reports ALTER COLUMN created_at TYPE timestamptz;
F1125abuse_reports updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE abuse_reports ALTER COLUMN updated_at TYPE timestamptz;
F949abuse_reports assignee_id, reporter_id, resolved_by_id, organization_idexclusive-arc

Either/or foreign keys without a CHECK

abuse_reports has several nullable FKs (assignee_id, reporter_id, resolved_by_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE abuse_reports ADD CONSTRAINT abuse_reports_one_target CHECK ((assignee_id IS NOT NULL)::int + (reporter_id IS NOT NULL)::int + (resolved_by_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int = 1);
F1126achievement_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE achievement_uploads ALTER COLUMN created_at TYPE timestamptz;
F064activation_metrics namespace_idfk-nullable

Nullable foreign key

activation_metrics.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F065admin_roles organization_idfk-nullable

Nullable foreign key

admin_roles.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F066agent_activity_events project_idfk-nullable

Nullable foreign key

agent_activity_events.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F067agent_activity_events merge_request_idfk-nullable

Nullable foreign key

agent_activity_events.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F068agent_activity_events agent_project_idfk-nullable

Nullable foreign key

agent_activity_events.agent_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F069agent_activity_events agent_token_idfk-nullable

Nullable foreign key

agent_activity_events.agent_token_id may be NULL, so the relationship to cluster_agent_tokens is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F070agent_activity_events user_idfk-nullable

Nullable foreign key

agent_activity_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F950agent_activity_events project_id, merge_request_id, agent_project_id, agent_token_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

agent_activity_events has several nullable FKs (project_id, merge_request_id, agent_project_id, agent_token_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE agent_activity_events ADD CONSTRAINT agent_activity_events_one_target CHECK ((project_id IS NOT NULL)::int + (merge_request_id IS NOT NULL)::int + (agent_project_id IS NOT NULL)::int + (agent_token_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F071ai_active_context_tasks depends_on_idfk-nullable

Nullable foreign key

ai_active_context_tasks.depends_on_id may be NULL, so the relationship to ai_active_context_tasks is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1356ai_audit_eventsorphan-table

Isolated table

ai_audit_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F072ai_catalog_item_consumers group_idfk-nullable

Nullable foreign key

ai_catalog_item_consumers.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F073ai_catalog_item_consumers parent_item_consumer_idfk-nullable

Nullable foreign key

ai_catalog_item_consumers.parent_item_consumer_id may be NULL, so the relationship to ai_catalog_item_consumers is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F074ai_catalog_item_consumers project_idfk-nullable

Nullable foreign key

ai_catalog_item_consumers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F075ai_catalog_item_consumers service_account_idfk-nullable

Nullable foreign key

ai_catalog_item_consumers.service_account_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F076ai_catalog_item_consumers organization_idfk-nullable

Nullable foreign key

ai_catalog_item_consumers.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F951ai_catalog_item_consumers group_id, parent_item_consumer_id, project_id, service_account_id, organization_idexclusive-arc

Either/or foreign keys without a CHECK

ai_catalog_item_consumers has several nullable FKs (group_id, parent_item_consumer_id, project_id, service_account_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE ai_catalog_item_consumers ADD CONSTRAINT ai_catalog_item_consumers_one_target CHECK ((group_id IS NOT NULL)::int + (parent_item_consumer_id IS NOT NULL)::int + (project_id IS NOT NULL)::int + (service_account_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int = 1);
F077ai_catalog_item_versions created_by_idfk-nullable

Nullable foreign key

ai_catalog_item_versions.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F078ai_catalog_items project_idfk-nullable

Nullable foreign key

ai_catalog_items.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F079ai_catalog_items latest_released_version_idfk-nullable

Nullable foreign key

ai_catalog_items.latest_released_version_id may be NULL, so the relationship to ai_catalog_item_versions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F080ai_catalog_items latest_version_idfk-nullable

Nullable foreign key

ai_catalog_items.latest_version_id may be NULL, so the relationship to ai_catalog_item_versions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F952ai_catalog_items project_id, latest_released_version_id, latest_version_idexclusive-arc

Either/or foreign keys without a CHECK

ai_catalog_items has several nullable FKs (project_id, latest_released_version_id, latest_version_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE ai_catalog_items ADD CONSTRAINT ai_catalog_items_one_target CHECK ((project_id IS NOT NULL)::int + (latest_released_version_id IS NOT NULL)::int + (latest_version_id IS NOT NULL)::int = 1);
F081ai_catalog_mcp_server_blocks created_by_idfk-nullable

Nullable foreign key

ai_catalog_mcp_server_blocks.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F082ai_catalog_mcp_servers created_by_idfk-nullable

Nullable foreign key

ai_catalog_mcp_servers.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F083ai_feature_settings ai_self_hosted_model_idfk-nullable

Nullable foreign key

ai_feature_settings.ai_self_hosted_model_id may be NULL, so the relationship to ai_self_hosted_models is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F084ai_flow_triggers ai_catalog_item_consumer_idfk-nullable

Nullable foreign key

ai_flow_triggers.ai_catalog_item_consumer_id may be NULL, so the relationship to ai_catalog_item_consumers is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

ai_instance_accessible_entity_rules references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F085ai_namespace_feature_access_rules through_namespace_idfk-nullable

Nullable foreign key

ai_namespace_feature_access_rules.through_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F086ai_settings amazon_q_oauth_application_idfk-nullable

Nullable foreign key

ai_settings.amazon_q_oauth_application_id may be NULL, so the relationship to oauth_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F087ai_settings organization_idfk-nullable

Nullable foreign key

ai_settings.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F088ai_settings duo_workflow_oauth_application_idfk-nullable

Nullable foreign key

ai_settings.duo_workflow_oauth_application_id may be NULL, so the relationship to oauth_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F089ai_settings duo_workflow_service_account_user_idfk-nullable

Nullable foreign key

ai_settings.duo_workflow_service_account_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F090ai_settings amazon_q_service_account_user_idfk-nullable

Nullable foreign key

ai_settings.amazon_q_service_account_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F953ai_settings amazon_q_oauth_application_id, organization_id, duo_workflow_oauth_application_id, duo_workflow_service_account_user_id, amazon_q_service_account_user_idexclusive-arc

Either/or foreign keys without a CHECK

ai_settings has several nullable FKs (amazon_q_oauth_application_id, organization_id, duo_workflow_oauth_application_id, duo_workflow_service_account_user_id, amazon_q_service_account_user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE ai_settings ADD CONSTRAINT ai_settings_one_target CHECK ((amazon_q_oauth_application_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int + (duo_workflow_oauth_application_id IS NOT NULL)::int + (duo_workflow_service_account_user_id IS NOT NULL)::int + (amazon_q_service_account_user_id IS NOT NULL)::int = 1);

Isolated table

ai_testing_terms_acceptances references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F091ai_tool_rules project_idfk-nullable

Nullable foreign key

ai_tool_rules.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F032ai_usage_events namespace_idfk-nullable

Nullable foreign key

ai_usage_events.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1127ai_vectorizable_file_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE ai_vectorizable_file_uploads ALTER COLUMN created_at TYPE timestamptz;
F092alert_management_alert_assignees project_idfk-nullable

Nullable foreign key

alert_management_alert_assignees.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE alert_management_alert_metric_image_uploads ALTER COLUMN created_at TYPE timestamptz;
F093alert_management_alert_metric_images project_idfk-nullable

Nullable foreign key

alert_management_alert_metric_images.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F094alert_management_alert_user_mentions project_idfk-nullable

Nullable foreign key

alert_management_alert_user_mentions.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

alert_management_alert_user_mentions.note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F954alert_management_alert_user_mentions project_id, note_idexclusive-arc

Either/or foreign keys without a CHECK

alert_management_alert_user_mentions has several nullable FKs (project_id, note_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE alert_management_alert_user_mentions ADD CONSTRAINT alert_management_alert_user_mentions_one_target CHECK ((project_id IS NOT NULL)::int + (note_id IS NOT NULL)::int = 1);
F096alert_management_alerts issue_idfk-nullable

Nullable foreign key

alert_management_alerts.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F097alert_management_alerts environment_idfk-nullable

Nullable foreign key

alert_management_alerts.environment_id may be NULL, so the relationship to environments is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F955alert_management_alerts issue_id, environment_idexclusive-arc

Either/or foreign keys without a CHECK

alert_management_alerts has several nullable FKs (issue_id, environment_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE alert_management_alerts ADD CONSTRAINT alert_management_alerts_one_target CHECK ((issue_id IS NOT NULL)::int + (environment_id IS NOT NULL)::int = 1);
F098analytics_cycle_analytics_group_stages stage_event_hash_idfk-nullable

Nullable foreign key

analytics_cycle_analytics_group_stages.stage_event_hash_id may be NULL, so the relationship to analytics_cycle_analytics_stage_event_hashes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F099analytics_cycle_analytics_group_stages start_event_label_idfk-nullable

Nullable foreign key

analytics_cycle_analytics_group_stages.start_event_label_id may be NULL, so the relationship to labels is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F100analytics_cycle_analytics_group_stages end_event_label_idfk-nullable

Nullable foreign key

analytics_cycle_analytics_group_stages.end_event_label_id may be NULL, so the relationship to labels is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F956analytics_cycle_analytics_group_stages stage_event_hash_id, start_event_label_id, end_event_label_idexclusive-arc

Either/or foreign keys without a CHECK

analytics_cycle_analytics_group_stages has several nullable FKs (stage_event_hash_id, start_event_label_id, end_event_label_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE analytics_cycle_analytics_group_stages ADD CONSTRAINT analytics_cycle_analytics_group_stages_one_target CHECK ((stage_event_hash_id IS NOT NULL)::int + (start_event_label_id IS NOT NULL)::int + (end_event_label_id IS NOT NULL)::int = 1);

Isolated table

analytics_cycle_analytics_issue_stage_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_16 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_17 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_18 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_19 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_20 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_21 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_22 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_23 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_24 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_25 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_26 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_27 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_28 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_29 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_30 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_issue_stage_events_31 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_16 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_17 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_18 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_19 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_20 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_21 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_22 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_23 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_24 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_25 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_26 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_27 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_28 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_29 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_30 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analytics_cycle_analytics_merge_request_stage_events_31 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F101analytics_dashboards_pointers namespace_idfk-nullable

Nullable foreign key

analytics_dashboards_pointers.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F102analytics_dashboards_pointers project_idfk-nullable

Nullable foreign key

analytics_dashboards_pointers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F103analytics_devops_adoption_segments display_namespace_idfk-nullable

Nullable foreign key

analytics_devops_adoption_segments.display_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F104analytics_devops_adoption_segments namespace_idfk-nullable

Nullable foreign key

analytics_devops_adoption_segments.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F957analytics_devops_adoption_segments display_namespace_id, namespace_idexclusive-arc

Either/or foreign keys without a CHECK

analytics_devops_adoption_segments has several nullable FKs (display_namespace_id, namespace_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE analytics_devops_adoption_segments ADD CONSTRAINT analytics_devops_adoption_segments_one_target CHECK ((display_namespace_id IS NOT NULL)::int + (namespace_id IS NOT NULL)::int = 1);
F105analytics_devops_adoption_snapshots namespace_idfk-nullable

Nullable foreign key

analytics_devops_adoption_snapshots.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

analytics_usage_trends_measurements references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

analyzer_namespace_statuses references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1755analyzer_project_statusesorphan-table

Isolated table

analyzer_project_statuses references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1129appearance_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE appearance_uploads ALTER COLUMN created_at TYPE timestamptz;
F1756appearancesorphan-table

Isolated table

appearances references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F106application_settings duo_template_project_idfk-nullable

Nullable foreign key

application_settings.duo_template_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F107application_settings o11y_oauth_application_idfk-nullable

Nullable foreign key

application_settings.o11y_oauth_application_id may be NULL, so the relationship to oauth_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F108application_settings workspaces_oauth_application_idfk-nullable

Nullable foreign key

application_settings.workspaces_oauth_application_id may be NULL, so the relationship to oauth_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F109application_settings web_ide_oauth_application_idfk-nullable

Nullable foreign key

application_settings.web_ide_oauth_application_id may be NULL, so the relationship to oauth_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1130application_settings created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE application_settings ALTER COLUMN created_at TYPE timestamptz;
F1131application_settings updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE application_settings ALTER COLUMN updated_at TYPE timestamptz;
F1852application_settingswide-table

Wide table (584 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F958application_settings duo_template_project_id, o11y_oauth_application_id, workspaces_oauth_application_id, web_ide_oauth_application_idexclusive-arc

Either/or foreign keys without a CHECK

application_settings has several nullable FKs (duo_template_project_id, o11y_oauth_application_id, workspaces_oauth_application_id, web_ide_oauth_application_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE application_settings ADD CONSTRAINT application_settings_one_target CHECK ((duo_template_project_id IS NOT NULL)::int + (o11y_oauth_application_id IS NOT NULL)::int + (workspaces_oauth_application_id IS NOT NULL)::int + (web_ide_oauth_application_id IS NOT NULL)::int = 1);
F110approval_group_rules scan_result_policy_idfk-nullable

Nullable foreign key

approval_group_rules.scan_result_policy_id may be NULL, so the relationship to scan_result_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F111approval_group_rules approval_policy_rule_idfk-nullable

Nullable foreign key

approval_group_rules.approval_policy_rule_id may be NULL, so the relationship to approval_policy_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F112approval_group_rules security_orchestration_policy_configuration_idfk-nullable

Nullable foreign key

approval_group_rules.security_orchestration_policy_configuration_id may be NULL, so the relationship to security_orchestration_policy_configurations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F959approval_group_rules scan_result_policy_id, approval_policy_rule_id, security_orchestration_policy_configuration_idexclusive-arc

Either/or foreign keys without a CHECK

approval_group_rules has several nullable FKs (scan_result_policy_id, approval_policy_rule_id, security_orchestration_policy_configuration_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE approval_group_rules ADD CONSTRAINT approval_group_rules_one_target CHECK ((scan_result_policy_id IS NOT NULL)::int + (approval_policy_rule_id IS NOT NULL)::int + (security_orchestration_policy_configuration_id IS NOT NULL)::int = 1);

Nullable foreign key

approval_group_rules_protected_branches.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F114approval_group_rules_users group_idfk-nullable

Nullable foreign key

approval_group_rules_users.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F115approval_merge_request_rule_sources project_idfk-nullable

Nullable foreign key

approval_merge_request_rule_sources.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F116approval_merge_request_rules security_orchestration_policy_configuration_idfk-nullable

Nullable foreign key

approval_merge_request_rules.security_orchestration_policy_configuration_id may be NULL, so the relationship to security_orchestration_policy_configurations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F117approval_merge_request_rules scan_result_policy_idfk-nullable

Nullable foreign key

approval_merge_request_rules.scan_result_policy_id may be NULL, so the relationship to scan_result_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F118approval_merge_request_rules project_idfk-nullable

Nullable foreign key

approval_merge_request_rules.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F960approval_merge_request_rules security_orchestration_policy_configuration_id, scan_result_policy_id, project_idexclusive-arc

Either/or foreign keys without a CHECK

approval_merge_request_rules has several nullable FKs (security_orchestration_policy_configuration_id, scan_result_policy_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE approval_merge_request_rules ADD CONSTRAINT approval_merge_request_rules_one_target CHECK ((security_orchestration_policy_configuration_id IS NOT NULL)::int + (scan_result_policy_id IS NOT NULL)::int + (project_id IS NOT NULL)::int = 1);

Nullable foreign key

approval_merge_request_rules_approved_approvers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F120approval_merge_request_rules_users project_idfk-nullable

Nullable foreign key

approval_merge_request_rules_users.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

approval_policy_merge_request_bypass_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F122approval_project_rules approval_policy_rule_idfk-nullable

Nullable foreign key

approval_project_rules.approval_policy_rule_id may be NULL, so the relationship to approval_policy_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F123approval_project_rules scan_result_policy_idfk-nullable

Nullable foreign key

approval_project_rules.scan_result_policy_id may be NULL, so the relationship to scan_result_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F124approval_project_rules security_orchestration_policy_configuration_idfk-nullable

Nullable foreign key

approval_project_rules.security_orchestration_policy_configuration_id may be NULL, so the relationship to security_orchestration_policy_configurations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F961approval_project_rules approval_policy_rule_id, scan_result_policy_id, security_orchestration_policy_configuration_idexclusive-arc

Either/or foreign keys without a CHECK

approval_project_rules has several nullable FKs (approval_policy_rule_id, scan_result_policy_id, security_orchestration_policy_configuration_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE approval_project_rules ADD CONSTRAINT approval_project_rules_one_target CHECK ((approval_policy_rule_id IS NOT NULL)::int + (scan_result_policy_id IS NOT NULL)::int + (security_orchestration_policy_configuration_id IS NOT NULL)::int = 1);

Nullable foreign key

approval_project_rules_protected_branches.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F126approval_project_rules_users project_idfk-nullable

Nullable foreign key

approval_project_rules_users.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1132approvals created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE approvals ALTER COLUMN created_at TYPE timestamptz;
F1133approvals updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE approvals ALTER COLUMN updated_at TYPE timestamptz;
F127approvals project_idfk-nullable

Nullable foreign key

approvals.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1134ar_internal_metadata created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE ar_internal_metadata ALTER COLUMN created_at TYPE timestamptz;
F1135ar_internal_metadata updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE ar_internal_metadata ALTER COLUMN updated_at TYPE timestamptz;
F1757ar_internal_metadataorphan-table

Isolated table

ar_internal_metadata references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1853arkose_sessionswide-table

Wide table (30 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F128ascp_scans base_scan_idfk-nullable

Nullable foreign key

ascp_scans.base_scan_id may be NULL, so the relationship to ascp_scans is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1101audit_events created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE audit_events ALTER COLUMN created_at TYPE timestamptz;
F1357audit_eventsorphan-table

Isolated table

audit_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F129audit_events_amazon_s3_configurations stream_destination_idfk-nullable

Nullable foreign key

audit_events_amazon_s3_configurations.stream_destination_id may be NULL, so the relationship to audit_events_group_external_streaming_destinations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F130audit_events_external_audit_event_destinations stream_destination_idfk-nullable

Nullable foreign key

audit_events_external_audit_event_destinations.stream_destination_id may be NULL, so the relationship to audit_events_group_external_streaming_destinations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F131audit_events_google_cloud_logging_configurations stream_destination_idfk-nullable

Nullable foreign key

audit_events_google_cloud_logging_configurations.stream_destination_id may be NULL, so the relationship to audit_events_group_external_streaming_destinations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F132audit_events_instance_amazon_s3_configurations stream_destination_idfk-nullable

Nullable foreign key

audit_events_instance_amazon_s3_configurations.stream_destination_id may be NULL, so the relationship to audit_events_instance_external_streaming_destinations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F133audit_events_instance_external_audit_event_destinations stream_destination_idfk-nullable

Nullable foreign key

audit_events_instance_external_audit_event_destinations.stream_destination_id may be NULL, so the relationship to audit_events_instance_external_streaming_destinations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

audit_events_instance_google_cloud_logging_configurations.stream_destination_id may be NULL, so the relationship to audit_events_instance_external_streaming_destinations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

audit_events_streaming_event_type_filters.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F136audit_events_streaming_headers group_idfk-nullable

Nullable foreign key

audit_events_streaming_headers.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F137authentication_events user_idfk-nullable

Nullable foreign key

authentication_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1136award_emoji created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE award_emoji ALTER COLUMN created_at TYPE timestamptz;
F1137award_emoji updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE award_emoji ALTER COLUMN updated_at TYPE timestamptz;
F138award_emoji organization_idfk-nullable

Nullable foreign key

award_emoji.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F139award_emoji namespace_idfk-nullable

Nullable foreign key

award_emoji.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1358background_operation_jobsorphan-table

Isolated table

background_operation_jobs references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

background_operation_jobs_cell_local references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

background_operation_workers references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

background_operation_workers_cell_local references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1362backup_finding_evidencesorphan-table

Isolated table

backup_finding_evidences references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1363backup_finding_flagsorphan-table

Isolated table

backup_finding_flags references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

backup_finding_identifiers references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1365backup_finding_linksorphan-table

Isolated table

backup_finding_links references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

backup_finding_remediations references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1367backup_finding_signaturesorphan-table

Isolated table

backup_finding_signatures references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1368backup_findingsorphan-table

Isolated table

backup_findings references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1369backup_vulnerabilitiesorphan-table

Isolated table

backup_vulnerabilities references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

backup_vulnerability_external_issue_links references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

backup_vulnerability_issue_links references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

backup_vulnerability_merge_request_links references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

backup_vulnerability_reads references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

backup_vulnerability_severity_overrides references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

backup_vulnerability_state_transitions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

backup_vulnerability_user_mentions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F140badges project_idfk-nullable

Nullable foreign key

badges.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F141badges group_idfk-nullable

Nullable foreign key

badges.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F142board_assignees project_idfk-nullable

Nullable foreign key

board_assignees.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F143board_assignees group_idfk-nullable

Nullable foreign key

board_assignees.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F144board_group_recent_visits user_idfk-nullable

Nullable foreign key

board_group_recent_visits.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F145board_group_recent_visits board_idfk-nullable

Nullable foreign key

board_group_recent_visits.board_id may be NULL, so the relationship to boards is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F146board_group_recent_visits group_idfk-nullable

Nullable foreign key

board_group_recent_visits.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F962board_group_recent_visits user_id, board_id, group_idexclusive-arc

Either/or foreign keys without a CHECK

board_group_recent_visits has several nullable FKs (user_id, board_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE board_group_recent_visits ADD CONSTRAINT board_group_recent_visits_one_target CHECK ((user_id IS NOT NULL)::int + (board_id IS NOT NULL)::int + (group_id IS NOT NULL)::int = 1);
F147board_labels group_idfk-nullable

Nullable foreign key

board_labels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F148board_labels project_idfk-nullable

Nullable foreign key

board_labels.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F149board_project_recent_visits project_idfk-nullable

Nullable foreign key

board_project_recent_visits.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F150board_project_recent_visits board_idfk-nullable

Nullable foreign key

board_project_recent_visits.board_id may be NULL, so the relationship to boards is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F151board_project_recent_visits user_idfk-nullable

Nullable foreign key

board_project_recent_visits.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F963board_project_recent_visits project_id, board_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

board_project_recent_visits has several nullable FKs (project_id, board_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE board_project_recent_visits ADD CONSTRAINT board_project_recent_visits_one_target CHECK ((project_id IS NOT NULL)::int + (board_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F152board_user_preferences group_idfk-nullable

Nullable foreign key

board_user_preferences.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F153board_user_preferences project_idfk-nullable

Nullable foreign key

board_user_preferences.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1138boards created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE boards ALTER COLUMN created_at TYPE timestamptz;
F1139boards updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE boards ALTER COLUMN updated_at TYPE timestamptz;
F154boards iteration_cadence_idfk-nullable

Nullable foreign key

boards.iteration_cadence_id may be NULL, so the relationship to iterations_cadences is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F155boards project_idfk-nullable

Nullable foreign key

boards.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F156boards group_idfk-nullable

Nullable foreign key

boards.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F964boards iteration_cadence_id, project_id, group_idexclusive-arc

Either/or foreign keys without a CHECK

boards has several nullable FKs (iteration_cadence_id, project_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE boards ADD CONSTRAINT boards_one_target CHECK ((iteration_cadence_id IS NOT NULL)::int + (project_id IS NOT NULL)::int + (group_id IS NOT NULL)::int = 1);
F157boards_epic_board_labels group_idfk-nullable

Nullable foreign key

boards_epic_board_labels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F158boards_epic_board_positions group_idfk-nullable

Nullable foreign key

boards_epic_board_positions.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F159boards_epic_list_user_preferences group_idfk-nullable

Nullable foreign key

boards_epic_list_user_preferences.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F160boards_epic_lists group_idfk-nullable

Nullable foreign key

boards_epic_lists.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F161boards_epic_lists label_idfk-nullable

Nullable foreign key

boards_epic_lists.label_id may be NULL, so the relationship to labels is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F965boards_epic_lists group_id, label_idexclusive-arc

Either/or foreign keys without a CHECK

boards_epic_lists has several nullable FKs (group_id, label_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE boards_epic_lists ADD CONSTRAINT boards_epic_lists_one_target CHECK ((group_id IS NOT NULL)::int + (label_id IS NOT NULL)::int = 1);
F162boards_epic_user_preferences group_idfk-nullable

Nullable foreign key

boards_epic_user_preferences.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1140broadcast_messages starts_attimestamp-tz

TIMESTAMP without time zone

starts_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE broadcast_messages ALTER COLUMN starts_at TYPE timestamptz;
F1141broadcast_messages ends_attimestamp-tz

TIMESTAMP without time zone

ends_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE broadcast_messages ALTER COLUMN ends_at TYPE timestamptz;
F1142broadcast_messages created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE broadcast_messages ALTER COLUMN created_at TYPE timestamptz;
F1143broadcast_messages updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE broadcast_messages ALTER COLUMN updated_at TYPE timestamptz;
F163bulk_import_batch_trackers project_idfk-nullable

Nullable foreign key

bulk_import_batch_trackers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F164bulk_import_batch_trackers organization_idfk-nullable

Nullable foreign key

bulk_import_batch_trackers.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F165bulk_import_batch_trackers namespace_idfk-nullable

Nullable foreign key

bulk_import_batch_trackers.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F166bulk_import_configurations organization_idfk-nullable

Nullable foreign key

bulk_import_configurations.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F167bulk_import_entities organization_idfk-nullable

Nullable foreign key

bulk_import_entities.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F168bulk_import_entities namespace_idfk-nullable

Nullable foreign key

bulk_import_entities.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F169bulk_import_entities parent_idfk-nullable

Nullable foreign key

bulk_import_entities.parent_id may be NULL, so the relationship to bulk_import_entities is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F170bulk_import_entities project_idfk-nullable

Nullable foreign key

bulk_import_entities.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F966bulk_import_entities organization_id, namespace_id, parent_id, project_idexclusive-arc

Either/or foreign keys without a CHECK

bulk_import_entities has several nullable FKs (organization_id, namespace_id, parent_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE bulk_import_entities ADD CONSTRAINT bulk_import_entities_one_target CHECK ((organization_id IS NOT NULL)::int + (namespace_id IS NOT NULL)::int + (parent_id IS NOT NULL)::int + (project_id IS NOT NULL)::int = 1);
F171bulk_import_export_batches group_idfk-nullable

Nullable foreign key

bulk_import_export_batches.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F172bulk_import_export_batches project_idfk-nullable

Nullable foreign key

bulk_import_export_batches.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1144bulk_import_export_upload_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE bulk_import_export_upload_uploads ALTER COLUMN created_at TYPE timestamptz;
F173bulk_import_export_uploads group_idfk-nullable

Nullable foreign key

bulk_import_export_uploads.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F174bulk_import_export_uploads batch_idfk-nullable

Nullable foreign key

bulk_import_export_uploads.batch_id may be NULL, so the relationship to bulk_import_export_batches is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F175bulk_import_export_uploads project_idfk-nullable

Nullable foreign key

bulk_import_export_uploads.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F967bulk_import_export_uploads group_id, batch_id, project_idexclusive-arc

Either/or foreign keys without a CHECK

bulk_import_export_uploads has several nullable FKs (group_id, batch_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE bulk_import_export_uploads ADD CONSTRAINT bulk_import_export_uploads_one_target CHECK ((group_id IS NOT NULL)::int + (batch_id IS NOT NULL)::int + (project_id IS NOT NULL)::int = 1);
F176bulk_import_exports offline_export_idfk-nullable

Nullable foreign key

bulk_import_exports.offline_export_id may be NULL, so the relationship to import_offline_exports is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F177bulk_import_exports project_idfk-nullable

Nullable foreign key

bulk_import_exports.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F178bulk_import_exports group_idfk-nullable

Nullable foreign key

bulk_import_exports.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F179bulk_import_exports user_idfk-nullable

Nullable foreign key

bulk_import_exports.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F968bulk_import_exports offline_export_id, project_id, group_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

bulk_import_exports has several nullable FKs (offline_export_id, project_id, group_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE bulk_import_exports ADD CONSTRAINT bulk_import_exports_one_target CHECK ((offline_export_id IS NOT NULL)::int + (project_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F180bulk_import_failures project_idfk-nullable

Nullable foreign key

bulk_import_failures.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F181bulk_import_failures organization_idfk-nullable

Nullable foreign key

bulk_import_failures.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F182bulk_import_failures namespace_idfk-nullable

Nullable foreign key

bulk_import_failures.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F183bulk_import_trackers organization_idfk-nullable

Nullable foreign key

bulk_import_trackers.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F184bulk_import_trackers project_idfk-nullable

Nullable foreign key

bulk_import_trackers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F185bulk_import_trackers namespace_idfk-nullable

Nullable foreign key

bulk_import_trackers.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F186catalog_resource_versions published_by_idfk-nullable

Nullable foreign key

catalog_resource_versions.published_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F187cd_applications organization_idfk-nullable

Nullable foreign key

cd_applications.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F188cd_artifact_sources group_idfk-nullable

Nullable foreign key

cd_artifact_sources.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F189cd_artifact_sources organization_idfk-nullable

Nullable foreign key

cd_artifact_sources.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F969cd_artifact_sources group_id, organization_idexclusive-arc

Either/or foreign keys without a CHECK

cd_artifact_sources has several nullable FKs (group_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE cd_artifact_sources ADD CONSTRAINT cd_artifact_sources_one_target CHECK ((group_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int = 1);
F190cd_deployments service_idfk-nullable

Nullable foreign key

cd_deployments.service_id may be NULL, so the relationship to cd_services is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F191cd_deployments group_idfk-nullable

Nullable foreign key

cd_deployments.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F192cd_deployments rollout_environment_idfk-nullable

Nullable foreign key

cd_deployments.rollout_environment_id may be NULL, so the relationship to cd_rollout_environments is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F193cd_deployments organization_idfk-nullable

Nullable foreign key

cd_deployments.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F970cd_deployments service_id, group_id, rollout_environment_id, organization_idexclusive-arc

Either/or foreign keys without a CHECK

cd_deployments has several nullable FKs (service_id, group_id, rollout_environment_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE cd_deployments ADD CONSTRAINT cd_deployments_one_target CHECK ((service_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (rollout_environment_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int = 1);
F194cd_environments organization_idfk-nullable

Nullable foreign key

cd_environments.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F195cd_rollout_environments previous_version_set_idfk-nullable

Nullable foreign key

cd_rollout_environments.previous_version_set_id may be NULL, so the relationship to cd_version_sets is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F196cd_rollout_steps rollout_environment_idfk-nullable

Nullable foreign key

cd_rollout_steps.rollout_environment_id may be NULL, so the relationship to cd_rollout_environments is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F197cd_rollouts application_flow_definition_idfk-nullable

Nullable foreign key

cd_rollouts.application_flow_definition_id may be NULL, so the relationship to cd_application_flow_definitions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F198cd_rollouts organization_idfk-nullable

Nullable foreign key

cd_rollouts.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F199cd_rollouts group_idfk-nullable

Nullable foreign key

cd_rollouts.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F200cd_rollouts application_idfk-nullable

Nullable foreign key

cd_rollouts.application_id may be NULL, so the relationship to cd_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F971cd_rollouts application_flow_definition_id, organization_id, group_id, application_idexclusive-arc

Either/or foreign keys without a CHECK

cd_rollouts has several nullable FKs (application_flow_definition_id, organization_id, group_id, application_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE cd_rollouts ADD CONSTRAINT cd_rollouts_one_target CHECK ((application_flow_definition_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (application_id IS NOT NULL)::int = 1);
F201cd_services group_idfk-nullable

Nullable foreign key

cd_services.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F202cd_services organization_idfk-nullable

Nullable foreign key

cd_services.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F972cd_services group_id, organization_idexclusive-arc

Either/or foreign keys without a CHECK

cd_services has several nullable FKs (group_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE cd_services ADD CONSTRAINT cd_services_one_target CHECK ((group_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int = 1);
F203cd_version_set_entries group_idfk-nullable

Nullable foreign key

cd_version_set_entries.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F204cd_version_set_entries organization_idfk-nullable

Nullable foreign key

cd_version_set_entries.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F205cd_version_set_entries artifact_source_idfk-nullable

Nullable foreign key

cd_version_set_entries.artifact_source_id may be NULL, so the relationship to cd_artifact_sources is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F973cd_version_set_entries group_id, organization_id, artifact_source_idexclusive-arc

Either/or foreign keys without a CHECK

cd_version_set_entries has several nullable FKs (group_id, organization_id, artifact_source_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE cd_version_set_entries ADD CONSTRAINT cd_version_set_entries_one_target CHECK ((group_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int + (artifact_source_id IS NOT NULL)::int = 1);
F206cd_version_sets created_by_idfk-nullable

Nullable foreign key

cd_version_sets.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F207cd_version_sets group_idfk-nullable

Nullable foreign key

cd_version_sets.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F208cd_version_sets organization_idfk-nullable

Nullable foreign key

cd_version_sets.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F974cd_version_sets created_by_id, group_id, organization_idexclusive-arc

Either/or foreign keys without a CHECK

cd_version_sets has several nullable FKs (created_by_id, group_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE cd_version_sets ADD CONSTRAINT cd_version_sets_one_target CHECK ((created_by_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int = 1);
F209cd_versions organization_idfk-nullable

Nullable foreign key

cd_versions.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F210cd_versions group_idfk-nullable

Nullable foreign key

cd_versions.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F975cd_versions organization_id, group_idexclusive-arc

Either/or foreign keys without a CHECK

cd_versions has several nullable FKs (organization_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE cd_versions ADD CONSTRAINT cd_versions_one_target CHECK ((organization_id IS NOT NULL)::int + (group_id IS NOT NULL)::int = 1);
F1758cells_outstanding_leasesorphan-table

Isolated table

cells_outstanding_leases references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1145chat_names last_used_attimestamp-tz

TIMESTAMP without time zone

last_used_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE chat_names ALTER COLUMN last_used_at TYPE timestamptz;
F1146chat_names created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE chat_names ALTER COLUMN created_at TYPE timestamptz;
F1147chat_names updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE chat_names ALTER COLUMN updated_at TYPE timestamptz;
F1759chat_namesorphan-table

Isolated table

chat_names references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1148chat_teams created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE chat_teams ALTER COLUMN created_at TYPE timestamptz;
F1149chat_teams updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE chat_teams ALTER COLUMN updated_at TYPE timestamptz;

Isolated table

ci_build_runtime_environments references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1761ci_deleted_objectsorphan-table

Isolated table

ci_deleted_objects references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1762ci_freeze_periodsorphan-table

Isolated table

ci_freeze_periods references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

ci_gitlab_hosted_runner_monthly_usages references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1764ci_group_variablesorphan-table

Isolated table

ci_group_variables references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

ci_instance_runner_monthly_usages references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1766ci_instance_variablesorphan-table

Isolated table

ci_instance_variables references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

ci_job_token_authorizations references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

ci_job_token_group_scope_links references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

ci_job_token_project_scope_links references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

ci_minutes_additional_packs references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1771ci_namespace_mirrorsorphan-table

Isolated table

ci_namespace_mirrors references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

ci_namespace_monthly_usages references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1773ci_partitionsorphan-table

Isolated table

ci_partitions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1150ci_pipeline_schedules next_run_attimestamp-tz

TIMESTAMP without time zone

next_run_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE ci_pipeline_schedules ALTER COLUMN next_run_at TYPE timestamptz;
F1151ci_pipeline_schedules created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE ci_pipeline_schedules ALTER COLUMN created_at TYPE timestamptz;
F1152ci_pipeline_schedules updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE ci_pipeline_schedules ALTER COLUMN updated_at TYPE timestamptz;
F1774ci_project_metricsorphan-table

Isolated table

ci_project_metrics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1775ci_project_mirrorsorphan-table

Isolated table

ci_project_mirrors references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1776ci_project_monthly_usagesorphan-table

Isolated table

ci_project_monthly_usages references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F211ci_resources partition_id, build_idfk-nullable

Nullable foreign key

ci_resources.partition_id.build_id may be NULL, so the relationship to p_ci_builds is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

ci_runner_controller_runner_level_scopings_instance_type references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1778ci_runner_machinesorphan-table

Isolated table

ci_runner_machines references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F212ci_runner_namespaces runner_idfk-nullable

Nullable foreign key

ci_runner_namespaces.runner_id may be NULL, so the relationship to group_type_ci_runners is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1153ci_runner_projects created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE ci_runner_projects ALTER COLUMN created_at TYPE timestamptz;
F1154ci_runner_projects updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE ci_runner_projects ALTER COLUMN updated_at TYPE timestamptz;
F1779ci_runner_taggingsorphan-table

Isolated table

ci_runner_taggings references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1780ci_runner_versionsorphan-table

Isolated table

ci_runner_versions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1781ci_secure_file_statesorphan-table

Isolated table

ci_secure_file_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1782ci_secure_filesorphan-table

Isolated table

ci_secure_files references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F213ci_sources_pipelines source_partition_id, source_job_idfk-nullable

Nullable foreign key

ci_sources_pipelines.source_partition_id.source_job_id may be NULL, so the relationship to p_ci_builds is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F214ci_sources_pipelines source_partition_id, source_pipeline_idfk-nullable

Nullable foreign key

ci_sources_pipelines.source_partition_id.source_pipeline_id may be NULL, so the relationship to p_ci_pipelines is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F215ci_sources_pipelines partition_id, pipeline_idfk-nullable

Nullable foreign key

ci_sources_pipelines.partition_id.pipeline_id may be NULL, so the relationship to p_ci_pipelines is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1783ci_subscriptions_projectsorphan-table

Isolated table

ci_subscriptions_projects references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1155ci_triggers created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE ci_triggers ALTER COLUMN created_at TYPE timestamptz;
F1156ci_triggers updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE ci_triggers ALTER COLUMN updated_at TYPE timestamptz;
F1784ci_triggersorphan-table

Isolated table

ci_triggers references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1785ci_variablesorphan-table

Isolated table

ci_variables references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1786cloud_connector_accessorphan-table

Isolated table

cloud_connector_access references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1787cloud_connector_keysorphan-table

Isolated table

cloud_connector_keys references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F216cluster_agent_migrations issue_idfk-nullable

Nullable foreign key

cluster_agent_migrations.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F217cluster_agent_tokens project_idfk-nullable

Nullable foreign key

cluster_agent_tokens.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F218cluster_agent_tokens created_by_user_idfk-nullable

Nullable foreign key

cluster_agent_tokens.created_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F976cluster_agent_tokens project_id, created_by_user_idexclusive-arc

Either/or foreign keys without a CHECK

cluster_agent_tokens has several nullable FKs (project_id, created_by_user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE cluster_agent_tokens ADD CONSTRAINT cluster_agent_tokens_one_target CHECK ((project_id IS NOT NULL)::int + (created_by_user_id IS NOT NULL)::int = 1);
F219cluster_agent_url_configurations created_by_user_idfk-nullable

Nullable foreign key

cluster_agent_url_configurations.created_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F220cluster_agents created_by_user_idfk-nullable

Nullable foreign key

cluster_agents.created_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1157cluster_platforms_kubernetes created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE cluster_platforms_kubernetes ALTER COLUMN created_at TYPE timestamptz;
F1158cluster_platforms_kubernetes updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE cluster_platforms_kubernetes ALTER COLUMN updated_at TYPE timestamptz;
F221cluster_platforms_kubernetes organization_idfk-nullable

Nullable foreign key

cluster_platforms_kubernetes.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F222cluster_platforms_kubernetes group_idfk-nullable

Nullable foreign key

cluster_platforms_kubernetes.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F223cluster_platforms_kubernetes project_idfk-nullable

Nullable foreign key

cluster_platforms_kubernetes.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1159cluster_projects created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE cluster_projects ALTER COLUMN created_at TYPE timestamptz;
F1160cluster_projects updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE cluster_projects ALTER COLUMN updated_at TYPE timestamptz;
F224cluster_providers_aws project_idfk-nullable

Nullable foreign key

cluster_providers_aws.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F225cluster_providers_aws group_idfk-nullable

Nullable foreign key

cluster_providers_aws.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F226cluster_providers_aws organization_idfk-nullable

Nullable foreign key

cluster_providers_aws.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1161cluster_providers_gcp created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE cluster_providers_gcp ALTER COLUMN created_at TYPE timestamptz;
F1162cluster_providers_gcp updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE cluster_providers_gcp ALTER COLUMN updated_at TYPE timestamptz;
F227cluster_providers_gcp group_idfk-nullable

Nullable foreign key

cluster_providers_gcp.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F228cluster_providers_gcp project_idfk-nullable

Nullable foreign key

cluster_providers_gcp.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F229cluster_providers_gcp organization_idfk-nullable

Nullable foreign key

cluster_providers_gcp.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1163clusters created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE clusters ALTER COLUMN created_at TYPE timestamptz;
F1164clusters updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE clusters ALTER COLUMN updated_at TYPE timestamptz;
F230clusters organization_idfk-nullable

Nullable foreign key

clusters.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F231clusters group_idfk-nullable

Nullable foreign key

clusters.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F232clusters management_project_idfk-nullable

Nullable foreign key

clusters.management_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F233clusters project_idfk-nullable

Nullable foreign key

clusters.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F234clusters user_idfk-nullable

Nullable foreign key

clusters.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F977clusters organization_id, group_id, management_project_id, project_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

clusters has several nullable FKs (organization_id, group_id, management_project_id, project_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE clusters ADD CONSTRAINT clusters_one_target CHECK ((organization_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (management_project_id IS NOT NULL)::int + (project_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F235clusters_kubernetes_namespaces organization_idfk-nullable

Nullable foreign key

clusters_kubernetes_namespaces.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F236clusters_kubernetes_namespaces group_idfk-nullable

Nullable foreign key

clusters_kubernetes_namespaces.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F237clusters_kubernetes_namespaces sharding_project_idfk-nullable

Nullable foreign key

clusters_kubernetes_namespaces.sharding_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F238clusters_kubernetes_namespaces cluster_project_idfk-nullable

Nullable foreign key

clusters_kubernetes_namespaces.cluster_project_id may be NULL, so the relationship to cluster_projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F239clusters_kubernetes_namespaces environment_idfk-nullable

Nullable foreign key

clusters_kubernetes_namespaces.environment_id may be NULL, so the relationship to environments is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F240clusters_kubernetes_namespaces project_idfk-nullable

Nullable foreign key

clusters_kubernetes_namespaces.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F978clusters_kubernetes_namespaces organization_id, group_id, sharding_project_id, cluster_project_id, environment_id, project_idexclusive-arc

Either/or foreign keys without a CHECK

clusters_kubernetes_namespaces has several nullable FKs (organization_id, group_id, sharding_project_id, cluster_project_id, environment_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE clusters_kubernetes_namespaces ADD CONSTRAINT clusters_kubernetes_namespaces_one_target CHECK ((organization_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (sharding_project_id IS NOT NULL)::int + (cluster_project_id IS NOT NULL)::int + (environment_id IS NOT NULL)::int + (project_id IS NOT NULL)::int = 1);
F241commit_user_mentions namespace_idfk-nullable

Nullable foreign key

commit_user_mentions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F242compliance_framework_security_policies security_policy_idfk-nullable

Nullable foreign key

compliance_framework_security_policies.security_policy_id may be NULL, so the relationship to security_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F243compliance_framework_security_policies namespace_idfk-nullable

Nullable foreign key

compliance_framework_security_policies.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F244compliance_framework_security_policies project_idfk-nullable

Nullable foreign key

compliance_framework_security_policies.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F979compliance_framework_security_policies security_policy_id, namespace_id, project_idexclusive-arc

Either/or foreign keys without a CHECK

compliance_framework_security_policies has several nullable FKs (security_policy_id, namespace_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE compliance_framework_security_policies ADD CONSTRAINT compliance_framework_security_policies_one_target CHECK ((security_policy_id IS NOT NULL)::int + (namespace_id IS NOT NULL)::int + (project_id IS NOT NULL)::int = 1);
F1165container_repositories created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE container_repositories ALTER COLUMN created_at TYPE timestamptz;
F1166container_repositories updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE container_repositories ALTER COLUMN updated_at TYPE timestamptz;
F245container_repository_states project_idfk-nullable

Nullable foreign key

container_repository_states.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1788content_blocked_statesorphan-table

Isolated table

content_blocked_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1167conversational_development_index_metrics created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE conversational_development_index_metrics ALTER COLUMN created_at TYPE timestamptz;
F1168conversational_development_index_metrics updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE conversational_development_index_metrics ALTER COLUMN updated_at TYPE timestamptz;

Isolated table

conversational_development_index_metrics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Wide table (34 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F1790country_access_logsorphan-table

Isolated table

country_access_logs references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F246coverage_fuzzing_corpuses user_idfk-nullable

Nullable foreign key

coverage_fuzzing_corpuses.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F247custom_dashboard_versions updated_by_idfk-nullable

Nullable foreign key

custom_dashboard_versions.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F248custom_dashboards created_by_idfk-nullable

Nullable foreign key

custom_dashboards.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F249custom_dashboards namespace_idfk-nullable

Nullable foreign key

custom_dashboards.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F250custom_dashboards updated_by_idfk-nullable

Nullable foreign key

custom_dashboards.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F980custom_dashboards created_by_id, namespace_id, updated_by_idexclusive-arc

Either/or foreign keys without a CHECK

custom_dashboards has several nullable FKs (created_by_id, namespace_id, updated_by_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE custom_dashboards ADD CONSTRAINT custom_dashboards_one_target CHECK ((created_by_id IS NOT NULL)::int + (namespace_id IS NOT NULL)::int + (updated_by_id IS NOT NULL)::int = 1);
F251custom_fields created_by_idfk-nullable

Nullable foreign key

custom_fields.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F252custom_fields updated_by_idfk-nullable

Nullable foreign key

custom_fields.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F981custom_fields created_by_id, updated_by_idexclusive-arc

Either/or foreign keys without a CHECK

custom_fields has several nullable FKs (created_by_id, updated_by_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE custom_fields ADD CONSTRAINT custom_fields_one_target CHECK ((created_by_id IS NOT NULL)::int + (updated_by_id IS NOT NULL)::int = 1);
F253customer_relations_contacts organization_idfk-nullable

Nullable foreign key

customer_relations_contacts.organization_id may be NULL, so the relationship to customer_relations_organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F254dast_sites dast_site_validation_idfk-nullable

Nullable foreign key

dast_sites.dast_site_validation_id may be NULL, so the relationship to dast_site_validations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F255dependency_firewall_activity_stats dependency_firewall_policy_rule_idfk-nullable

Nullable foreign key

dependency_firewall_activity_stats.dependency_firewall_policy_rule_id may be NULL, so the relationship to dependency_firewall_policy_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1169dependency_list_export_part_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE dependency_list_export_part_uploads ALTER COLUMN created_at TYPE timestamptz;
F256dependency_list_export_upload_states project_idfk-nullable

Nullable foreign key

dependency_list_export_upload_states.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F257dependency_list_export_upload_states organization_idfk-nullable

Nullable foreign key

dependency_list_export_upload_states.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F258dependency_list_export_upload_states namespace_idfk-nullable

Nullable foreign key

dependency_list_export_upload_states.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1170dependency_list_export_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE dependency_list_export_uploads ALTER COLUMN created_at TYPE timestamptz;

Isolated table

dependency_proxy_blob_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F259dependency_proxy_manifest_states group_idfk-nullable

Nullable foreign key

dependency_proxy_manifest_states.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1171deploy_keys_projects created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE deploy_keys_projects ALTER COLUMN created_at TYPE timestamptz;
F1172deploy_keys_projects updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE deploy_keys_projects ALTER COLUMN updated_at TYPE timestamptz;
F260deploy_tokens project_idfk-nullable

Nullable foreign key

deploy_tokens.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F261deploy_tokens creator_idfk-nullable

Nullable foreign key

deploy_tokens.creator_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F262deploy_tokens group_idfk-nullable

Nullable foreign key

deploy_tokens.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F982deploy_tokens project_id, creator_id, group_idexclusive-arc

Either/or foreign keys without a CHECK

deploy_tokens has several nullable FKs (project_id, creator_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE deploy_tokens ADD CONSTRAINT deploy_tokens_one_target CHECK ((project_id IS NOT NULL)::int + (creator_id IS NOT NULL)::int + (group_id IS NOT NULL)::int = 1);
F263deployment_approvals approval_rule_idfk-nullable

Nullable foreign key

deployment_approvals.approval_rule_id may be NULL, so the relationship to protected_environment_approval_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F264deployment_approvals project_idfk-nullable

Nullable foreign key

deployment_approvals.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F983deployment_approvals approval_rule_id, project_idexclusive-arc

Either/or foreign keys without a CHECK

deployment_approvals has several nullable FKs (approval_rule_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE deployment_approvals ADD CONSTRAINT deployment_approvals_one_target CHECK ((approval_rule_id IS NOT NULL)::int + (project_id IS NOT NULL)::int = 1);
F265deployment_clusters project_idfk-nullable

Nullable foreign key

deployment_clusters.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F266deployment_merge_requests project_idfk-nullable

Nullable foreign key

deployment_merge_requests.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F267deployment_merge_requests environment_idfk-nullable

Nullable foreign key

deployment_merge_requests.environment_id may be NULL, so the relationship to environments is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F984deployment_merge_requests project_id, environment_idexclusive-arc

Either/or foreign keys without a CHECK

deployment_merge_requests has several nullable FKs (project_id, environment_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE deployment_merge_requests ADD CONSTRAINT deployment_merge_requests_one_target CHECK ((project_id IS NOT NULL)::int + (environment_id IS NOT NULL)::int = 1);
F1173deployments created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE deployments ALTER COLUMN created_at TYPE timestamptz;
F1174deployments updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE deployments ALTER COLUMN updated_at TYPE timestamptz;
F268description_versions merge_request_idfk-nullable

Nullable foreign key

description_versions.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F269description_versions issue_idfk-nullable

Nullable foreign key

description_versions.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F270description_versions epic_idfk-nullable

Nullable foreign key

description_versions.epic_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1175design_management_action_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE design_management_action_uploads ALTER COLUMN created_at TYPE timestamptz;
F271design_management_designs namespace_idfk-nullable

Nullable foreign key

design_management_designs.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F272design_management_designs issue_idfk-nullable

Nullable foreign key

design_management_designs.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F985design_management_designs namespace_id, issue_idexclusive-arc

Either/or foreign keys without a CHECK

design_management_designs has several nullable FKs (namespace_id, issue_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE design_management_designs ADD CONSTRAINT design_management_designs_one_target CHECK ((namespace_id IS NOT NULL)::int + (issue_id IS NOT NULL)::int = 1);
F273design_management_designs_versions namespace_idfk-nullable

Nullable foreign key

design_management_designs_versions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F274design_management_repositories namespace_idfk-nullable

Nullable foreign key

design_management_repositories.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F275design_management_repository_states namespace_idfk-nullable

Nullable foreign key

design_management_repository_states.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F276design_management_versions namespace_idfk-nullable

Nullable foreign key

design_management_versions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F277design_management_versions author_idfk-nullable

Nullable foreign key

design_management_versions.author_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F278design_management_versions issue_idfk-nullable

Nullable foreign key

design_management_versions.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F986design_management_versions namespace_id, author_id, issue_idexclusive-arc

Either/or foreign keys without a CHECK

design_management_versions has several nullable FKs (namespace_id, author_id, issue_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE design_management_versions ADD CONSTRAINT design_management_versions_one_target CHECK ((namespace_id IS NOT NULL)::int + (author_id IS NOT NULL)::int + (issue_id IS NOT NULL)::int = 1);
F279design_user_mentions namespace_idfk-nullable

Nullable foreign key

design_user_mentions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1792detached_partitionsorphan-table

Isolated table

detached_partitions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F280diff_note_positions namespace_idfk-nullable

Nullable foreign key

diff_note_positions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F281dora_daily_metrics project_idfk-nullable

Nullable foreign key

dora_daily_metrics.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F282draft_notes project_idfk-nullable

Nullable foreign key

draft_notes.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F283duo_workflow_session_artifacts project_idfk-nullable

Nullable foreign key

duo_workflow_session_artifacts.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F284duo_workflow_session_artifacts namespace_idfk-nullable

Nullable foreign key

duo_workflow_session_artifacts.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F987duo_workflow_session_artifacts project_id, namespace_idexclusive-arc

Either/or foreign keys without a CHECK

duo_workflow_session_artifacts has several nullable FKs (project_id, namespace_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE duo_workflow_session_artifacts ADD CONSTRAINT duo_workflow_session_artifacts_one_target CHECK ((project_id IS NOT NULL)::int + (namespace_id IS NOT NULL)::int = 1);
F285duo_workflows_checkpoint_writes namespace_idfk-nullable

Nullable foreign key

duo_workflows_checkpoint_writes.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F286duo_workflows_checkpoint_writes project_idfk-nullable

Nullable foreign key

duo_workflows_checkpoint_writes.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F287duo_workflows_events namespace_idfk-nullable

Nullable foreign key

duo_workflows_events.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F288duo_workflows_events project_idfk-nullable

Nullable foreign key

duo_workflows_events.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F289duo_workflows_workflow_merge_requests project_idfk-nullable

Nullable foreign key

duo_workflows_workflow_merge_requests.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F290duo_workflows_workflow_merge_requests namespace_idfk-nullable

Nullable foreign key

duo_workflows_workflow_merge_requests.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F291duo_workflows_workflow_notes namespace_idfk-nullable

Nullable foreign key

duo_workflows_workflow_notes.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F292duo_workflows_workflow_notes project_idfk-nullable

Nullable foreign key

duo_workflows_workflow_notes.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F293duo_workflows_workflow_pipelines namespace_idfk-nullable

Nullable foreign key

duo_workflows_workflow_pipelines.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F294duo_workflows_workflow_pipelines project_idfk-nullable

Nullable foreign key

duo_workflows_workflow_pipelines.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F295duo_workflows_workflow_work_items project_idfk-nullable

Nullable foreign key

duo_workflows_workflow_work_items.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F296duo_workflows_workflow_work_items namespace_idfk-nullable

Nullable foreign key

duo_workflows_workflow_work_items.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Wide table (34 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F297duo_workflows_workflows project_idfk-nullable

Nullable foreign key

duo_workflows_workflows.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F298duo_workflows_workflows ai_catalog_item_version_idfk-nullable

Nullable foreign key

duo_workflows_workflows.ai_catalog_item_version_id may be NULL, so the relationship to ai_catalog_item_versions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F299duo_workflows_workflows namespace_idfk-nullable

Nullable foreign key

duo_workflows_workflows.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F300duo_workflows_workflows issue_idfk-nullable

Nullable foreign key

duo_workflows_workflows.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F301duo_workflows_workflows ai_catalog_item_idfk-nullable

Nullable foreign key

duo_workflows_workflows.ai_catalog_item_id may be NULL, so the relationship to ai_catalog_items is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F302duo_workflows_workflows service_account_idfk-nullable

Nullable foreign key

duo_workflows_workflows.service_account_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F303duo_workflows_workflows agent_identity_idfk-nullable

Nullable foreign key

duo_workflows_workflows.agent_identity_id may be NULL, so the relationship to ai_agent_identities is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F304duo_workflows_workflows merge_request_idfk-nullable

Nullable foreign key

duo_workflows_workflows.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F988duo_workflows_workflows project_id, ai_catalog_item_version_id, namespace_id, issue_id, ai_catalog_item_id, service_account_id, agent_identity_id, merge_request_idexclusive-arc

Either/or foreign keys without a CHECK

duo_workflows_workflows has several nullable FKs (project_id, ai_catalog_item_version_id, namespace_id, issue_id, ai_catalog_item_id, service_account_id, agent_identity_id, merge_request_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE duo_workflows_workflows ADD CONSTRAINT duo_workflows_workflows_one_target CHECK ((project_id IS NOT NULL)::int + (ai_catalog_item_version_id IS NOT NULL)::int + (namespace_id IS NOT NULL)::int + (issue_id IS NOT NULL)::int + (ai_catalog_item_id IS NOT NULL)::int + (service_account_id IS NOT NULL)::int + (agent_identity_id IS NOT NULL)::int + (merge_request_id IS NOT NULL)::int = 1);
F1793elastic_index_settingsorphan-table

Isolated table

elastic_index_settings references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1176emails created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE emails ALTER COLUMN created_at TYPE timestamptz;
F1177emails updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE emails ALTER COLUMN updated_at TYPE timestamptz;
F1178emails confirmed_attimestamp-tz

TIMESTAMP without time zone

confirmed_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE emails ALTER COLUMN confirmed_at TYPE timestamptz;
F1179emails confirmation_sent_attimestamp-tz

TIMESTAMP without time zone

confirmation_sent_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE emails ALTER COLUMN confirmation_sent_at TYPE timestamptz;
F305enabled_foundational_flows project_idfk-nullable

Nullable foreign key

enabled_foundational_flows.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F306enabled_foundational_flows namespace_idfk-nullable

Nullable foreign key

enabled_foundational_flows.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1180environments created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE environments ALTER COLUMN created_at TYPE timestamptz;
F1181environments updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE environments ALTER COLUMN updated_at TYPE timestamptz;
F307environments merge_request_idfk-nullable

Nullable foreign key

environments.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F308environments cluster_agent_idfk-nullable

Nullable foreign key

environments.cluster_agent_id may be NULL, so the relationship to cluster_agents is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F989environments merge_request_id, cluster_agent_idexclusive-arc

Either/or foreign keys without a CHECK

environments has several nullable FKs (merge_request_id, cluster_agent_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE environments ADD CONSTRAINT environments_one_target CHECK ((merge_request_id IS NOT NULL)::int + (cluster_agent_id IS NOT NULL)::int = 1);
F309epic_issues work_item_parent_link_idfk-nullable

Nullable foreign key

epic_issues.work_item_parent_link_id may be NULL, so the relationship to work_item_parent_links is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F310epic_issues namespace_idfk-nullable

Nullable foreign key

epic_issues.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F990epic_issues work_item_parent_link_id, namespace_idexclusive-arc

Either/or foreign keys without a CHECK

epic_issues has several nullable FKs (work_item_parent_link_id, namespace_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE epic_issues ADD CONSTRAINT epic_issues_one_target CHECK ((work_item_parent_link_id IS NOT NULL)::int + (namespace_id IS NOT NULL)::int = 1);
F311epic_user_mentions group_idfk-nullable

Nullable foreign key

epic_user_mentions.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F312epic_user_mentions note_idfk-nullable

Nullable foreign key

epic_user_mentions.note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F991epic_user_mentions group_id, note_idexclusive-arc

Either/or foreign keys without a CHECK

epic_user_mentions has several nullable FKs (group_id, note_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE epic_user_mentions ADD CONSTRAINT epic_user_mentions_one_target CHECK ((group_id IS NOT NULL)::int + (note_id IS NOT NULL)::int = 1);
F1182epics last_edited_attimestamp-tz

TIMESTAMP without time zone

last_edited_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE epics ALTER COLUMN last_edited_at TYPE timestamptz;
F1183epics created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE epics ALTER COLUMN created_at TYPE timestamptz;
F1184epics updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE epics ALTER COLUMN updated_at TYPE timestamptz;
F1185epics closed_attimestamp-tz

TIMESTAMP without time zone

closed_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE epics ALTER COLUMN closed_at TYPE timestamptz;
F1856epicswide-table

Wide table (42 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F313epics due_date_sourcing_epic_idfk-nullable

Nullable foreign key

epics.due_date_sourcing_epic_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F314epics start_date_sourcing_milestone_idfk-nullable

Nullable foreign key

epics.start_date_sourcing_milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F315epics due_date_sourcing_milestone_idfk-nullable

Nullable foreign key

epics.due_date_sourcing_milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F316epics work_item_parent_link_idfk-nullable

Nullable foreign key

epics.work_item_parent_link_id may be NULL, so the relationship to work_item_parent_links is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F317epics start_date_sourcing_epic_idfk-nullable

Nullable foreign key

epics.start_date_sourcing_epic_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F318epics closed_by_idfk-nullable

Nullable foreign key

epics.closed_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F319epics assignee_idfk-nullable

Nullable foreign key

epics.assignee_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F320epics issue_idfk-nullable

Nullable foreign key

epics.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F321epics parent_idfk-nullable

Nullable foreign key

epics.parent_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F992epics due_date_sourcing_epic_id, start_date_sourcing_milestone_id, due_date_sourcing_milestone_id, work_item_parent_link_id, start_date_sourcing_epic_id, closed_by_id, assignee_id, issue_id, parent_idexclusive-arc

Either/or foreign keys without a CHECK

epics has several nullable FKs (due_date_sourcing_epic_id, start_date_sourcing_milestone_id, due_date_sourcing_milestone_id, work_item_parent_link_id, start_date_sourcing_epic_id, closed_by_id, assignee_id, issue_id, parent_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE epics ADD CONSTRAINT epics_one_target CHECK ((due_date_sourcing_epic_id IS NOT NULL)::int + (start_date_sourcing_milestone_id IS NOT NULL)::int + (due_date_sourcing_milestone_id IS NOT NULL)::int + (work_item_parent_link_id IS NOT NULL)::int + (start_date_sourcing_epic_id IS NOT NULL)::int + (closed_by_id IS NOT NULL)::int + (assignee_id IS NOT NULL)::int + (issue_id IS NOT NULL)::int + (parent_id IS NOT NULL)::int = 1);
F322error_tracking_error_events project_idfk-nullable

Nullable foreign key

error_tracking_error_events.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F323events personal_namespace_idfk-nullable

Nullable foreign key

events.personal_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F324events project_idfk-nullable

Nullable foreign key

events.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F325events group_idfk-nullable

Nullable foreign key

events.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F326evidences project_idfk-nullable

Nullable foreign key

evidences.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

external_status_checks_protected_branches.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1186feature_gates created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE feature_gates ALTER COLUMN created_at TYPE timestamptz;
F1187feature_gates updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE feature_gates ALTER COLUMN updated_at TYPE timestamptz;
F1794feature_gatesorphan-table

Isolated table

feature_gates references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1188features created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE features ALTER COLUMN created_at TYPE timestamptz;
F1189features updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE features ALTER COLUMN updated_at TYPE timestamptz;
F1795featuresorphan-table

Isolated table

features references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F328fork_network_members forked_from_project_idfk-nullable

Nullable foreign key

fork_network_members.forked_from_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F329fork_networks root_project_idfk-nullable

Nullable foreign key

fork_networks.root_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

geo_ci_job_artifact_verification_summaries references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1190geo_event_log created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE geo_event_log ALTER COLUMN created_at TYPE timestamptz;
F330geo_event_log cache_invalidation_event_idfk-nullable

Nullable foreign key

geo_event_log.cache_invalidation_event_id may be NULL, so the relationship to geo_cache_invalidation_events is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F331geo_event_log geo_event_idfk-nullable

Nullable foreign key

geo_event_log.geo_event_id may be NULL, so the relationship to geo_events is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F993geo_event_log cache_invalidation_event_id, geo_event_idexclusive-arc

Either/or foreign keys without a CHECK

geo_event_log has several nullable FKs (cache_invalidation_event_id, geo_event_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE geo_event_log ADD CONSTRAINT geo_event_log_one_target CHECK ((cache_invalidation_event_id IS NOT NULL)::int + (geo_event_id IS NOT NULL)::int = 1);
F1191geo_node_namespace_links created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE geo_node_namespace_links ALTER COLUMN created_at TYPE timestamptz;
F1192geo_node_namespace_links updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE geo_node_namespace_links ALTER COLUMN updated_at TYPE timestamptz;
F1193geo_node_statuses last_event_datetimestamp-tz

TIMESTAMP without time zone

last_event_date stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE geo_node_statuses ALTER COLUMN last_event_date TYPE timestamptz;
F1194geo_node_statuses cursor_last_event_datetimestamp-tz

TIMESTAMP without time zone

cursor_last_event_date stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE geo_node_statuses ALTER COLUMN cursor_last_event_date TYPE timestamptz;
F1195geo_node_statuses created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE geo_node_statuses ALTER COLUMN created_at TYPE timestamptz;
F1196geo_node_statuses updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE geo_node_statuses ALTER COLUMN updated_at TYPE timestamptz;
F1197geo_node_statuses last_successful_status_check_attimestamp-tz

TIMESTAMP without time zone

last_successful_status_check_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE geo_node_statuses ALTER COLUMN last_successful_status_check_at TYPE timestamptz;

Isolated table

gitlab_subscription_histories references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F332gitlab_subscriptions hosted_plan_idfk-nullable

Nullable foreign key

gitlab_subscriptions.hosted_plan_id may be NULL, so the relationship to plans is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F333gitlab_subscriptions namespace_idfk-nullable

Nullable foreign key

gitlab_subscriptions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F994gitlab_subscriptions hosted_plan_id, namespace_idexclusive-arc

Either/or foreign keys without a CHECK

gitlab_subscriptions has several nullable FKs (hosted_plan_id, namespace_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE gitlab_subscriptions ADD CONSTRAINT gitlab_subscriptions_one_target CHECK ((hosted_plan_id IS NOT NULL)::int + (namespace_id IS NOT NULL)::int = 1);
F334gpg_key_subkeys user_idfk-nullable

Nullable foreign key

gpg_key_subkeys.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F335gpg_keys user_idfk-nullable

Nullable foreign key

gpg_keys.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F336gpg_signatures project_idfk-nullable

Nullable foreign key

gpg_signatures.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F337gpg_signatures gpg_key_subkey_idfk-nullable

Nullable foreign key

gpg_signatures.gpg_key_subkey_id may be NULL, so the relationship to gpg_key_subkeys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F338gpg_signatures gpg_key_idfk-nullable

Nullable foreign key

gpg_signatures.gpg_key_id may be NULL, so the relationship to gpg_keys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F995gpg_signatures project_id, gpg_key_subkey_id, gpg_key_idexclusive-arc

Either/or foreign keys without a CHECK

gpg_signatures has several nullable FKs (project_id, gpg_key_subkey_id, gpg_key_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE gpg_signatures ADD CONSTRAINT gpg_signatures_one_target CHECK ((project_id IS NOT NULL)::int + (gpg_key_subkey_id IS NOT NULL)::int + (gpg_key_id IS NOT NULL)::int = 1);
F339granular_scopes namespace_idfk-nullable

Nullable foreign key

granular_scopes.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1379group_audit_eventsorphan-table

Isolated table

group_audit_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F340group_crm_settings source_group_idfk-nullable

Nullable foreign key

group_crm_settings.source_group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F341group_group_links member_role_idfk-nullable

Nullable foreign key

group_group_links.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F342group_import_states user_idfk-nullable

Nullable foreign key

group_import_states.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

group_secrets_manager_maintenance_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F343group_secrets_managers group_idfk-nullable

Nullable foreign key

group_secrets_managers.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1799group_security_exclusionsorphan-table

Isolated table

group_security_exclusions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F344group_wiki_repository_states group_idfk-nullable

Nullable foreign key

group_wiki_repository_states.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1380groups_visitsorphan-table

Isolated table

groups_visits references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1200historical_data created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE historical_data ALTER COLUMN created_at TYPE timestamptz;
F1201historical_data updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE historical_data ALTER COLUMN updated_at TYPE timestamptz;
F1800historical_dataorphan-table

Isolated table

historical_data references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1202identities created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE identities ALTER COLUMN created_at TYPE timestamptz;
F1203identities updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE identities ALTER COLUMN updated_at TYPE timestamptz;
F346identities user_idfk-nullable

Nullable foreign key

identities.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F347identities saml_provider_idfk-nullable

Nullable foreign key

identities.saml_provider_id may be NULL, so the relationship to saml_providers is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F996identities user_id, saml_provider_idexclusive-arc

Either/or foreign keys without a CHECK

identities has several nullable FKs (user_id, saml_provider_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE identities ADD CONSTRAINT identities_one_target CHECK ((user_id IS NOT NULL)::int + (saml_provider_id IS NOT NULL)::int = 1);
F348import_export_upload_upload_states project_idfk-nullable

Nullable foreign key

import_export_upload_upload_states.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F349import_export_upload_upload_states namespace_idfk-nullable

Nullable foreign key

import_export_upload_upload_states.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1204import_export_upload_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE import_export_upload_uploads ALTER COLUMN created_at TYPE timestamptz;
F350import_export_uploads user_idfk-nullable

Nullable foreign key

import_export_uploads.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F351import_export_uploads group_idfk-nullable

Nullable foreign key

import_export_uploads.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F352import_export_uploads project_idfk-nullable

Nullable foreign key

import_export_uploads.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F997import_export_uploads user_id, group_id, project_idexclusive-arc

Either/or foreign keys without a CHECK

import_export_uploads has several nullable FKs (user_id, group_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE import_export_uploads ADD CONSTRAINT import_export_uploads_one_target CHECK ((user_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (project_id IS NOT NULL)::int = 1);
F353import_failures group_idfk-nullable

Nullable foreign key

import_failures.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F354import_failures organization_idfk-nullable

Nullable foreign key

import_failures.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F355import_failures user_idfk-nullable

Nullable foreign key

import_failures.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F356import_failures project_idfk-nullable

Nullable foreign key

import_failures.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F998import_failures group_id, organization_id, user_id, project_idexclusive-arc

Either/or foreign keys without a CHECK

import_failures has several nullable FKs (group_id, organization_id, user_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE import_failures ADD CONSTRAINT import_failures_one_target CHECK ((group_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int + (user_id IS NOT NULL)::int + (project_id IS NOT NULL)::int = 1);
F357import_offline_configurations bulk_import_idfk-nullable

Nullable foreign key

import_offline_configurations.bulk_import_id may be NULL, so the relationship to bulk_imports is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F358import_offline_configurations offline_export_idfk-nullable

Nullable foreign key

import_offline_configurations.offline_export_id may be NULL, so the relationship to import_offline_exports is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F359import_placeholder_memberships group_idfk-nullable

Nullable foreign key

import_placeholder_memberships.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F360import_placeholder_memberships project_idfk-nullable

Nullable foreign key

import_placeholder_memberships.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F999import_placeholder_memberships group_id, project_idexclusive-arc

Either/or foreign keys without a CHECK

import_placeholder_memberships has several nullable FKs (group_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE import_placeholder_memberships ADD CONSTRAINT import_placeholder_memberships_one_target CHECK ((group_id IS NOT NULL)::int + (project_id IS NOT NULL)::int = 1);
F361import_placeholder_user_details namespace_idfk-nullable

Nullable foreign key

import_placeholder_user_details.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1000import_source_users reassigned_by_user_id, reassign_to_user_id, placeholder_user_idexclusive-arc

Either/or foreign keys without a CHECK

import_source_users has several nullable FKs (reassigned_by_user_id, reassign_to_user_id, placeholder_user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE import_source_users ADD CONSTRAINT import_source_users_one_target CHECK ((reassigned_by_user_id IS NOT NULL)::int + (reassign_to_user_id IS NOT NULL)::int + (placeholder_user_id IS NOT NULL)::int = 1);
F362import_source_users reassigned_by_user_idfk-nullable

Nullable foreign key

import_source_users.reassigned_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F363import_source_users reassign_to_user_idfk-nullable

Nullable foreign key

import_source_users.reassign_to_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F364import_source_users placeholder_user_idfk-nullable

Nullable foreign key

import_source_users.placeholder_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1001incident_management_escalation_rules user_id, project_id, oncall_schedule_idexclusive-arc

Either/or foreign keys without a CHECK

incident_management_escalation_rules has several nullable FKs (user_id, project_id, oncall_schedule_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE incident_management_escalation_rules ADD CONSTRAINT incident_management_escalation_rules_one_target CHECK ((user_id IS NOT NULL)::int + (project_id IS NOT NULL)::int + (oncall_schedule_id IS NOT NULL)::int = 1);

Nullable foreign key

incident_management_escalation_rules.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F366incident_management_escalation_rules project_idfk-nullable

Nullable foreign key

incident_management_escalation_rules.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F367incident_management_escalation_rules oncall_schedule_idfk-nullable

Nullable foreign key

incident_management_escalation_rules.oncall_schedule_id may be NULL, so the relationship to incident_management_oncall_schedules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1002incident_management_issuable_escalation_statuses namespace_id, policy_idexclusive-arc

Either/or foreign keys without a CHECK

incident_management_issuable_escalation_statuses has several nullable FKs (namespace_id, policy_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE incident_management_issuable_escalation_statuses ADD CONSTRAINT incident_management_issuable_escalation_statuses_one_target CHECK ((namespace_id IS NOT NULL)::int + (policy_id IS NOT NULL)::int = 1);

Nullable foreign key

incident_management_issuable_escalation_statuses.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

incident_management_issuable_escalation_statuses.policy_id may be NULL, so the relationship to incident_management_escalation_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F370incident_management_oncall_participants project_idfk-nullable

Nullable foreign key

incident_management_oncall_participants.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F371incident_management_oncall_rotations project_idfk-nullable

Nullable foreign key

incident_management_oncall_rotations.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F372incident_management_oncall_shifts project_idfk-nullable

Nullable foreign key

incident_management_oncall_shifts.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

incident_management_pending_alert_escalations.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

incident_management_pending_issue_escalations.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

incident_management_timeline_event_tag_links.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1003incident_management_timeline_events author_id, updated_by_user_id, promoted_from_note_idexclusive-arc

Either/or foreign keys without a CHECK

incident_management_timeline_events has several nullable FKs (author_id, updated_by_user_id, promoted_from_note_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE incident_management_timeline_events ADD CONSTRAINT incident_management_timeline_events_one_target CHECK ((author_id IS NOT NULL)::int + (updated_by_user_id IS NOT NULL)::int + (promoted_from_note_id IS NOT NULL)::int = 1);
F374incident_management_timeline_events author_idfk-nullable

Nullable foreign key

incident_management_timeline_events.author_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F375incident_management_timeline_events updated_by_user_idfk-nullable

Nullable foreign key

incident_management_timeline_events.updated_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F376incident_management_timeline_events promoted_from_note_idfk-nullable

Nullable foreign key

incident_management_timeline_events.promoted_from_note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1205index_statuses indexed_attimestamp-tz

TIMESTAMP without time zone

indexed_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE index_statuses ALTER COLUMN indexed_at TYPE timestamptz;
F1206index_statuses created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE index_statuses ALTER COLUMN created_at TYPE timestamptz;
F1207index_statuses updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE index_statuses ALTER COLUMN updated_at TYPE timestamptz;
F1381instance_audit_eventsorphan-table

Isolated table

instance_audit_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

instance_model_selection_feature_settings references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1004integrations project_id, organization_id, group_id, inherit_from_idexclusive-arc

Either/or foreign keys without a CHECK

integrations has several nullable FKs (project_id, organization_id, group_id, inherit_from_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE integrations ADD CONSTRAINT integrations_one_target CHECK ((project_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (inherit_from_id IS NOT NULL)::int = 1);
F1208integrations created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE integrations ALTER COLUMN created_at TYPE timestamptz;
F1209integrations updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE integrations ALTER COLUMN updated_at TYPE timestamptz;
F1857integrationswide-table

Wide table (35 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F377integrations project_idfk-nullable

Nullable foreign key

integrations.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F378integrations organization_idfk-nullable

Nullable foreign key

integrations.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F379integrations group_idfk-nullable

Nullable foreign key

integrations.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F380integrations inherit_from_idfk-nullable

Nullable foreign key

integrations.inherit_from_id may be NULL, so the relationship to integrations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F381internal_ids namespace_idfk-nullable

Nullable foreign key

internal_ids.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F382internal_ids project_idfk-nullable

Nullable foreign key

internal_ids.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1210issuable_metric_image_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE issuable_metric_image_uploads ALTER COLUMN created_at TYPE timestamptz;
F383issuable_metric_images namespace_idfk-nullable

Nullable foreign key

issuable_metric_images.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F384issuable_resource_links namespace_idfk-nullable

Nullable foreign key

issuable_resource_links.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F385issuable_severities namespace_idfk-nullable

Nullable foreign key

issuable_severities.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F386issuable_slas namespace_idfk-nullable

Nullable foreign key

issuable_slas.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F387issue_assignees namespace_idfk-nullable

Nullable foreign key

issue_assignees.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1005issue_assignment_events namespace_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

issue_assignment_events has several nullable FKs (namespace_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE issue_assignment_events ADD CONSTRAINT issue_assignment_events_one_target CHECK ((namespace_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F388issue_assignment_events namespace_idfk-nullable

Nullable foreign key

issue_assignment_events.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F389issue_assignment_events user_idfk-nullable

Nullable foreign key

issue_assignment_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F390issue_customer_relations_contacts namespace_idfk-nullable

Nullable foreign key

issue_customer_relations_contacts.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F391issue_email_participants namespace_idfk-nullable

Nullable foreign key

issue_email_participants.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F392issue_emails namespace_idfk-nullable

Nullable foreign key

issue_emails.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1211issue_links created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE issue_links ALTER COLUMN created_at TYPE timestamptz;
F1212issue_links updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE issue_links ALTER COLUMN updated_at TYPE timestamptz;
F393issue_links namespace_idfk-nullable

Nullable foreign key

issue_links.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1213issue_metrics first_mentioned_in_commit_attimestamp-tz

TIMESTAMP without time zone

first_mentioned_in_commit_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE issue_metrics ALTER COLUMN first_mentioned_in_commit_at TYPE timestamptz;
F1214issue_metrics first_associated_with_milestone_attimestamp-tz

TIMESTAMP without time zone

first_associated_with_milestone_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE issue_metrics ALTER COLUMN first_associated_with_milestone_at TYPE timestamptz;
F1215issue_metrics first_added_to_board_attimestamp-tz

TIMESTAMP without time zone

first_added_to_board_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE issue_metrics ALTER COLUMN first_added_to_board_at TYPE timestamptz;
F1216issue_metrics created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE issue_metrics ALTER COLUMN created_at TYPE timestamptz;
F1217issue_metrics updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE issue_metrics ALTER COLUMN updated_at TYPE timestamptz;
F394issue_metrics namespace_idfk-nullable

Nullable foreign key

issue_metrics.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F049issue_search_data namespace_idfk-nullable

Nullable foreign key

issue_search_data.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1473issue_search_data_00orphan-table

Isolated table

issue_search_data_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1474issue_search_data_01orphan-table

Isolated table

issue_search_data_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1475issue_search_data_02orphan-table

Isolated table

issue_search_data_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1476issue_search_data_03orphan-table

Isolated table

issue_search_data_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1477issue_search_data_04orphan-table

Isolated table

issue_search_data_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1478issue_search_data_05orphan-table

Isolated table

issue_search_data_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1479issue_search_data_06orphan-table

Isolated table

issue_search_data_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1480issue_search_data_07orphan-table

Isolated table

issue_search_data_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1481issue_search_data_08orphan-table

Isolated table

issue_search_data_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1482issue_search_data_09orphan-table

Isolated table

issue_search_data_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1483issue_search_data_10orphan-table

Isolated table

issue_search_data_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1484issue_search_data_11orphan-table

Isolated table

issue_search_data_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1485issue_search_data_12orphan-table

Isolated table

issue_search_data_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1486issue_search_data_13orphan-table

Isolated table

issue_search_data_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1487issue_search_data_14orphan-table

Isolated table

issue_search_data_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1488issue_search_data_15orphan-table

Isolated table

issue_search_data_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1489issue_search_data_16orphan-table

Isolated table

issue_search_data_16 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1490issue_search_data_17orphan-table

Isolated table

issue_search_data_17 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1491issue_search_data_18orphan-table

Isolated table

issue_search_data_18 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1492issue_search_data_19orphan-table

Isolated table

issue_search_data_19 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1493issue_search_data_20orphan-table

Isolated table

issue_search_data_20 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1494issue_search_data_21orphan-table

Isolated table

issue_search_data_21 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1495issue_search_data_22orphan-table

Isolated table

issue_search_data_22 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1496issue_search_data_23orphan-table

Isolated table

issue_search_data_23 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1497issue_search_data_24orphan-table

Isolated table

issue_search_data_24 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1498issue_search_data_25orphan-table

Isolated table

issue_search_data_25 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1499issue_search_data_26orphan-table

Isolated table

issue_search_data_26 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1500issue_search_data_27orphan-table

Isolated table

issue_search_data_27 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1501issue_search_data_28orphan-table

Isolated table

issue_search_data_28 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1502issue_search_data_29orphan-table

Isolated table

issue_search_data_29 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1503issue_search_data_30orphan-table

Isolated table

issue_search_data_30 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1504issue_search_data_31orphan-table

Isolated table

issue_search_data_31 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1505issue_search_data_32orphan-table

Isolated table

issue_search_data_32 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1506issue_search_data_33orphan-table

Isolated table

issue_search_data_33 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1507issue_search_data_34orphan-table

Isolated table

issue_search_data_34 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1508issue_search_data_35orphan-table

Isolated table

issue_search_data_35 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1509issue_search_data_36orphan-table

Isolated table

issue_search_data_36 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1510issue_search_data_37orphan-table

Isolated table

issue_search_data_37 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1511issue_search_data_38orphan-table

Isolated table

issue_search_data_38 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1512issue_search_data_39orphan-table

Isolated table

issue_search_data_39 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1513issue_search_data_40orphan-table

Isolated table

issue_search_data_40 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1514issue_search_data_41orphan-table

Isolated table

issue_search_data_41 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1515issue_search_data_42orphan-table

Isolated table

issue_search_data_42 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1516issue_search_data_43orphan-table

Isolated table

issue_search_data_43 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1517issue_search_data_44orphan-table

Isolated table

issue_search_data_44 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1518issue_search_data_45orphan-table

Isolated table

issue_search_data_45 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1519issue_search_data_46orphan-table

Isolated table

issue_search_data_46 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1520issue_search_data_47orphan-table

Isolated table

issue_search_data_47 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1521issue_search_data_48orphan-table

Isolated table

issue_search_data_48 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1522issue_search_data_49orphan-table

Isolated table

issue_search_data_49 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1523issue_search_data_50orphan-table

Isolated table

issue_search_data_50 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1524issue_search_data_51orphan-table

Isolated table

issue_search_data_51 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1525issue_search_data_52orphan-table

Isolated table

issue_search_data_52 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1526issue_search_data_53orphan-table

Isolated table

issue_search_data_53 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1527issue_search_data_54orphan-table

Isolated table

issue_search_data_54 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1528issue_search_data_55orphan-table

Isolated table

issue_search_data_55 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1529issue_search_data_56orphan-table

Isolated table

issue_search_data_56 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1530issue_search_data_57orphan-table

Isolated table

issue_search_data_57 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1531issue_search_data_58orphan-table

Isolated table

issue_search_data_58 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1532issue_search_data_59orphan-table

Isolated table

issue_search_data_59 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1533issue_search_data_60orphan-table

Isolated table

issue_search_data_60 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1534issue_search_data_61orphan-table

Isolated table

issue_search_data_61 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1535issue_search_data_62orphan-table

Isolated table

issue_search_data_62 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1536issue_search_data_63orphan-table

Isolated table

issue_search_data_63 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1006issue_tracker_data integration_id, group_id, organization_id, project_idexclusive-arc

Either/or foreign keys without a CHECK

issue_tracker_data has several nullable FKs (integration_id, group_id, organization_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE issue_tracker_data ADD CONSTRAINT issue_tracker_data_one_target CHECK ((integration_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int + (project_id IS NOT NULL)::int = 1);
F395issue_tracker_data integration_idfk-nullable

Nullable foreign key

issue_tracker_data.integration_id may be NULL, so the relationship to integrations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F396issue_tracker_data group_idfk-nullable

Nullable foreign key

issue_tracker_data.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F397issue_tracker_data organization_idfk-nullable

Nullable foreign key

issue_tracker_data.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F398issue_tracker_data project_idfk-nullable

Nullable foreign key

issue_tracker_data.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1007issue_user_mentions namespace_id, note_idexclusive-arc

Either/or foreign keys without a CHECK

issue_user_mentions has several nullable FKs (namespace_id, note_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE issue_user_mentions ADD CONSTRAINT issue_user_mentions_one_target CHECK ((namespace_id IS NOT NULL)::int + (note_id IS NOT NULL)::int = 1);
F399issue_user_mentions namespace_idfk-nullable

Nullable foreign key

issue_user_mentions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F400issue_user_mentions note_idfk-nullable

Nullable foreign key

issue_user_mentions.note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1008issues author_id, sprint_id, project_id, milestone_id, duplicated_to_id, moved_to_id, closed_by_id, namespace_id, promoted_to_epic_id, updated_by_idexclusive-arc

Either/or foreign keys without a CHECK

issues has several nullable FKs (author_id, sprint_id, project_id, milestone_id, duplicated_to_id, moved_to_id, closed_by_id, namespace_id, promoted_to_epic_id, updated_by_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE issues ADD CONSTRAINT issues_one_target CHECK ((author_id IS NOT NULL)::int + (sprint_id IS NOT NULL)::int + (project_id IS NOT NULL)::int + (milestone_id IS NOT NULL)::int + (duplicated_to_id IS NOT NULL)::int + (moved_to_id IS NOT NULL)::int + (closed_by_id IS NOT NULL)::int + (namespace_id IS NOT NULL)::int + (promoted_to_epic_id IS NOT NULL)::int + (updated_by_id IS NOT NULL)::int = 1);
F1218issues created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE issues ALTER COLUMN created_at TYPE timestamptz;
F1219issues updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE issues ALTER COLUMN updated_at TYPE timestamptz;
F1220issues last_edited_attimestamp-tz

TIMESTAMP without time zone

last_edited_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE issues ALTER COLUMN last_edited_at TYPE timestamptz;
F1858issueswide-table

Wide table (38 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F401issues author_idfk-nullable

Nullable foreign key

issues.author_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F402issues sprint_idfk-nullable

Nullable foreign key

issues.sprint_id may be NULL, so the relationship to sprints is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F403issues project_idfk-nullable

Nullable foreign key

issues.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F404issues milestone_idfk-nullable

Nullable foreign key

issues.milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F405issues duplicated_to_idfk-nullable

Nullable foreign key

issues.duplicated_to_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F406issues moved_to_idfk-nullable

Nullable foreign key

issues.moved_to_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F407issues closed_by_idfk-nullable

Nullable foreign key

issues.closed_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F408issues namespace_idfk-nullable

Nullable foreign key

issues.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F409issues promoted_to_epic_idfk-nullable

Nullable foreign key

issues.promoted_to_epic_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F410issues updated_by_idfk-nullable

Nullable foreign key

issues.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F411jira_connect_installations organization_idfk-nullable

Nullable foreign key

jira_connect_installations.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1009jira_imports label_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

jira_imports has several nullable FKs (label_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE jira_imports ADD CONSTRAINT jira_imports_one_target CHECK ((label_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F412jira_imports label_idfk-nullable

Nullable foreign key

jira_imports.label_id may be NULL, so the relationship to labels is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F413jira_imports user_idfk-nullable

Nullable foreign key

jira_imports.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1010jira_tracker_data organization_id, group_id, integration_id, project_idexclusive-arc

Either/or foreign keys without a CHECK

jira_tracker_data has several nullable FKs (organization_id, group_id, integration_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE jira_tracker_data ADD CONSTRAINT jira_tracker_data_one_target CHECK ((organization_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (integration_id IS NOT NULL)::int + (project_id IS NOT NULL)::int = 1);
F1859jira_tracker_datawide-table

Wide table (32 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F414jira_tracker_data organization_idfk-nullable

Nullable foreign key

jira_tracker_data.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F415jira_tracker_data group_idfk-nullable

Nullable foreign key

jira_tracker_data.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F416jira_tracker_data integration_idfk-nullable

Nullable foreign key

jira_tracker_data.integration_id may be NULL, so the relationship to integrations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F417jira_tracker_data project_idfk-nullable

Nullable foreign key

jira_tracker_data.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F418job_environments deployment_idfk-nullable

Nullable foreign key

job_environments.deployment_id may be NULL, so the relationship to deployments is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1221keys created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE keys ALTER COLUMN created_at TYPE timestamptz;
F1222keys updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE keys ALTER COLUMN updated_at TYPE timestamptz;
F1223keys last_used_attimestamp-tz

TIMESTAMP without time zone

last_used_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE keys ALTER COLUMN last_used_at TYPE timestamptz;
F419keys organization_idfk-nullable

Nullable foreign key

keys.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1011label_links namespace_id, label_idexclusive-arc

Either/or foreign keys without a CHECK

label_links has several nullable FKs (namespace_id, label_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE label_links ADD CONSTRAINT label_links_one_target CHECK ((namespace_id IS NOT NULL)::int + (label_id IS NOT NULL)::int = 1);
F1224label_links created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE label_links ALTER COLUMN created_at TYPE timestamptz;
F1225label_links updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE label_links ALTER COLUMN updated_at TYPE timestamptz;
F420label_links namespace_idfk-nullable

Nullable foreign key

label_links.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F421label_links label_idfk-nullable

Nullable foreign key

label_links.label_id may be NULL, so the relationship to labels is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1226label_priorities created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE label_priorities ALTER COLUMN created_at TYPE timestamptz;
F1227label_priorities updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE label_priorities ALTER COLUMN updated_at TYPE timestamptz;
F1228labels created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE labels ALTER COLUMN created_at TYPE timestamptz;
F1229labels updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE labels ALTER COLUMN updated_at TYPE timestamptz;
F422labels project_idfk-nullable

Nullable foreign key

labels.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F423labels organization_idfk-nullable

Nullable foreign key

labels.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F424labels group_idfk-nullable

Nullable foreign key

labels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F425ldap_admin_role_links organization_idfk-nullable

Nullable foreign key

ldap_admin_role_links.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1230ldap_group_links created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE ldap_group_links ALTER COLUMN created_at TYPE timestamptz;
F1231ldap_group_links updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE ldap_group_links ALTER COLUMN updated_at TYPE timestamptz;
F426ldap_group_links member_role_idfk-nullable

Nullable foreign key

ldap_group_links.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1232lfs_file_locks created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE lfs_file_locks ALTER COLUMN created_at TYPE timestamptz;
F1802lfs_object_statesorphan-table

Isolated table

lfs_object_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1233lfs_objects created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE lfs_objects ALTER COLUMN created_at TYPE timestamptz;
F1234lfs_objects updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE lfs_objects ALTER COLUMN updated_at TYPE timestamptz;
F1803lfs_objectsorphan-table

Isolated table

lfs_objects references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1235lfs_objects_projects created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE lfs_objects_projects ALTER COLUMN created_at TYPE timestamptz;
F1236lfs_objects_projects updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE lfs_objects_projects ALTER COLUMN updated_at TYPE timestamptz;
F1237licenses created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE licenses ALTER COLUMN created_at TYPE timestamptz;
F1238licenses updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE licenses ALTER COLUMN updated_at TYPE timestamptz;
F1804licensesorphan-table

Isolated table

licenses references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1012lists custom_status_id, iteration_id, project_id, label_id, user_id, group_id, milestone_idexclusive-arc

Either/or foreign keys without a CHECK

lists has several nullable FKs (custom_status_id, iteration_id, project_id, label_id, user_id, group_id, milestone_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE lists ADD CONSTRAINT lists_one_target CHECK ((custom_status_id IS NOT NULL)::int + (iteration_id IS NOT NULL)::int + (project_id IS NOT NULL)::int + (label_id IS NOT NULL)::int + (user_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (milestone_id IS NOT NULL)::int = 1);
F1239lists created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE lists ALTER COLUMN created_at TYPE timestamptz;
F1240lists updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE lists ALTER COLUMN updated_at TYPE timestamptz;
F427lists custom_status_idfk-nullable

Nullable foreign key

lists.custom_status_id may be NULL, so the relationship to work_item_custom_statuses is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F428lists iteration_idfk-nullable

Nullable foreign key

lists.iteration_id may be NULL, so the relationship to sprints is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F429lists project_idfk-nullable

Nullable foreign key

lists.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F430lists label_idfk-nullable

Nullable foreign key

lists.label_id may be NULL, so the relationship to labels is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F431lists user_idfk-nullable

Nullable foreign key

lists.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F432lists group_idfk-nullable

Nullable foreign key

lists.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F433lists milestone_idfk-nullable

Nullable foreign key

lists.milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

loose_foreign_keys_deleted_records references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

loose_foreign_keys_namespace_deleted_records references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

loose_foreign_keys_organization_deleted_records references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

loose_foreign_keys_project_deleted_records references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

loose_foreign_keys_user_deleted_records references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1013member_approvals member_role_id, member_idexclusive-arc

Either/or foreign keys without a CHECK

member_approvals has several nullable FKs (member_role_id, member_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE member_approvals ADD CONSTRAINT member_approvals_one_target CHECK ((member_role_id IS NOT NULL)::int + (member_id IS NOT NULL)::int = 1);
F434member_approvals member_role_idfk-nullable

Nullable foreign key

member_approvals.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F435member_approvals member_idfk-nullable

Nullable foreign key

member_approvals.member_id may be NULL, so the relationship to members is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F436member_roles organization_idfk-nullable

Nullable foreign key

member_roles.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F437member_roles namespace_idfk-nullable

Nullable foreign key

member_roles.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1014members member_namespace_id, member_role_idexclusive-arc

Either/or foreign keys without a CHECK

members has several nullable FKs (member_namespace_id, member_role_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE members ADD CONSTRAINT members_one_target CHECK ((member_namespace_id IS NOT NULL)::int + (member_role_id IS NOT NULL)::int = 1);
F1241members created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE members ALTER COLUMN created_at TYPE timestamptz;
F1242members updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE members ALTER COLUMN updated_at TYPE timestamptz;
F1243members invite_accepted_attimestamp-tz

TIMESTAMP without time zone

invite_accepted_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE members ALTER COLUMN invite_accepted_at TYPE timestamptz;
F1244members requested_attimestamp-tz

TIMESTAMP without time zone

requested_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE members ALTER COLUMN requested_at TYPE timestamptz;
F438members member_namespace_idfk-nullable

Nullable foreign key

members.member_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F439members member_role_idfk-nullable

Nullable foreign key

members.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F440merge_request_assignees project_idfk-nullable

Nullable foreign key

merge_request_assignees.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1015merge_request_assignment_events project_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

merge_request_assignment_events has several nullable FKs (project_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE merge_request_assignment_events ADD CONSTRAINT merge_request_assignment_events_one_target CHECK ((project_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F441merge_request_assignment_events project_idfk-nullable

Nullable foreign key

merge_request_assignment_events.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F442merge_request_assignment_events user_idfk-nullable

Nullable foreign key

merge_request_assignment_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F443merge_request_blocks project_idfk-nullable

Nullable foreign key

merge_request_blocks.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F444merge_request_cleanup_schedules project_idfk-nullable

Nullable foreign key

merge_request_cleanup_schedules.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1116merge_request_commits_metadata authored_datetimestamp-tz

TIMESTAMP without time zone

authored_date stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_request_commits_metadata ALTER COLUMN authored_date TYPE timestamptz;
F1117merge_request_commits_metadata committed_datetimestamp-tz

TIMESTAMP without time zone

committed_date stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_request_commits_metadata ALTER COLUMN committed_date TYPE timestamptz;

Isolated table

merge_request_commits_metadata references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F445merge_request_context_commit_diff_files project_idfk-nullable

Nullable foreign key

merge_request_context_commit_diff_files.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1016merge_request_context_commits project_id, merge_request_idexclusive-arc

Either/or foreign keys without a CHECK

merge_request_context_commits has several nullable FKs (project_id, merge_request_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE merge_request_context_commits ADD CONSTRAINT merge_request_context_commits_one_target CHECK ((project_id IS NOT NULL)::int + (merge_request_id IS NOT NULL)::int = 1);
F446merge_request_context_commits project_idfk-nullable

Nullable foreign key

merge_request_context_commits.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F447merge_request_context_commits merge_request_idfk-nullable

Nullable foreign key

merge_request_context_commits.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1245merge_request_diff_commits authored_datetimestamp-tz

TIMESTAMP without time zone

authored_date stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_request_diff_commits ALTER COLUMN authored_date TYPE timestamptz;
F1246merge_request_diff_commits committed_datetimestamp-tz

TIMESTAMP without time zone

committed_date stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_request_diff_commits ALTER COLUMN committed_date TYPE timestamptz;

Isolated table

merge_request_diff_commits references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

merge_request_diff_commits_b5377a7a34 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F448merge_request_diff_details project_idfk-nullable

Nullable foreign key

merge_request_diff_details.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F449merge_request_diff_files project_idfk-nullable

Nullable foreign key

merge_request_diff_files.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

merge_request_diff_files_99208b8fac references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1247merge_request_diffs created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_request_diffs ALTER COLUMN created_at TYPE timestamptz;
F1248merge_request_diffs updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_request_diffs ALTER COLUMN updated_at TYPE timestamptz;
F450merge_request_diffs project_idfk-nullable

Nullable foreign key

merge_request_diffs.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1017merge_request_metrics target_project_id, merged_by_id, latest_closed_by_idexclusive-arc

Either/or foreign keys without a CHECK

merge_request_metrics has several nullable FKs (target_project_id, merged_by_id, latest_closed_by_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE merge_request_metrics ADD CONSTRAINT merge_request_metrics_one_target CHECK ((target_project_id IS NOT NULL)::int + (merged_by_id IS NOT NULL)::int + (latest_closed_by_id IS NOT NULL)::int = 1);
F1249merge_request_metrics latest_build_started_attimestamp-tz

TIMESTAMP without time zone

latest_build_started_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_request_metrics ALTER COLUMN latest_build_started_at TYPE timestamptz;
F1250merge_request_metrics latest_build_finished_attimestamp-tz

TIMESTAMP without time zone

latest_build_finished_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_request_metrics ALTER COLUMN latest_build_finished_at TYPE timestamptz;
F1251merge_request_metrics first_deployed_to_production_attimestamp-tz

TIMESTAMP without time zone

first_deployed_to_production_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_request_metrics ALTER COLUMN first_deployed_to_production_at TYPE timestamptz;
F1252merge_request_metrics merged_attimestamp-tz

TIMESTAMP without time zone

merged_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_request_metrics ALTER COLUMN merged_at TYPE timestamptz;
F1253merge_request_metrics created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_request_metrics ALTER COLUMN created_at TYPE timestamptz;
F1254merge_request_metrics updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_request_metrics ALTER COLUMN updated_at TYPE timestamptz;
F451merge_request_metrics target_project_idfk-nullable

Nullable foreign key

merge_request_metrics.target_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F452merge_request_metrics merged_by_idfk-nullable

Nullable foreign key

merge_request_metrics.merged_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F453merge_request_metrics latest_closed_by_idfk-nullable

Nullable foreign key

merge_request_metrics.latest_closed_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F454merge_request_predictions project_idfk-nullable

Nullable foreign key

merge_request_predictions.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

merge_request_requested_changes references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F455merge_request_reviewers project_idfk-nullable

Nullable foreign key

merge_request_reviewers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1018merge_request_user_mentions project_id, note_idexclusive-arc

Either/or foreign keys without a CHECK

merge_request_user_mentions has several nullable FKs (project_id, note_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE merge_request_user_mentions ADD CONSTRAINT merge_request_user_mentions_one_target CHECK ((project_id IS NOT NULL)::int + (note_id IS NOT NULL)::int = 1);
F456merge_request_user_mentions project_idfk-nullable

Nullable foreign key

merge_request_user_mentions.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F457merge_request_user_mentions note_idfk-nullable

Nullable foreign key

merge_request_user_mentions.note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1019merge_requests latest_merge_request_diff_id, assignee_id, updated_by_id, milestone_id, merge_user_id, author_id, source_project_idexclusive-arc

Either/or foreign keys without a CHECK

merge_requests has several nullable FKs (latest_merge_request_diff_id, assignee_id, updated_by_id, milestone_id, merge_user_id, author_id, source_project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE merge_requests ADD CONSTRAINT merge_requests_one_target CHECK ((latest_merge_request_diff_id IS NOT NULL)::int + (assignee_id IS NOT NULL)::int + (updated_by_id IS NOT NULL)::int + (milestone_id IS NOT NULL)::int + (merge_user_id IS NOT NULL)::int + (author_id IS NOT NULL)::int + (source_project_id IS NOT NULL)::int = 1);
F1255merge_requests created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_requests ALTER COLUMN created_at TYPE timestamptz;
F1256merge_requests updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_requests ALTER COLUMN updated_at TYPE timestamptz;
F1257merge_requests last_edited_attimestamp-tz

TIMESTAMP without time zone

last_edited_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_requests ALTER COLUMN last_edited_at TYPE timestamptz;
F1860merge_requestswide-table

Wide table (46 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F458merge_requests latest_merge_request_diff_idfk-nullable

Nullable foreign key

merge_requests.latest_merge_request_diff_id may be NULL, so the relationship to merge_request_diffs is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F459merge_requests assignee_idfk-nullable

Nullable foreign key

merge_requests.assignee_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F460merge_requests updated_by_idfk-nullable

Nullable foreign key

merge_requests.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F461merge_requests milestone_idfk-nullable

Nullable foreign key

merge_requests.milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F462merge_requests merge_user_idfk-nullable

Nullable foreign key

merge_requests.merge_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F463merge_requests author_idfk-nullable

Nullable foreign key

merge_requests.author_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F464merge_requests source_project_idfk-nullable

Nullable foreign key

merge_requests.source_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1020merge_requests_approval_rules group_id, project_id, source_rule_idexclusive-arc

Either/or foreign keys without a CHECK

merge_requests_approval_rules has several nullable FKs (group_id, project_id, source_rule_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE merge_requests_approval_rules ADD CONSTRAINT merge_requests_approval_rules_one_target CHECK ((group_id IS NOT NULL)::int + (project_id IS NOT NULL)::int + (source_rule_id IS NOT NULL)::int = 1);
F465merge_requests_approval_rules group_idfk-nullable

Nullable foreign key

merge_requests_approval_rules.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F466merge_requests_approval_rules project_idfk-nullable

Nullable foreign key

merge_requests_approval_rules.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F467merge_requests_approval_rules source_rule_idfk-nullable

Nullable foreign key

merge_requests_approval_rules.source_rule_id may be NULL, so the relationship to merge_requests_approval_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

merge_requests_approval_rules_approver_users.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

merge_requests_approval_rules_approver_users.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1258merge_requests_closing_issues created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_requests_closing_issues ALTER COLUMN created_at TYPE timestamptz;
F1259merge_requests_closing_issues updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE merge_requests_closing_issues ALTER COLUMN updated_at TYPE timestamptz;
F470merge_requests_closing_issues project_idfk-nullable

Nullable foreign key

merge_requests_closing_issues.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F471merge_requests_compliance_violations target_project_idfk-nullable

Nullable foreign key

merge_requests_compliance_violations.target_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F047merge_requests_merge_data merge_user_idfk-nullable

Nullable foreign key

merge_requests_merge_data.merge_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F472milestone_releases project_idfk-nullable

Nullable foreign key

milestone_releases.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1260milestones created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE milestones ALTER COLUMN created_at TYPE timestamptz;
F1261milestones updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE milestones ALTER COLUMN updated_at TYPE timestamptz;
F473milestones group_idfk-nullable

Nullable foreign key

milestones.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F474milestones project_idfk-nullable

Nullable foreign key

milestones.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F475ml_candidate_metadata project_idfk-nullable

Nullable foreign key

ml_candidate_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1021ml_candidate_metrics project_id, candidate_idexclusive-arc

Either/or foreign keys without a CHECK

ml_candidate_metrics has several nullable FKs (project_id, candidate_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE ml_candidate_metrics ADD CONSTRAINT ml_candidate_metrics_one_target CHECK ((project_id IS NOT NULL)::int + (candidate_id IS NOT NULL)::int = 1);
F476ml_candidate_metrics project_idfk-nullable

Nullable foreign key

ml_candidate_metrics.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F477ml_candidate_metrics candidate_idfk-nullable

Nullable foreign key

ml_candidate_metrics.candidate_id may be NULL, so the relationship to ml_candidates is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1022ml_candidate_params project_id, candidate_idexclusive-arc

Either/or foreign keys without a CHECK

ml_candidate_params has several nullable FKs (project_id, candidate_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE ml_candidate_params ADD CONSTRAINT ml_candidate_params_one_target CHECK ((project_id IS NOT NULL)::int + (candidate_id IS NOT NULL)::int = 1);
F478ml_candidate_params project_idfk-nullable

Nullable foreign key

ml_candidate_params.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F479ml_candidate_params candidate_idfk-nullable

Nullable foreign key

ml_candidate_params.candidate_id may be NULL, so the relationship to ml_candidates is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1023ml_candidates project_id, package_id, model_version_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

ml_candidates has several nullable FKs (project_id, package_id, model_version_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE ml_candidates ADD CONSTRAINT ml_candidates_one_target CHECK ((project_id IS NOT NULL)::int + (package_id IS NOT NULL)::int + (model_version_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F480ml_candidates project_idfk-nullable

Nullable foreign key

ml_candidates.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F481ml_candidates package_idfk-nullable

Nullable foreign key

ml_candidates.package_id may be NULL, so the relationship to packages_packages is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F482ml_candidates model_version_idfk-nullable

Nullable foreign key

ml_candidates.model_version_id may be NULL, so the relationship to ml_model_versions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F483ml_candidates user_idfk-nullable

Nullable foreign key

ml_candidates.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F484ml_experiment_metadata project_idfk-nullable

Nullable foreign key

ml_experiment_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1024ml_experiments user_id, model_idexclusive-arc

Either/or foreign keys without a CHECK

ml_experiments has several nullable FKs (user_id, model_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE ml_experiments ADD CONSTRAINT ml_experiments_one_target CHECK ((user_id IS NOT NULL)::int + (model_id IS NOT NULL)::int = 1);
F485ml_experiments user_idfk-nullable

Nullable foreign key

ml_experiments.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F486ml_experiments model_idfk-nullable

Nullable foreign key

ml_experiments.model_id may be NULL, so the relationship to ml_models is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F487ml_model_metadata project_idfk-nullable

Nullable foreign key

ml_model_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F488ml_model_versions package_idfk-nullable

Nullable foreign key

ml_model_versions.package_id may be NULL, so the relationship to packages_packages is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F489ml_models user_idfk-nullable

Nullable foreign key

ml_models.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F490namespace_cluster_agent_mappings creator_idfk-nullable

Nullable foreign key

namespace_cluster_agent_mappings.creator_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1537namespace_descendantsorphan-table

Isolated table

namespace_descendants references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1538namespace_descendants_00orphan-table

Isolated table

namespace_descendants_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1539namespace_descendants_01orphan-table

Isolated table

namespace_descendants_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1540namespace_descendants_02orphan-table

Isolated table

namespace_descendants_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1541namespace_descendants_03orphan-table

Isolated table

namespace_descendants_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1542namespace_descendants_04orphan-table

Isolated table

namespace_descendants_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1543namespace_descendants_05orphan-table

Isolated table

namespace_descendants_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1544namespace_descendants_06orphan-table

Isolated table

namespace_descendants_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1545namespace_descendants_07orphan-table

Isolated table

namespace_descendants_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1546namespace_descendants_08orphan-table

Isolated table

namespace_descendants_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1547namespace_descendants_09orphan-table

Isolated table

namespace_descendants_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1548namespace_descendants_10orphan-table

Isolated table

namespace_descendants_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1549namespace_descendants_11orphan-table

Isolated table

namespace_descendants_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1550namespace_descendants_12orphan-table

Isolated table

namespace_descendants_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1551namespace_descendants_13orphan-table

Isolated table

namespace_descendants_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1552namespace_descendants_14orphan-table

Isolated table

namespace_descendants_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1553namespace_descendants_15orphan-table

Isolated table

namespace_descendants_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1554namespace_descendants_16orphan-table

Isolated table

namespace_descendants_16 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1555namespace_descendants_17orphan-table

Isolated table

namespace_descendants_17 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1556namespace_descendants_18orphan-table

Isolated table

namespace_descendants_18 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1557namespace_descendants_19orphan-table

Isolated table

namespace_descendants_19 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1558namespace_descendants_20orphan-table

Isolated table

namespace_descendants_20 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1559namespace_descendants_21orphan-table

Isolated table

namespace_descendants_21 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1560namespace_descendants_22orphan-table

Isolated table

namespace_descendants_22 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1561namespace_descendants_23orphan-table

Isolated table

namespace_descendants_23 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1562namespace_descendants_24orphan-table

Isolated table

namespace_descendants_24 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1563namespace_descendants_25orphan-table

Isolated table

namespace_descendants_25 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1564namespace_descendants_26orphan-table

Isolated table

namespace_descendants_26 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1565namespace_descendants_27orphan-table

Isolated table

namespace_descendants_27 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1566namespace_descendants_28orphan-table

Isolated table

namespace_descendants_28 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1567namespace_descendants_29orphan-table

Isolated table

namespace_descendants_29 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1568namespace_descendants_30orphan-table

Isolated table

namespace_descendants_30 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1569namespace_descendants_31orphan-table

Isolated table

namespace_descendants_31 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1861namespace_settingswide-table

Wide table (101 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F491namespace_settings default_compliance_framework_idfk-nullable

Nullable foreign key

namespace_settings.default_compliance_framework_id may be NULL, so the relationship to compliance_management_frameworks is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1262namespace_statistics shared_runners_seconds_last_resettimestamp-tz

TIMESTAMP without time zone

shared_runners_seconds_last_reset stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE namespace_statistics ALTER COLUMN shared_runners_seconds_last_reset TYPE timestamptz;
F1025namespace_template_settings custom_project_templates_group_id, file_template_project_id, duo_template_project_idexclusive-arc

Either/or foreign keys without a CHECK

namespace_template_settings has several nullable FKs (custom_project_templates_group_id, file_template_project_id, duo_template_project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE namespace_template_settings ADD CONSTRAINT namespace_template_settings_one_target CHECK ((custom_project_templates_group_id IS NOT NULL)::int + (file_template_project_id IS NOT NULL)::int + (duo_template_project_id IS NOT NULL)::int = 1);
F492namespace_template_settings custom_project_templates_group_idfk-nullable

Nullable foreign key

namespace_template_settings.custom_project_templates_group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F493namespace_template_settings file_template_project_idfk-nullable

Nullable foreign key

namespace_template_settings.file_template_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F494namespace_template_settings duo_template_project_idfk-nullable

Nullable foreign key

namespace_template_settings.duo_template_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1263namespace_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE namespace_uploads ALTER COLUMN created_at TYPE timestamptz;
F028namespaces organization_idfk-nullable

Nullable foreign key

namespaces.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F029namespaces parent_idfk-nullable

Nullable foreign key

namespaces.parent_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1076namespaces created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE namespaces ALTER COLUMN created_at TYPE timestamptz;
F1077namespaces updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE namespaces ALTER COLUMN updated_at TYPE timestamptz;
F1078namespaces ldap_sync_last_update_attimestamp-tz

TIMESTAMP without time zone

ldap_sync_last_update_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE namespaces ALTER COLUMN ldap_sync_last_update_at TYPE timestamptz;
F1079namespaces ldap_sync_last_successful_update_attimestamp-tz

TIMESTAMP without time zone

ldap_sync_last_successful_update_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE namespaces ALTER COLUMN ldap_sync_last_successful_update_at TYPE timestamptz;
F1080namespaces ldap_sync_last_sync_attimestamp-tz

TIMESTAMP without time zone

ldap_sync_last_sync_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE namespaces ALTER COLUMN ldap_sync_last_sync_at TYPE timestamptz;
F1845namespacesblast-radius

Hub table: referenced by 353 tables

Any change to its key, its delete semantics, or its partitioning touches every dependent. Migrations on hub tables need the longest lock windows and the most careful rollout.

Fix Treat schema changes here as breaking changes with a written rollout plan.

F1847namespaceswide-table

Wide table (44 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F943namespaces organization_id, parent_idexclusive-arc

Either/or foreign keys without a CHECK

namespaces has several nullable FKs (organization_id, parent_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE namespaces ADD CONSTRAINT namespaces_one_target CHECK ((organization_id IS NOT NULL)::int + (parent_id IS NOT NULL)::int = 1);
F495note_diff_files namespace_idfk-nullable

Nullable foreign key

note_diff_files.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F496note_metadata namespace_idfk-nullable

Nullable foreign key

note_metadata.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1026notes review_id, namespace_id, project_id, organization_idexclusive-arc

Either/or foreign keys without a CHECK

notes has several nullable FKs (review_id, namespace_id, project_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE notes ADD CONSTRAINT notes_one_target CHECK ((review_id IS NOT NULL)::int + (namespace_id IS NOT NULL)::int + (project_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int = 1);
F1264notes created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE notes ALTER COLUMN created_at TYPE timestamptz;
F1265notes updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE notes ALTER COLUMN updated_at TYPE timestamptz;
F1266notes resolved_attimestamp-tz

TIMESTAMP without time zone

resolved_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE notes ALTER COLUMN resolved_at TYPE timestamptz;
F1862noteswide-table

Wide table (30 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F497notes review_idfk-nullable

Nullable foreign key

notes.review_id may be NULL, so the relationship to reviews is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F498notes namespace_idfk-nullable

Nullable foreign key

notes.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F499notes project_idfk-nullable

Nullable foreign key

notes.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F500notes organization_idfk-nullable

Nullable foreign key

notes.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1267notification_settings created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE notification_settings ALTER COLUMN created_at TYPE timestamptz;
F1268notification_settings updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE notification_settings ALTER COLUMN updated_at TYPE timestamptz;
F1807notification_settingsorphan-table

Isolated table

notification_settings references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1863notification_settingswide-table

Wide table (32 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F1269oauth_access_grants created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE oauth_access_grants ALTER COLUMN created_at TYPE timestamptz;
F1270oauth_access_grants revoked_attimestamp-tz

TIMESTAMP without time zone

revoked_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE oauth_access_grants ALTER COLUMN revoked_at TYPE timestamptz;
F1271oauth_access_tokens revoked_attimestamp-tz

TIMESTAMP without time zone

revoked_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE oauth_access_tokens ALTER COLUMN revoked_at TYPE timestamptz;
F1272oauth_access_tokens created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE oauth_access_tokens ALTER COLUMN created_at TYPE timestamptz;
F1273oauth_applications created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE oauth_applications ALTER COLUMN created_at TYPE timestamptz;
F1274oauth_applications updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE oauth_applications ALTER COLUMN updated_at TYPE timestamptz;
F501oauth_applications organization_idfk-nullable

Nullable foreign key

oauth_applications.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

observability_metrics_issues_connections.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F503operations_feature_flags_issues project_idfk-nullable

Nullable foreign key

operations_feature_flags_issues.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F504operations_scopes project_idfk-nullable

Nullable foreign key

operations_scopes.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F505operations_strategies project_idfk-nullable

Nullable foreign key

operations_strategies.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F506operations_strategies_user_lists project_idfk-nullable

Nullable foreign key

operations_strategies_user_lists.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F507organization_cluster_agent_mappings creator_idfk-nullable

Nullable foreign key

organization_cluster_agent_mappings.creator_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1275organization_detail_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE organization_detail_uploads ALTER COLUMN created_at TYPE timestamptz;

Isolated table

p_ai_active_context_code_repositories references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

p_batched_git_ref_updates_deletions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

p_catalog_resource_sync_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F033p_ci_build_trace_metadata partition_id, trace_artifact_idfk-nullable

Nullable foreign key

p_ci_build_trace_metadata.partition_id.trace_artifact_id may be NULL, so the relationship to p_ci_job_artifacts is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F034p_ci_builds partition_id, stage_idfk-nullable

Nullable foreign key

p_ci_builds.partition_id.stage_id may be NULL, so the relationship to p_ci_stages is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F035p_ci_builds resource_group_idfk-nullable

Nullable foreign key

p_ci_builds.resource_group_id may be NULL, so the relationship to ci_resource_groups is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F036p_ci_builds upstream_pipeline_partition_id, upstream_pipeline_idfk-nullable

Nullable foreign key

p_ci_builds.upstream_pipeline_partition_id.upstream_pipeline_id may be NULL, so the relationship to p_ci_pipelines is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F037p_ci_builds auto_canceled_by_partition_id, auto_canceled_by_idfk-nullable

Nullable foreign key

p_ci_builds.auto_canceled_by_partition_id.auto_canceled_by_id may be NULL, so the relationship to p_ci_pipelines is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F038p_ci_builds partition_id, commit_idfk-nullable

Nullable foreign key

p_ci_builds.partition_id.commit_id may be NULL, so the relationship to p_ci_pipelines is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1102p_ci_builds finished_attimestamp-tz

TIMESTAMP without time zone

finished_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_builds ALTER COLUMN finished_at TYPE timestamptz;
F1103p_ci_builds created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_builds ALTER COLUMN created_at TYPE timestamptz;
F1104p_ci_builds updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_builds ALTER COLUMN updated_at TYPE timestamptz;
F1105p_ci_builds started_attimestamp-tz

TIMESTAMP without time zone

started_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_builds ALTER COLUMN started_at TYPE timestamptz;
F1106p_ci_builds erased_attimestamp-tz

TIMESTAMP without time zone

erased_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_builds ALTER COLUMN erased_at TYPE timestamptz;
F1107p_ci_builds artifacts_expire_attimestamp-tz

TIMESTAMP without time zone

artifacts_expire_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_builds ALTER COLUMN artifacts_expire_at TYPE timestamptz;
F1108p_ci_builds queued_attimestamp-tz

TIMESTAMP without time zone

queued_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_builds ALTER COLUMN queued_at TYPE timestamptz;
F1850p_ci_buildswide-table

Wide table (47 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

Isolated table

p_ci_builds_partition_overrides_0 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

p_ci_builds_partition_overrides_1 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

p_ci_builds_partition_overrides_2 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1118p_ci_finished_build_ch_sync_events build_finished_attimestamp-tz

TIMESTAMP without time zone

build_finished_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_finished_build_ch_sync_events ALTER COLUMN build_finished_at TYPE timestamptz;

Isolated table

p_ci_finished_build_ch_sync_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1119p_ci_finished_pipeline_ch_sync_events pipeline_finished_attimestamp-tz

TIMESTAMP without time zone

pipeline_finished_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_finished_pipeline_ch_sync_events ALTER COLUMN pipeline_finished_at TYPE timestamptz;

Isolated table

p_ci_finished_pipeline_ch_sync_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

p_ci_job_runtime_environments references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

p_ci_pipeline_artifact_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1573p_ci_pipeline_iidsorphan-table

Isolated table

p_ci_pipeline_iids references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1574p_ci_pipeline_iids_00orphan-table

Isolated table

p_ci_pipeline_iids_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1575p_ci_pipeline_iids_01orphan-table

Isolated table

p_ci_pipeline_iids_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1576p_ci_pipeline_iids_02orphan-table

Isolated table

p_ci_pipeline_iids_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1577p_ci_pipeline_iids_03orphan-table

Isolated table

p_ci_pipeline_iids_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1578p_ci_pipeline_iids_04orphan-table

Isolated table

p_ci_pipeline_iids_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1579p_ci_pipeline_iids_05orphan-table

Isolated table

p_ci_pipeline_iids_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1580p_ci_pipeline_iids_06orphan-table

Isolated table

p_ci_pipeline_iids_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1581p_ci_pipeline_iids_07orphan-table

Isolated table

p_ci_pipeline_iids_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1582p_ci_pipeline_iids_08orphan-table

Isolated table

p_ci_pipeline_iids_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1583p_ci_pipeline_iids_09orphan-table

Isolated table

p_ci_pipeline_iids_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1584p_ci_pipeline_iids_10orphan-table

Isolated table

p_ci_pipeline_iids_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1585p_ci_pipeline_iids_11orphan-table

Isolated table

p_ci_pipeline_iids_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1586p_ci_pipeline_iids_12orphan-table

Isolated table

p_ci_pipeline_iids_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1587p_ci_pipeline_iids_13orphan-table

Isolated table

p_ci_pipeline_iids_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1588p_ci_pipeline_iids_14orphan-table

Isolated table

p_ci_pipeline_iids_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1589p_ci_pipeline_iids_15orphan-table

Isolated table

p_ci_pipeline_iids_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1590p_ci_pipeline_iids_16orphan-table

Isolated table

p_ci_pipeline_iids_16 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1591p_ci_pipeline_iids_17orphan-table

Isolated table

p_ci_pipeline_iids_17 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1592p_ci_pipeline_iids_18orphan-table

Isolated table

p_ci_pipeline_iids_18 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1593p_ci_pipeline_iids_19orphan-table

Isolated table

p_ci_pipeline_iids_19 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1594p_ci_pipeline_iids_20orphan-table

Isolated table

p_ci_pipeline_iids_20 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1595p_ci_pipeline_iids_21orphan-table

Isolated table

p_ci_pipeline_iids_21 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1596p_ci_pipeline_iids_22orphan-table

Isolated table

p_ci_pipeline_iids_22 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1597p_ci_pipeline_iids_23orphan-table

Isolated table

p_ci_pipeline_iids_23 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1598p_ci_pipeline_iids_24orphan-table

Isolated table

p_ci_pipeline_iids_24 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1599p_ci_pipeline_iids_25orphan-table

Isolated table

p_ci_pipeline_iids_25 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1600p_ci_pipeline_iids_26orphan-table

Isolated table

p_ci_pipeline_iids_26 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1601p_ci_pipeline_iids_27orphan-table

Isolated table

p_ci_pipeline_iids_27 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1602p_ci_pipeline_iids_28orphan-table

Isolated table

p_ci_pipeline_iids_28 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1603p_ci_pipeline_iids_29orphan-table

Isolated table

p_ci_pipeline_iids_29 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1604p_ci_pipeline_iids_30orphan-table

Isolated table

p_ci_pipeline_iids_30 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1605p_ci_pipeline_iids_31orphan-table

Isolated table

p_ci_pipeline_iids_31 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1606p_ci_pipeline_iids_32orphan-table

Isolated table

p_ci_pipeline_iids_32 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1607p_ci_pipeline_iids_33orphan-table

Isolated table

p_ci_pipeline_iids_33 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1608p_ci_pipeline_iids_34orphan-table

Isolated table

p_ci_pipeline_iids_34 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1609p_ci_pipeline_iids_35orphan-table

Isolated table

p_ci_pipeline_iids_35 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1610p_ci_pipeline_iids_36orphan-table

Isolated table

p_ci_pipeline_iids_36 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1611p_ci_pipeline_iids_37orphan-table

Isolated table

p_ci_pipeline_iids_37 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1612p_ci_pipeline_iids_38orphan-table

Isolated table

p_ci_pipeline_iids_38 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1613p_ci_pipeline_iids_39orphan-table

Isolated table

p_ci_pipeline_iids_39 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1614p_ci_pipeline_iids_40orphan-table

Isolated table

p_ci_pipeline_iids_40 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1615p_ci_pipeline_iids_41orphan-table

Isolated table

p_ci_pipeline_iids_41 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1616p_ci_pipeline_iids_42orphan-table

Isolated table

p_ci_pipeline_iids_42 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1617p_ci_pipeline_iids_43orphan-table

Isolated table

p_ci_pipeline_iids_43 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1618p_ci_pipeline_iids_44orphan-table

Isolated table

p_ci_pipeline_iids_44 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1619p_ci_pipeline_iids_45orphan-table

Isolated table

p_ci_pipeline_iids_45 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1620p_ci_pipeline_iids_46orphan-table

Isolated table

p_ci_pipeline_iids_46 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1621p_ci_pipeline_iids_47orphan-table

Isolated table

p_ci_pipeline_iids_47 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1622p_ci_pipeline_iids_48orphan-table

Isolated table

p_ci_pipeline_iids_48 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1623p_ci_pipeline_iids_49orphan-table

Isolated table

p_ci_pipeline_iids_49 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1624p_ci_pipeline_iids_50orphan-table

Isolated table

p_ci_pipeline_iids_50 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1625p_ci_pipeline_iids_51orphan-table

Isolated table

p_ci_pipeline_iids_51 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1626p_ci_pipeline_iids_52orphan-table

Isolated table

p_ci_pipeline_iids_52 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1627p_ci_pipeline_iids_53orphan-table

Isolated table

p_ci_pipeline_iids_53 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1628p_ci_pipeline_iids_54orphan-table

Isolated table

p_ci_pipeline_iids_54 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1629p_ci_pipeline_iids_55orphan-table

Isolated table

p_ci_pipeline_iids_55 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1630p_ci_pipeline_iids_56orphan-table

Isolated table

p_ci_pipeline_iids_56 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1631p_ci_pipeline_iids_57orphan-table

Isolated table

p_ci_pipeline_iids_57 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1632p_ci_pipeline_iids_58orphan-table

Isolated table

p_ci_pipeline_iids_58 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1633p_ci_pipeline_iids_59orphan-table

Isolated table

p_ci_pipeline_iids_59 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1634p_ci_pipeline_iids_60orphan-table

Isolated table

p_ci_pipeline_iids_60 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1635p_ci_pipeline_iids_61orphan-table

Isolated table

p_ci_pipeline_iids_61 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1636p_ci_pipeline_iids_62orphan-table

Isolated table

p_ci_pipeline_iids_62 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1637p_ci_pipeline_iids_63orphan-table

Isolated table

p_ci_pipeline_iids_63 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F039p_ci_pipelines external_pull_request_idfk-nullable

Nullable foreign key

p_ci_pipelines.external_pull_request_id may be NULL, so the relationship to external_pull_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F040p_ci_pipelines auto_canceled_by_partition_id, auto_canceled_by_idfk-nullable

Nullable foreign key

p_ci_pipelines.auto_canceled_by_partition_id.auto_canceled_by_id may be NULL, so the relationship to p_ci_pipelines is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F041p_ci_pipelines pipeline_schedule_idfk-nullable

Nullable foreign key

p_ci_pipelines.pipeline_schedule_id may be NULL, so the relationship to ci_pipeline_schedules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F042p_ci_pipelines ci_ref_idfk-nullable

Nullable foreign key

p_ci_pipelines.ci_ref_id may be NULL, so the relationship to ci_refs is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1109p_ci_pipelines created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_pipelines ALTER COLUMN created_at TYPE timestamptz;
F1110p_ci_pipelines updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_pipelines ALTER COLUMN updated_at TYPE timestamptz;
F1111p_ci_pipelines committed_attimestamp-tz

TIMESTAMP without time zone

committed_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_pipelines ALTER COLUMN committed_at TYPE timestamptz;
F1112p_ci_pipelines started_attimestamp-tz

TIMESTAMP without time zone

started_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_pipelines ALTER COLUMN started_at TYPE timestamptz;
F1113p_ci_pipelines finished_attimestamp-tz

TIMESTAMP without time zone

finished_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_pipelines ALTER COLUMN finished_at TYPE timestamptz;
F1851p_ci_pipelineswide-table

Wide table (32 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F945p_ci_pipelines external_pull_request_id, pipeline_schedule_id, ci_ref_idexclusive-arc

Either/or foreign keys without a CHECK

p_ci_pipelines has several nullable FKs (external_pull_request_id, pipeline_schedule_id, ci_ref_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE p_ci_pipelines ADD CONSTRAINT p_ci_pipelines_one_target CHECK ((external_pull_request_id IS NOT NULL)::int + (pipeline_schedule_id IS NOT NULL)::int + (ci_ref_id IS NOT NULL)::int = 1);
F1395p_ci_runtime_environmentsorphan-table

Isolated table

p_ci_runtime_environments references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F043p_ci_stages partition_id, pipeline_idfk-nullable

Nullable foreign key

p_ci_stages.partition_id.pipeline_id may be NULL, so the relationship to p_ci_pipelines is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1114p_ci_stages created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_stages ALTER COLUMN created_at TYPE timestamptz;
F1115p_ci_stages updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE p_ci_stages ALTER COLUMN updated_at TYPE timestamptz;
F044p_ci_workload_variable_inclusions partition_id, workload_idfk-nullable

Nullable foreign key

p_ci_workload_variable_inclusions.partition_id.workload_id may be NULL, so the relationship to p_ci_workloads is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

p_knowledge_graph_code_indexing_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F048p_sent_notifications issue_email_participant_idfk-nullable

Nullable foreign key

p_sent_notifications.issue_email_participant_id may be NULL, so the relationship to issue_email_participants is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F508packages_build_infos project_idfk-nullable

Nullable foreign key

packages_build_infos.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F509packages_composer_metadata project_idfk-nullable

Nullable foreign key

packages_composer_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F511packages_composer_packages creator_idfk-nullable

Nullable foreign key

packages_composer_packages.creator_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1027packages_conan_file_metadata project_id, package_revision_id, package_reference_id, recipe_revision_idexclusive-arc

Either/or foreign keys without a CHECK

packages_conan_file_metadata has several nullable FKs (project_id, package_revision_id, package_reference_id, recipe_revision_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE packages_conan_file_metadata ADD CONSTRAINT packages_conan_file_metadata_one_target CHECK ((project_id IS NOT NULL)::int + (package_revision_id IS NOT NULL)::int + (package_reference_id IS NOT NULL)::int + (recipe_revision_id IS NOT NULL)::int = 1);
F512packages_conan_file_metadata project_idfk-nullable

Nullable foreign key

packages_conan_file_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F513packages_conan_file_metadata package_revision_idfk-nullable

Nullable foreign key

packages_conan_file_metadata.package_revision_id may be NULL, so the relationship to packages_conan_package_revisions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F514packages_conan_file_metadata package_reference_idfk-nullable

Nullable foreign key

packages_conan_file_metadata.package_reference_id may be NULL, so the relationship to packages_conan_package_references is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F515packages_conan_file_metadata recipe_revision_idfk-nullable

Nullable foreign key

packages_conan_file_metadata.recipe_revision_id may be NULL, so the relationship to packages_conan_recipe_revisions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

packages_conan_jwt_signing_keys references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F516packages_conan_metadata project_idfk-nullable

Nullable foreign key

packages_conan_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F517packages_conan_package_references recipe_revision_idfk-nullable

Nullable foreign key

packages_conan_package_references.recipe_revision_id may be NULL, so the relationship to packages_conan_recipe_revisions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F518packages_debian_file_metadata project_idfk-nullable

Nullable foreign key

packages_debian_file_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F519packages_debian_group_architectures group_idfk-nullable

Nullable foreign key

packages_debian_group_architectures.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1028packages_debian_group_component_files group_id, architecture_idexclusive-arc

Either/or foreign keys without a CHECK

packages_debian_group_component_files has several nullable FKs (group_id, architecture_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE packages_debian_group_component_files ADD CONSTRAINT packages_debian_group_component_files_one_target CHECK ((group_id IS NOT NULL)::int + (architecture_id IS NOT NULL)::int = 1);

Nullable foreign key

packages_debian_group_component_files.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F521packages_debian_group_component_files architecture_idfk-nullable

Nullable foreign key

packages_debian_group_component_files.architecture_id may be NULL, so the relationship to packages_debian_group_architectures is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F522packages_debian_group_components group_idfk-nullable

Nullable foreign key

packages_debian_group_components.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

packages_debian_group_distribution_keys.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F524packages_debian_group_distributions creator_idfk-nullable

Nullable foreign key

packages_debian_group_distributions.creator_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F525packages_debian_project_architectures project_idfk-nullable

Nullable foreign key

packages_debian_project_architectures.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1029packages_debian_project_component_files project_id, architecture_idexclusive-arc

Either/or foreign keys without a CHECK

packages_debian_project_component_files has several nullable FKs (project_id, architecture_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE packages_debian_project_component_files ADD CONSTRAINT packages_debian_project_component_files_one_target CHECK ((project_id IS NOT NULL)::int + (architecture_id IS NOT NULL)::int = 1);
F526packages_debian_project_component_files project_idfk-nullable

Nullable foreign key

packages_debian_project_component_files.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F527packages_debian_project_component_files architecture_idfk-nullable

Nullable foreign key

packages_debian_project_component_files.architecture_id may be NULL, so the relationship to packages_debian_project_architectures is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F528packages_debian_project_components project_idfk-nullable

Nullable foreign key

packages_debian_project_components.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

packages_debian_project_distribution_keys.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F530packages_debian_project_distributions creator_idfk-nullable

Nullable foreign key

packages_debian_project_distributions.creator_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F531packages_debian_publications project_idfk-nullable

Nullable foreign key

packages_debian_publications.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F532packages_dependencies project_idfk-nullable

Nullable foreign key

packages_dependencies.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F533packages_dependency_links project_idfk-nullable

Nullable foreign key

packages_dependency_links.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F534packages_helm_file_metadata project_idfk-nullable

Nullable foreign key

packages_helm_file_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F535packages_helm_metadata_cache_states project_idfk-nullable

Nullable foreign key

packages_helm_metadata_cache_states.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F536packages_maven_metadata project_idfk-nullable

Nullable foreign key

packages_maven_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F537packages_npm_metadata project_idfk-nullable

Nullable foreign key

packages_npm_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

packages_npm_metadata_caches references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F538packages_nuget_dependency_link_metadata project_idfk-nullable

Nullable foreign key

packages_nuget_dependency_link_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F539packages_nuget_metadata project_idfk-nullable

Nullable foreign key

packages_nuget_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

packages_nuget_symbol_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F540packages_nuget_symbols package_idfk-nullable

Nullable foreign key

packages_nuget_symbols.package_id may be NULL, so the relationship to packages_packages is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F541packages_package_file_build_infos project_idfk-nullable

Nullable foreign key

packages_package_file_build_infos.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

packages_package_file_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F510packages_packages creator_idfk-nullable

Nullable foreign key

packages_packages.creator_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F542packages_pypi_metadata project_idfk-nullable

Nullable foreign key

packages_pypi_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F543packages_rpm_metadata project_idfk-nullable

Nullable foreign key

packages_rpm_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F544packages_rubygems_metadata project_idfk-nullable

Nullable foreign key

packages_rubygems_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

packages_rubygems_spec_files references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F545packages_tags project_idfk-nullable

Nullable foreign key

packages_tags.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F546pages_deployment_states project_idfk-nullable

Nullable foreign key

pages_deployment_states.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F547pages_domain_acme_orders project_idfk-nullable

Nullable foreign key

pages_domain_acme_orders.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F548pages_domains project_idfk-nullable

Nullable foreign key

pages_domains.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1030path_locks project_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

path_locks has several nullable FKs (project_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE path_locks ADD CONSTRAINT path_locks_one_target CHECK ((project_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F1276path_locks created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE path_locks ALTER COLUMN created_at TYPE timestamptz;
F1277path_locks updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE path_locks ALTER COLUMN updated_at TYPE timestamptz;
F549path_locks project_idfk-nullable

Nullable foreign key

path_locks.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F550path_locks user_idfk-nullable

Nullable foreign key

path_locks.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1031personal_access_tokens group_id, previous_personal_access_token_idexclusive-arc

Either/or foreign keys without a CHECK

personal_access_tokens has several nullable FKs (group_id, previous_personal_access_token_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE personal_access_tokens ADD CONSTRAINT personal_access_tokens_one_target CHECK ((group_id IS NOT NULL)::int + (previous_personal_access_token_id IS NOT NULL)::int = 1);
F1278personal_access_tokens created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE personal_access_tokens ALTER COLUMN created_at TYPE timestamptz;
F1279personal_access_tokens updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE personal_access_tokens ALTER COLUMN updated_at TYPE timestamptz;
F551personal_access_tokens group_idfk-nullable

Nullable foreign key

personal_access_tokens.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F552personal_access_tokens previous_personal_access_token_idfk-nullable

Nullable foreign key

personal_access_tokens.previous_personal_access_token_id may be NULL, so the relationship to personal_access_tokens is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1864plan_limitswide-table

Wide table (103 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F1282plans created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE plans ALTER COLUMN created_at TYPE timestamptz;
F1283plans updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE plans ALTER COLUMN updated_at TYPE timestamptz;
F1813pm_checkpointsorphan-table

Isolated table

pm_checkpoints references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1814pm_cve_enrichmentorphan-table

Isolated table

pm_cve_enrichment references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F556pool_repositories organization_idfk-nullable

Nullable foreign key

pool_repositories.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

postgres_async_foreign_key_validations references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1816postgres_async_indexesorphan-table

Isolated table

postgres_async_indexes references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1817postgres_reindex_actionsorphan-table

Isolated table

postgres_reindex_actions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

postgres_reindex_queued_actions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1819programming_languagesorphan-table

Isolated table

programming_languages references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1397project_audit_eventsorphan-table

Isolated table

project_audit_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F557project_compliance_framework_settings framework_idfk-nullable

Nullable foreign key

project_compliance_framework_settings.framework_id may be NULL, so the relationship to compliance_management_frameworks is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F558project_compliance_standards_adherence namespace_idfk-nullable

Nullable foreign key

project_compliance_standards_adherence.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F559project_control_compliance_statuses requirement_status_idfk-nullable

Nullable foreign key

project_control_compliance_statuses.requirement_status_id may be NULL, so the relationship to project_requirement_compliance_statuses is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1820project_data_transfersorphan-table

Isolated table

project_data_transfers references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F560project_export_jobs user_idfk-nullable

Nullable foreign key

project_export_jobs.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1284project_feature_usages jira_dvcs_cloud_last_sync_attimestamp-tz

TIMESTAMP without time zone

jira_dvcs_cloud_last_sync_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE project_feature_usages ALTER COLUMN jira_dvcs_cloud_last_sync_at TYPE timestamptz;
F1285project_feature_usages jira_dvcs_server_last_sync_attimestamp-tz

TIMESTAMP without time zone

jira_dvcs_server_last_sync_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE project_feature_usages ALTER COLUMN jira_dvcs_server_last_sync_at TYPE timestamptz;
F1286project_features created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE project_features ALTER COLUMN created_at TYPE timestamptz;
F1287project_features updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE project_features ALTER COLUMN updated_at TYPE timestamptz;
F1288project_group_links created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE project_group_links ALTER COLUMN created_at TYPE timestamptz;
F1289project_group_links updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE project_group_links ALTER COLUMN updated_at TYPE timestamptz;
F561project_group_links member_role_idfk-nullable

Nullable foreign key

project_group_links.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE project_import_export_relation_export_upload_uploads ALTER COLUMN created_at TYPE timestamptz;
F1291project_mirror_data last_update_started_attimestamp-tz

TIMESTAMP without time zone

last_update_started_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE project_mirror_data ALTER COLUMN last_update_started_at TYPE timestamptz;
F1292project_mirror_data last_update_scheduled_attimestamp-tz

TIMESTAMP without time zone

last_update_scheduled_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE project_mirror_data ALTER COLUMN last_update_scheduled_at TYPE timestamptz;
F1293project_mirror_data next_execution_timestamptimestamp-tz

TIMESTAMP without time zone

next_execution_timestamp stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE project_mirror_data ALTER COLUMN next_execution_timestamp TYPE timestamptz;
F562project_relation_export_uploads project_idfk-nullable

Nullable foreign key

project_relation_export_uploads.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F563project_relation_exports project_idfk-nullable

Nullable foreign key

project_relation_exports.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1032project_secrets_manager_maintenance_tasks organization_id, project_secrets_manager_idexclusive-arc

Either/or foreign keys without a CHECK

project_secrets_manager_maintenance_tasks has several nullable FKs (organization_id, project_secrets_manager_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE project_secrets_manager_maintenance_tasks ADD CONSTRAINT project_secrets_manager_maintenance_tasks_one_target CHECK ((organization_id IS NOT NULL)::int + (project_secrets_manager_id IS NOT NULL)::int = 1);
F564project_secrets_manager_maintenance_tasks organization_idfk-nullable

Nullable foreign key

project_secrets_manager_maintenance_tasks.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F565project_secrets_manager_maintenance_tasks project_secrets_manager_idfk-nullable

Nullable foreign key

project_secrets_manager_maintenance_tasks.project_secrets_manager_id may be NULL, so the relationship to project_secrets_managers is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F566project_secrets_managers project_idfk-nullable

Nullable foreign key

project_secrets_managers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

project_security_exclusions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

project_security_statistics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1033project_settings pipeline_execution_policy_bot_access_group_id, duo_dependency_bump_breaking_changes_enabled_by_id, push_rule_idexclusive-arc

Either/or foreign keys without a CHECK

project_settings has several nullable FKs (pipeline_execution_policy_bot_access_group_id, duo_dependency_bump_breaking_changes_enabled_by_id, push_rule_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE project_settings ADD CONSTRAINT project_settings_one_target CHECK ((pipeline_execution_policy_bot_access_group_id IS NOT NULL)::int + (duo_dependency_bump_breaking_changes_enabled_by_id IS NOT NULL)::int + (push_rule_id IS NOT NULL)::int = 1);
F1865project_settingswide-table

Wide table (73 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F567project_settings pipeline_execution_policy_bot_access_group_idfk-nullable

Nullable foreign key

project_settings.pipeline_execution_policy_bot_access_group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F568project_settings duo_dependency_bump_breaking_changes_enabled_by_idfk-nullable

Nullable foreign key

project_settings.duo_dependency_bump_breaking_changes_enabled_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F569project_settings push_rule_idfk-nullable

Nullable foreign key

project_settings.push_rule_id may be NULL, so the relationship to push_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1823project_statesorphan-table

Isolated table

project_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1294project_statistics shared_runners_seconds_last_resettimestamp-tz

TIMESTAMP without time zone

shared_runners_seconds_last_reset stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE project_statistics ALTER COLUMN shared_runners_seconds_last_reset TYPE timestamptz;
F570project_statistics root_namespace_idfk-nullable

Nullable foreign key

project_statistics.root_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1295project_topic_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE project_topic_uploads ALTER COLUMN created_at TYPE timestamptz;
F1296project_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE project_uploads ALTER COLUMN created_at TYPE timestamptz;
F030projects project_namespace_idfk-nullable

Nullable foreign key

projects.project_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F031projects organization_idfk-nullable

Nullable foreign key

projects.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1081projects created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE projects ALTER COLUMN created_at TYPE timestamptz;
F1082projects updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE projects ALTER COLUMN updated_at TYPE timestamptz;
F1083projects last_activity_attimestamp-tz

TIMESTAMP without time zone

last_activity_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE projects ALTER COLUMN last_activity_at TYPE timestamptz;
F1084projects mirror_last_update_attimestamp-tz

TIMESTAMP without time zone

mirror_last_update_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE projects ALTER COLUMN mirror_last_update_at TYPE timestamptz;
F1085projects mirror_last_successful_update_attimestamp-tz

TIMESTAMP without time zone

mirror_last_successful_update_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE projects ALTER COLUMN mirror_last_successful_update_at TYPE timestamptz;
F1086projects last_repository_check_attimestamp-tz

TIMESTAMP without time zone

last_repository_check_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE projects ALTER COLUMN last_repository_check_at TYPE timestamptz;
F1087projects last_repository_updated_attimestamp-tz

TIMESTAMP without time zone

last_repository_updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE projects ALTER COLUMN last_repository_updated_at TYPE timestamptz;
F1844projectsblast-radius

Hub table: referenced by 371 tables

Any change to its key, its delete semantics, or its partitioning touches every dependent. Migrations on hub tables need the longest lock windows and the most careful rollout.

Fix Treat schema changes here as breaking changes with a written rollout plan.

F1848projectswide-table

Wide table (82 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F944projects project_namespace_id, organization_idexclusive-arc

Either/or foreign keys without a CHECK

projects has several nullable FKs (project_namespace_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE projects ADD CONSTRAINT projects_one_target CHECK ((project_namespace_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int = 1);
F1398projects_visitsorphan-table

Isolated table

projects_visits references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1034protected_branch_merge_access_levels protected_branch_project_id, group_id, member_role_id, protected_branch_namespace_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

protected_branch_merge_access_levels has several nullable FKs (protected_branch_project_id, group_id, member_role_id, protected_branch_namespace_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE protected_branch_merge_access_levels ADD CONSTRAINT protected_branch_merge_access_levels_one_target CHECK ((protected_branch_project_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (member_role_id IS NOT NULL)::int + (protected_branch_namespace_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F1297protected_branch_merge_access_levels created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE protected_branch_merge_access_levels ALTER COLUMN created_at TYPE timestamptz;
F1298protected_branch_merge_access_levels updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE protected_branch_merge_access_levels ALTER COLUMN updated_at TYPE timestamptz;
F571protected_branch_merge_access_levels protected_branch_project_idfk-nullable

Nullable foreign key

protected_branch_merge_access_levels.protected_branch_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F572protected_branch_merge_access_levels group_idfk-nullable

Nullable foreign key

protected_branch_merge_access_levels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F573protected_branch_merge_access_levels member_role_idfk-nullable

Nullable foreign key

protected_branch_merge_access_levels.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F574protected_branch_merge_access_levels protected_branch_namespace_idfk-nullable

Nullable foreign key

protected_branch_merge_access_levels.protected_branch_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

protected_branch_merge_access_levels.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1035protected_branch_push_access_levels deploy_key_id, protected_branch_namespace_id, group_id, member_role_id, protected_branch_project_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

protected_branch_push_access_levels has several nullable FKs (deploy_key_id, protected_branch_namespace_id, group_id, member_role_id, protected_branch_project_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE protected_branch_push_access_levels ADD CONSTRAINT protected_branch_push_access_levels_one_target CHECK ((deploy_key_id IS NOT NULL)::int + (protected_branch_namespace_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (member_role_id IS NOT NULL)::int + (protected_branch_project_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F1299protected_branch_push_access_levels created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE protected_branch_push_access_levels ALTER COLUMN created_at TYPE timestamptz;
F1300protected_branch_push_access_levels updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE protected_branch_push_access_levels ALTER COLUMN updated_at TYPE timestamptz;
F576protected_branch_push_access_levels deploy_key_idfk-nullable

Nullable foreign key

protected_branch_push_access_levels.deploy_key_id may be NULL, so the relationship to keys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F577protected_branch_push_access_levels protected_branch_namespace_idfk-nullable

Nullable foreign key

protected_branch_push_access_levels.protected_branch_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F578protected_branch_push_access_levels group_idfk-nullable

Nullable foreign key

protected_branch_push_access_levels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F579protected_branch_push_access_levels member_role_idfk-nullable

Nullable foreign key

protected_branch_push_access_levels.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F580protected_branch_push_access_levels protected_branch_project_idfk-nullable

Nullable foreign key

protected_branch_push_access_levels.protected_branch_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

protected_branch_push_access_levels.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1036protected_branch_unprotect_access_levels protected_branch_project_id, protected_branch_namespace_id, member_role_id, user_id, group_idexclusive-arc

Either/or foreign keys without a CHECK

protected_branch_unprotect_access_levels has several nullable FKs (protected_branch_project_id, protected_branch_namespace_id, member_role_id, user_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE protected_branch_unprotect_access_levels ADD CONSTRAINT protected_branch_unprotect_access_levels_one_target CHECK ((protected_branch_project_id IS NOT NULL)::int + (protected_branch_namespace_id IS NOT NULL)::int + (member_role_id IS NOT NULL)::int + (user_id IS NOT NULL)::int + (group_id IS NOT NULL)::int = 1);
F582protected_branch_unprotect_access_levels protected_branch_project_idfk-nullable

Nullable foreign key

protected_branch_unprotect_access_levels.protected_branch_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F583protected_branch_unprotect_access_levels protected_branch_namespace_idfk-nullable

Nullable foreign key

protected_branch_unprotect_access_levels.protected_branch_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F584protected_branch_unprotect_access_levels member_role_idfk-nullable

Nullable foreign key

protected_branch_unprotect_access_levels.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

protected_branch_unprotect_access_levels.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

protected_branch_unprotect_access_levels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1301protected_branches created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE protected_branches ALTER COLUMN created_at TYPE timestamptz;
F1302protected_branches updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE protected_branches ALTER COLUMN updated_at TYPE timestamptz;
F587protected_branches project_idfk-nullable

Nullable foreign key

protected_branches.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F588protected_branches namespace_idfk-nullable

Nullable foreign key

protected_branches.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1037protected_environment_approval_rules protected_environment_group_id, group_id, user_id, protected_environment_project_idexclusive-arc

Either/or foreign keys without a CHECK

protected_environment_approval_rules has several nullable FKs (protected_environment_group_id, group_id, user_id, protected_environment_project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE protected_environment_approval_rules ADD CONSTRAINT protected_environment_approval_rules_one_target CHECK ((protected_environment_group_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (user_id IS NOT NULL)::int + (protected_environment_project_id IS NOT NULL)::int = 1);
F589protected_environment_approval_rules protected_environment_group_idfk-nullable

Nullable foreign key

protected_environment_approval_rules.protected_environment_group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F590protected_environment_approval_rules group_idfk-nullable

Nullable foreign key

protected_environment_approval_rules.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

protected_environment_approval_rules.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F592protected_environment_approval_rules protected_environment_project_idfk-nullable

Nullable foreign key

protected_environment_approval_rules.protected_environment_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1038protected_environment_deploy_access_levels protected_environment_group_id, protected_environment_project_id, group_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

protected_environment_deploy_access_levels has several nullable FKs (protected_environment_group_id, protected_environment_project_id, group_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE protected_environment_deploy_access_levels ADD CONSTRAINT protected_environment_deploy_access_levels_one_target CHECK ((protected_environment_group_id IS NOT NULL)::int + (protected_environment_project_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F593protected_environment_deploy_access_levels protected_environment_group_idfk-nullable

Nullable foreign key

protected_environment_deploy_access_levels.protected_environment_group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F594protected_environment_deploy_access_levels protected_environment_project_idfk-nullable

Nullable foreign key

protected_environment_deploy_access_levels.protected_environment_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

protected_environment_deploy_access_levels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

protected_environment_deploy_access_levels.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F597protected_environments group_idfk-nullable

Nullable foreign key

protected_environments.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F598protected_environments project_idfk-nullable

Nullable foreign key

protected_environments.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1039protected_tag_create_access_levels deploy_key_id, project_id, group_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

protected_tag_create_access_levels has several nullable FKs (deploy_key_id, project_id, group_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE protected_tag_create_access_levels ADD CONSTRAINT protected_tag_create_access_levels_one_target CHECK ((deploy_key_id IS NOT NULL)::int + (project_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F1303protected_tag_create_access_levels created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE protected_tag_create_access_levels ALTER COLUMN created_at TYPE timestamptz;
F1304protected_tag_create_access_levels updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE protected_tag_create_access_levels ALTER COLUMN updated_at TYPE timestamptz;
F599protected_tag_create_access_levels deploy_key_idfk-nullable

Nullable foreign key

protected_tag_create_access_levels.deploy_key_id may be NULL, so the relationship to keys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F600protected_tag_create_access_levels project_idfk-nullable

Nullable foreign key

protected_tag_create_access_levels.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F601protected_tag_create_access_levels group_idfk-nullable

Nullable foreign key

protected_tag_create_access_levels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F602protected_tag_create_access_levels user_idfk-nullable

Nullable foreign key

protected_tag_create_access_levels.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1305protected_tags created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE protected_tags ALTER COLUMN created_at TYPE timestamptz;
F1306protected_tags updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE protected_tags ALTER COLUMN updated_at TYPE timestamptz;
F603push_event_payloads project_idfk-nullable

Nullable foreign key

push_event_payloads.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1307push_rules created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE push_rules ALTER COLUMN created_at TYPE timestamptz;
F1308push_rules updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE push_rules ALTER COLUMN updated_at TYPE timestamptz;
F604push_rules project_idfk-nullable

Nullable foreign key

push_rules.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1309redirect_routes created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE redirect_routes ALTER COLUMN created_at TYPE timestamptz;
F1310redirect_routes updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE redirect_routes ALTER COLUMN updated_at TYPE timestamptz;
F605redirect_routes namespace_idfk-nullable

Nullable foreign key

redirect_routes.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1040related_epic_links group_id, issue_link_idexclusive-arc

Either/or foreign keys without a CHECK

related_epic_links has several nullable FKs (group_id, issue_link_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE related_epic_links ADD CONSTRAINT related_epic_links_one_target CHECK ((group_id IS NOT NULL)::int + (issue_link_id IS NOT NULL)::int = 1);
F606related_epic_links group_idfk-nullable

Nullable foreign key

related_epic_links.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F607related_epic_links issue_link_idfk-nullable

Nullable foreign key

related_epic_links.issue_link_id may be NULL, so the relationship to issue_links is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F608release_links project_idfk-nullable

Nullable foreign key

release_links.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1041releases project_id, author_idexclusive-arc

Either/or foreign keys without a CHECK

releases has several nullable FKs (project_id, author_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE releases ADD CONSTRAINT releases_one_target CHECK ((project_id IS NOT NULL)::int + (author_id IS NOT NULL)::int = 1);
F1311releases created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE releases ALTER COLUMN created_at TYPE timestamptz;
F1312releases updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE releases ALTER COLUMN updated_at TYPE timestamptz;
F609releases project_idfk-nullable

Nullable foreign key

releases.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F610releases author_idfk-nullable

Nullable foreign key

releases.author_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1313remote_mirrors last_update_attimestamp-tz

TIMESTAMP without time zone

last_update_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE remote_mirrors ALTER COLUMN last_update_at TYPE timestamptz;
F1314remote_mirrors last_successful_update_attimestamp-tz

TIMESTAMP without time zone

last_successful_update_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE remote_mirrors ALTER COLUMN last_successful_update_at TYPE timestamptz;
F1315remote_mirrors created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE remote_mirrors ALTER COLUMN created_at TYPE timestamptz;
F1316remote_mirrors updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE remote_mirrors ALTER COLUMN updated_at TYPE timestamptz;
F1317remote_mirrors last_update_started_attimestamp-tz

TIMESTAMP without time zone

last_update_started_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE remote_mirrors ALTER COLUMN last_update_started_at TYPE timestamptz;
F611remote_mirrors project_idfk-nullable

Nullable foreign key

remote_mirrors.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F612required_code_owners_sections protected_branch_project_idfk-nullable

Nullable foreign key

required_code_owners_sections.protected_branch_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F613required_code_owners_sections protected_branch_namespace_idfk-nullable

Nullable foreign key

required_code_owners_sections.protected_branch_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F614requirements issue_idfk-nullable

Nullable foreign key

requirements.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1042requirements_management_test_reports project_id, issue_id, author_idexclusive-arc

Either/or foreign keys without a CHECK

requirements_management_test_reports has several nullable FKs (project_id, issue_id, author_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE requirements_management_test_reports ADD CONSTRAINT requirements_management_test_reports_one_target CHECK ((project_id IS NOT NULL)::int + (issue_id IS NOT NULL)::int + (author_id IS NOT NULL)::int = 1);
F615requirements_management_test_reports project_idfk-nullable

Nullable foreign key

requirements_management_test_reports.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F616requirements_management_test_reports issue_idfk-nullable

Nullable foreign key

requirements_management_test_reports.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F617requirements_management_test_reports author_idfk-nullable

Nullable foreign key

requirements_management_test_reports.author_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1043resource_iteration_events triggered_by_id, merge_request_id, issue_id, iteration_idexclusive-arc

Either/or foreign keys without a CHECK

resource_iteration_events has several nullable FKs (triggered_by_id, merge_request_id, issue_id, iteration_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE resource_iteration_events ADD CONSTRAINT resource_iteration_events_one_target CHECK ((triggered_by_id IS NOT NULL)::int + (merge_request_id IS NOT NULL)::int + (issue_id IS NOT NULL)::int + (iteration_id IS NOT NULL)::int = 1);
F618resource_iteration_events triggered_by_idfk-nullable

Nullable foreign key

resource_iteration_events.triggered_by_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F619resource_iteration_events merge_request_idfk-nullable

Nullable foreign key

resource_iteration_events.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F620resource_iteration_events issue_idfk-nullable

Nullable foreign key

resource_iteration_events.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F621resource_iteration_events iteration_idfk-nullable

Nullable foreign key

resource_iteration_events.iteration_id may be NULL, so the relationship to sprints is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1044resource_label_events issue_id, epic_id, merge_request_id, label_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

resource_label_events has several nullable FKs (issue_id, epic_id, merge_request_id, label_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE resource_label_events ADD CONSTRAINT resource_label_events_one_target CHECK ((issue_id IS NOT NULL)::int + (epic_id IS NOT NULL)::int + (merge_request_id IS NOT NULL)::int + (label_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F622resource_label_events issue_idfk-nullable

Nullable foreign key

resource_label_events.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F623resource_label_events epic_idfk-nullable

Nullable foreign key

resource_label_events.epic_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F624resource_label_events merge_request_idfk-nullable

Nullable foreign key

resource_label_events.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F625resource_label_events label_idfk-nullable

Nullable foreign key

resource_label_events.label_id may be NULL, so the relationship to labels is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F626resource_label_events user_idfk-nullable

Nullable foreign key

resource_label_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1045resource_link_events system_note_metadata_id, namespace_idexclusive-arc

Either/or foreign keys without a CHECK

resource_link_events has several nullable FKs (system_note_metadata_id, namespace_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE resource_link_events ADD CONSTRAINT resource_link_events_one_target CHECK ((system_note_metadata_id IS NOT NULL)::int + (namespace_id IS NOT NULL)::int = 1);
F627resource_link_events system_note_metadata_idfk-nullable

Nullable foreign key

resource_link_events.system_note_metadata_id may be NULL, so the relationship to system_note_metadata is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F628resource_link_events namespace_idfk-nullable

Nullable foreign key

resource_link_events.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1046resource_milestone_events merge_request_id, issue_id, milestone_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

resource_milestone_events has several nullable FKs (merge_request_id, issue_id, milestone_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE resource_milestone_events ADD CONSTRAINT resource_milestone_events_one_target CHECK ((merge_request_id IS NOT NULL)::int + (issue_id IS NOT NULL)::int + (milestone_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F629resource_milestone_events merge_request_idfk-nullable

Nullable foreign key

resource_milestone_events.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F630resource_milestone_events issue_idfk-nullable

Nullable foreign key

resource_milestone_events.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F631resource_milestone_events milestone_idfk-nullable

Nullable foreign key

resource_milestone_events.milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F632resource_milestone_events user_idfk-nullable

Nullable foreign key

resource_milestone_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1047resource_state_events issue_id, merge_request_id, source_merge_request_id, epic_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

resource_state_events has several nullable FKs (issue_id, merge_request_id, source_merge_request_id, epic_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE resource_state_events ADD CONSTRAINT resource_state_events_one_target CHECK ((issue_id IS NOT NULL)::int + (merge_request_id IS NOT NULL)::int + (source_merge_request_id IS NOT NULL)::int + (epic_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F633resource_state_events issue_idfk-nullable

Nullable foreign key

resource_state_events.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F634resource_state_events merge_request_idfk-nullable

Nullable foreign key

resource_state_events.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F635resource_state_events source_merge_request_idfk-nullable

Nullable foreign key

resource_state_events.source_merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F636resource_state_events epic_idfk-nullable

Nullable foreign key

resource_state_events.epic_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F637resource_state_events user_idfk-nullable

Nullable foreign key

resource_state_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1048resource_weight_events namespace_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

resource_weight_events has several nullable FKs (namespace_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE resource_weight_events ADD CONSTRAINT resource_weight_events_one_target CHECK ((namespace_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F638resource_weight_events namespace_idfk-nullable

Nullable foreign key

resource_weight_events.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F639resource_weight_events user_idfk-nullable

Nullable foreign key

resource_weight_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F640reviews author_idfk-nullable

Nullable foreign key

reviews.author_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1198routes created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE routes ALTER COLUMN created_at TYPE timestamptz;
F1199routes updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE routes ALTER COLUMN updated_at TYPE timestamptz;
F345routes namespace_idfk-nullable

Nullable foreign key

routes.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F641saml_group_links member_role_idfk-nullable

Nullable foreign key

saml_group_links.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F642saml_providers member_role_idfk-nullable

Nullable foreign key

saml_providers.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1049saved_views created_by_id, updated_by_idexclusive-arc

Either/or foreign keys without a CHECK

saved_views has several nullable FKs (created_by_id, updated_by_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE saved_views ADD CONSTRAINT saved_views_one_target CHECK ((created_by_id IS NOT NULL)::int + (updated_by_id IS NOT NULL)::int = 1);
F643saved_views created_by_idfk-nullable

Nullable foreign key

saved_views.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F644saved_views updated_by_idfk-nullable

Nullable foreign key

saved_views.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1050sbom_occurrences component_version_id, source_package_id, source_idexclusive-arc

Either/or foreign keys without a CHECK

sbom_occurrences has several nullable FKs (component_version_id, source_package_id, source_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE sbom_occurrences ADD CONSTRAINT sbom_occurrences_one_target CHECK ((component_version_id IS NOT NULL)::int + (source_package_id IS NOT NULL)::int + (source_id IS NOT NULL)::int = 1);
F645sbom_occurrences component_version_idfk-nullable

Nullable foreign key

sbom_occurrences.component_version_id may be NULL, so the relationship to sbom_component_versions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F646sbom_occurrences source_package_idfk-nullable

Nullable foreign key

sbom_occurrences.source_package_id may be NULL, so the relationship to sbom_source_packages is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F647sbom_occurrences source_idfk-nullable

Nullable foreign key

sbom_occurrences.source_id may be NULL, so the relationship to sbom_sources is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F648sbom_occurrences_vulnerabilities sbom_occurrence_ref_idfk-nullable

Nullable foreign key

sbom_occurrences_vulnerabilities.sbom_occurrence_ref_id may be NULL, so the relationship to sbom_occurrence_refs is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F649sbom_vulnerability_scans sbom_vulnerability_scan_result_idfk-nullable

Nullable foreign key

sbom_vulnerability_scans.sbom_vulnerability_scan_result_id may be NULL, so the relationship to sbom_vulnerability_scan_results is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1051scan_result_policies approval_policy_rule_id, project_id, namespace_idexclusive-arc

Either/or foreign keys without a CHECK

scan_result_policies has several nullable FKs (approval_policy_rule_id, project_id, namespace_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE scan_result_policies ADD CONSTRAINT scan_result_policies_one_target CHECK ((approval_policy_rule_id IS NOT NULL)::int + (project_id IS NOT NULL)::int + (namespace_id IS NOT NULL)::int = 1);
F650scan_result_policies approval_policy_rule_idfk-nullable

Nullable foreign key

scan_result_policies.approval_policy_rule_id may be NULL, so the relationship to approval_policy_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F651scan_result_policies project_idfk-nullable

Nullable foreign key

scan_result_policies.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F652scan_result_policies namespace_idfk-nullable

Nullable foreign key

scan_result_policies.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F653scan_result_policy_violations approval_policy_rule_idfk-nullable

Nullable foreign key

scan_result_policy_violations.approval_policy_rule_id may be NULL, so the relationship to approval_policy_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F654scan_result_policy_violations scan_result_policy_idfk-nullable

Nullable foreign key

scan_result_policy_violations.scan_result_policy_id may be NULL, so the relationship to scan_result_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1824schema_migrationsorphan-table

Isolated table

schema_migrations references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F655scim_identities group_idfk-nullable

Nullable foreign key

scim_identities.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1052scim_oauth_access_tokens organization_id, group_idexclusive-arc

Either/or foreign keys without a CHECK

scim_oauth_access_tokens has several nullable FKs (organization_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE scim_oauth_access_tokens ADD CONSTRAINT scim_oauth_access_tokens_one_target CHECK ((organization_id IS NOT NULL)::int + (group_id IS NOT NULL)::int = 1);
F656scim_oauth_access_tokens organization_idfk-nullable

Nullable foreign key

scim_oauth_access_tokens.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F657scim_oauth_access_tokens group_idfk-nullable

Nullable foreign key

scim_oauth_access_tokens.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

secrets_management_recovery_keys references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F658security_finding_enrichments vulnerability_idfk-nullable

Nullable foreign key

security_finding_enrichments.vulnerability_id may be NULL, so the relationship to vulnerabilities is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

security_finding_token_statuses references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

security_inventory_filters references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Nullable foreign key

security_orchestration_policy_configurations.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

security_orchestration_policy_configurations.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1053security_orchestration_policy_rule_schedules namespace_id, project_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

security_orchestration_policy_rule_schedules has several nullable FKs (namespace_id, project_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE security_orchestration_policy_rule_schedules ADD CONSTRAINT security_orchestration_policy_rule_schedules_one_target CHECK ((namespace_id IS NOT NULL)::int + (project_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);

Nullable foreign key

security_orchestration_policy_rule_schedules.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

security_orchestration_policy_rule_schedules.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

security_orchestration_policy_rule_schedules.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1054security_policy_dismissals security_policy_id, user_idexclusive-arc

Either/or foreign keys without a CHECK

security_policy_dismissals has several nullable FKs (security_policy_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE security_policy_dismissals ADD CONSTRAINT security_policy_dismissals_one_target CHECK ((security_policy_id IS NOT NULL)::int + (user_id IS NOT NULL)::int = 1);
F664security_policy_dismissals security_policy_idfk-nullable

Nullable foreign key

security_policy_dismissals.security_policy_id may be NULL, so the relationship to security_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F665security_policy_dismissals user_idfk-nullable

Nullable foreign key

security_policy_dismissals.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F666security_policy_settings csp_namespace_idfk-nullable

Nullable foreign key

security_policy_settings.csp_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F667security_scan_profile_triggers security_scan_profile_configuration_idfk-nullable

Nullable foreign key

security_scan_profile_triggers.security_scan_profile_configuration_id may be NULL, so the relationship to security_scan_profile_configurations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F668sentry_issues namespace_idfk-nullable

Nullable foreign key

sentry_issues.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1828service_access_tokensorphan-table

Isolated table

service_access_tokens references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F669service_desk_custom_email_verifications triggerer_idfk-nullable

Nullable foreign key

service_desk_custom_email_verifications.triggerer_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F670service_desk_settings file_template_project_idfk-nullable

Nullable foreign key

service_desk_settings.file_template_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F671slack_api_scopes organization_idfk-nullable

Nullable foreign key

slack_api_scopes.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1055slack_integrations project_id, group_id, integration_id, organization_idexclusive-arc

Either/or foreign keys without a CHECK

slack_integrations has several nullable FKs (project_id, group_id, integration_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE slack_integrations ADD CONSTRAINT slack_integrations_one_target CHECK ((project_id IS NOT NULL)::int + (group_id IS NOT NULL)::int + (integration_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int = 1);
F1318slack_integrations created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE slack_integrations ALTER COLUMN created_at TYPE timestamptz;
F1319slack_integrations updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE slack_integrations ALTER COLUMN updated_at TYPE timestamptz;
F672slack_integrations project_idfk-nullable

Nullable foreign key

slack_integrations.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F673slack_integrations group_idfk-nullable

Nullable foreign key

slack_integrations.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F674slack_integrations integration_idfk-nullable

Nullable foreign key

slack_integrations.integration_id may be NULL, so the relationship to integrations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F675slack_integrations organization_idfk-nullable

Nullable foreign key

slack_integrations.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F676slack_integrations_scopes organization_idfk-nullable

Nullable foreign key

slack_integrations_scopes.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F677slack_integrations_scopes group_idfk-nullable

Nullable foreign key

slack_integrations_scopes.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F678slack_integrations_scopes project_idfk-nullable

Nullable foreign key

slack_integrations_scopes.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F553snippet_repositories snippet_organization_idfk-nullable

Nullable foreign key

snippet_repositories.snippet_organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F554snippet_repositories snippet_project_idfk-nullable

Nullable foreign key

snippet_repositories.snippet_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F679snippet_repository_states snippet_organization_idfk-nullable

Nullable foreign key

snippet_repository_states.snippet_organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F680snippet_repository_states snippet_project_idfk-nullable

Nullable foreign key

snippet_repository_states.snippet_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F681snippet_repository_storage_moves snippet_project_idfk-nullable

Nullable foreign key

snippet_repository_storage_moves.snippet_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F682snippet_repository_storage_moves snippet_organization_idfk-nullable

Nullable foreign key

snippet_repository_storage_moves.snippet_organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F683snippet_statistics snippet_organization_idfk-nullable

Nullable foreign key

snippet_statistics.snippet_organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F684snippet_statistics snippet_project_idfk-nullable

Nullable foreign key

snippet_statistics.snippet_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1320snippet_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE snippet_uploads ALTER COLUMN created_at TYPE timestamptz;
F1056snippet_user_mentions snippet_project_id, snippet_organization_id, note_idexclusive-arc

Either/or foreign keys without a CHECK

snippet_user_mentions has several nullable FKs (snippet_project_id, snippet_organization_id, note_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE snippet_user_mentions ADD CONSTRAINT snippet_user_mentions_one_target CHECK ((snippet_project_id IS NOT NULL)::int + (snippet_organization_id IS NOT NULL)::int + (note_id IS NOT NULL)::int = 1);
F685snippet_user_mentions snippet_project_idfk-nullable

Nullable foreign key

snippet_user_mentions.snippet_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F686snippet_user_mentions snippet_organization_idfk-nullable

Nullable foreign key

snippet_user_mentions.snippet_organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F687snippet_user_mentions note_idfk-nullable

Nullable foreign key

snippet_user_mentions.note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1280snippets created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE snippets ALTER COLUMN created_at TYPE timestamptz;
F1281snippets updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE snippets ALTER COLUMN updated_at TYPE timestamptz;
F555snippets project_idfk-nullable

Nullable foreign key

snippets.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1057software_license_policies custom_software_license_id, approval_policy_rule_id, scan_result_policy_idexclusive-arc

Either/or foreign keys without a CHECK

software_license_policies has several nullable FKs (custom_software_license_id, approval_policy_rule_id, scan_result_policy_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE software_license_policies ADD CONSTRAINT software_license_policies_one_target CHECK ((custom_software_license_id IS NOT NULL)::int + (approval_policy_rule_id IS NOT NULL)::int + (scan_result_policy_id IS NOT NULL)::int = 1);
F688software_license_policies custom_software_license_idfk-nullable

Nullable foreign key

software_license_policies.custom_software_license_id may be NULL, so the relationship to custom_software_licenses is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F689software_license_policies approval_policy_rule_idfk-nullable

Nullable foreign key

software_license_policies.approval_policy_rule_id may be NULL, so the relationship to approval_policy_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F690software_license_policies scan_result_policy_idfk-nullable

Nullable foreign key

software_license_policies.scan_result_policy_id may be NULL, so the relationship to scan_result_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1058spam_logs user_id, organization_idexclusive-arc

Either/or foreign keys without a CHECK

spam_logs has several nullable FKs (user_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE spam_logs ADD CONSTRAINT spam_logs_one_target CHECK ((user_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int = 1);
F1321spam_logs created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE spam_logs ALTER COLUMN created_at TYPE timestamptz;
F1322spam_logs updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE spam_logs ALTER COLUMN updated_at TYPE timestamptz;
F691spam_logs user_idfk-nullable

Nullable foreign key

spam_logs.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F692spam_logs organization_idfk-nullable

Nullable foreign key

spam_logs.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1059sprints iterations_cadence_id, group_idexclusive-arc

Either/or foreign keys without a CHECK

sprints has several nullable FKs (iterations_cadence_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE sprints ADD CONSTRAINT sprints_one_target CHECK ((iterations_cadence_id IS NOT NULL)::int + (group_id IS NOT NULL)::int = 1);
F693sprints iterations_cadence_idfk-nullable

Nullable foreign key

sprints.iterations_cadence_id may be NULL, so the relationship to iterations_cadences is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F694sprints group_idfk-nullable

Nullable foreign key

sprints.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1060ssh_signatures user_id, key_idexclusive-arc

Either/or foreign keys without a CHECK

ssh_signatures has several nullable FKs (user_id, key_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE ssh_signatures ADD CONSTRAINT ssh_signatures_one_target CHECK ((user_id IS NOT NULL)::int + (key_id IS NOT NULL)::int = 1);
F695ssh_signatures user_idfk-nullable

Nullable foreign key

ssh_signatures.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F696ssh_signatures key_idfk-nullable

Nullable foreign key

ssh_signatures.key_id may be NULL, so the relationship to keys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F697status_check_responses project_idfk-nullable

Nullable foreign key

status_check_responses.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F698status_page_published_incidents namespace_idfk-nullable

Nullable foreign key

status_page_published_incidents.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F699subscription_add_on_purchases namespace_idfk-nullable

Nullable foreign key

subscription_add_on_purchases.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F700subscription_seat_assignments namespace_idfk-nullable

Nullable foreign key

subscription_seat_assignments.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F701subscription_user_add_on_assignments organization_idfk-nullable

Nullable foreign key

subscription_user_add_on_assignments.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1061subscriptions user_id, project_idexclusive-arc

Either/or foreign keys without a CHECK

subscriptions has several nullable FKs (user_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE subscriptions ADD CONSTRAINT subscriptions_one_target CHECK ((user_id IS NOT NULL)::int + (project_id IS NOT NULL)::int = 1);
F1323subscriptions created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE subscriptions ALTER COLUMN created_at TYPE timestamptz;
F1324subscriptions updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE subscriptions ALTER COLUMN updated_at TYPE timestamptz;
F702subscriptions user_idfk-nullable

Nullable foreign key

subscriptions.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F703subscriptions project_idfk-nullable

Nullable foreign key

subscriptions.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F704suggestions namespace_idfk-nullable

Nullable foreign key

suggestions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F705supply_chain_attestation_states project_idfk-nullable

Nullable foreign key

supply_chain_attestation_states.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F706system_access_group_microsoft_graph_access_tokens system_access_group_microsoft_application_idfk-nullable

Nullable foreign key

system_access_group_microsoft_graph_access_tokens.system_access_group_microsoft_application_id may be NULL, so the relationship to system_access_group_microsoft_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F707system_access_microsoft_applications namespace_idfk-nullable

Nullable foreign key

system_access_microsoft_applications.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F708system_access_microsoft_graph_access_tokens system_access_microsoft_application_idfk-nullable

Nullable foreign key

system_access_microsoft_graph_access_tokens.system_access_microsoft_application_id may be NULL, so the relationship to system_access_microsoft_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1062system_note_metadata namespace_id, description_version_idexclusive-arc

Either/or foreign keys without a CHECK

system_note_metadata has several nullable FKs (namespace_id, description_version_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE system_note_metadata ADD CONSTRAINT system_note_metadata_one_target CHECK ((namespace_id IS NOT NULL)::int + (description_version_id IS NOT NULL)::int = 1);
F1325system_note_metadata created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE system_note_metadata ALTER COLUMN created_at TYPE timestamptz;
F1326system_note_metadata updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE system_note_metadata ALTER COLUMN updated_at TYPE timestamptz;
F709system_note_metadata namespace_idfk-nullable

Nullable foreign key

system_note_metadata.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F710system_note_metadata description_version_idfk-nullable

Nullable foreign key

system_note_metadata.description_version_id may be NULL, so the relationship to description_versions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1063tag_gpg_signatures gpg_key_subkey_id, gpg_key_idexclusive-arc

Either/or foreign keys without a CHECK

tag_gpg_signatures has several nullable FKs (gpg_key_subkey_id, gpg_key_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE tag_gpg_signatures ADD CONSTRAINT tag_gpg_signatures_one_target CHECK ((gpg_key_subkey_id IS NOT NULL)::int + (gpg_key_id IS NOT NULL)::int = 1);
F711tag_gpg_signatures gpg_key_subkey_idfk-nullable

Nullable foreign key

tag_gpg_signatures.gpg_key_subkey_id may be NULL, so the relationship to gpg_key_subkeys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F712tag_gpg_signatures gpg_key_idfk-nullable

Nullable foreign key

tag_gpg_signatures.gpg_key_id may be NULL, so the relationship to gpg_keys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F713tag_ssh_signatures key_idfk-nullable

Nullable foreign key

tag_ssh_signatures.key_id may be NULL, so the relationship to keys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1829tagsorphan-table

Isolated table

tags references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

terraform_state_version_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1064terraform_state_versions project_id, created_by_user_idexclusive-arc

Either/or foreign keys without a CHECK

terraform_state_versions has several nullable FKs (project_id, created_by_user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE terraform_state_versions ADD CONSTRAINT terraform_state_versions_one_target CHECK ((project_id IS NOT NULL)::int + (created_by_user_id IS NOT NULL)::int = 1);
F714terraform_state_versions project_idfk-nullable

Nullable foreign key

terraform_state_versions.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F715terraform_state_versions created_by_user_idfk-nullable

Nullable foreign key

terraform_state_versions.created_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F716terraform_states locked_by_user_idfk-nullable

Nullable foreign key

terraform_states.locked_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1065timelogs project_id, timelog_category_id, issue_id, merge_request_id, note_idexclusive-arc

Either/or foreign keys without a CHECK

timelogs has several nullable FKs (project_id, timelog_category_id, issue_id, merge_request_id, note_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE timelogs ADD CONSTRAINT timelogs_one_target CHECK ((project_id IS NOT NULL)::int + (timelog_category_id IS NOT NULL)::int + (issue_id IS NOT NULL)::int + (merge_request_id IS NOT NULL)::int + (note_id IS NOT NULL)::int = 1);
F1327timelogs created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE timelogs ALTER COLUMN created_at TYPE timestamptz;
F1328timelogs updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE timelogs ALTER COLUMN updated_at TYPE timestamptz;
F1329timelogs spent_attimestamp-tz

TIMESTAMP without time zone

spent_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE timelogs ALTER COLUMN spent_at TYPE timestamptz;
F717timelogs project_idfk-nullable

Nullable foreign key

timelogs.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F718timelogs timelog_category_idfk-nullable

Nullable foreign key

timelogs.timelog_category_id may be NULL, so the relationship to timelog_categories is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F719timelogs issue_idfk-nullable

Nullable foreign key

timelogs.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F720timelogs merge_request_idfk-nullable

Nullable foreign key

timelogs.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F721timelogs note_idfk-nullable

Nullable foreign key

timelogs.note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1066todos project_id, organization_id, note_id, group_idexclusive-arc

Either/or foreign keys without a CHECK

todos has several nullable FKs (project_id, organization_id, note_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE todos ADD CONSTRAINT todos_one_target CHECK ((project_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int + (note_id IS NOT NULL)::int + (group_id IS NOT NULL)::int = 1);
F1330todos created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE todos ALTER COLUMN created_at TYPE timestamptz;
F1331todos updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE todos ALTER COLUMN updated_at TYPE timestamptz;
F722todos project_idfk-nullable

Nullable foreign key

todos.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F723todos organization_idfk-nullable

Nullable foreign key

todos.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F724todos note_idfk-nullable

Nullable foreign key

todos.note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F725todos group_idfk-nullable

Nullable foreign key

todos.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F726upcoming_reconciliations namespace_idfk-nullable

Nullable foreign key

upcoming_reconciliations.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1831upload_statesorphan-table

Isolated table

upload_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F055uploads uploaded_by_user_idfk-nullable

Nullable foreign key

uploads.uploaded_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F056uploads project_idfk-nullable

Nullable foreign key

uploads.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F057uploads namespace_idfk-nullable

Nullable foreign key

uploads.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F058uploads organization_idfk-nullable

Nullable foreign key

uploads.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1122uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE uploads ALTER COLUMN created_at TYPE timestamptz;
F948uploads uploaded_by_user_id, project_id, namespace_id, organization_idexclusive-arc

Either/or foreign keys without a CHECK

uploads has several nullable FKs (uploaded_by_user_id, project_id, namespace_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE uploads ADD CONSTRAINT uploads_one_target CHECK ((uploaded_by_user_id IS NOT NULL)::int + (project_id IS NOT NULL)::int + (namespace_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int = 1);
F1067user_achievements namespace_id, awarded_by_user_id, revoked_by_user_idexclusive-arc

Either/or foreign keys without a CHECK

user_achievements has several nullable FKs (namespace_id, awarded_by_user_id, revoked_by_user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE user_achievements ADD CONSTRAINT user_achievements_one_target CHECK ((namespace_id IS NOT NULL)::int + (awarded_by_user_id IS NOT NULL)::int + (revoked_by_user_id IS NOT NULL)::int = 1);
F727user_achievements namespace_idfk-nullable

Nullable foreign key

user_achievements.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F728user_achievements awarded_by_user_idfk-nullable

Nullable foreign key

user_achievements.awarded_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F729user_achievements revoked_by_user_idfk-nullable

Nullable foreign key

user_achievements.revoked_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1332user_agent_details created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE user_agent_details ALTER COLUMN created_at TYPE timestamptz;
F1333user_agent_details updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE user_agent_details ALTER COLUMN updated_at TYPE timestamptz;
F730user_agent_details organization_idfk-nullable

Nullable foreign key

user_agent_details.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1399user_audit_eventsorphan-table

Isolated table

user_audit_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1334user_custom_attributes created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE user_custom_attributes ALTER COLUMN created_at TYPE timestamptz;
F1335user_custom_attributes updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE user_custom_attributes ALTER COLUMN updated_at TYPE timestamptz;
F1866user_detailswide-table

Wide table (30 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F731user_details bot_namespace_idfk-nullable

Nullable foreign key

user_details.bot_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F732user_group_member_roles shared_with_group_idfk-nullable

Nullable foreign key

user_group_member_roles.shared_with_group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1336user_permission_export_upload_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE user_permission_export_upload_uploads ALTER COLUMN created_at TYPE timestamptz;
F1068user_preferences default_duo_add_on_assignment_id, duo_default_namespace_id, knowledge_graph_governing_namespace_idexclusive-arc

Either/or foreign keys without a CHECK

user_preferences has several nullable FKs (default_duo_add_on_assignment_id, duo_default_namespace_id, knowledge_graph_governing_namespace_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE user_preferences ADD CONSTRAINT user_preferences_one_target CHECK ((default_duo_add_on_assignment_id IS NOT NULL)::int + (duo_default_namespace_id IS NOT NULL)::int + (knowledge_graph_governing_namespace_id IS NOT NULL)::int = 1);
F1867user_preferenceswide-table

Wide table (58 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F733user_preferences default_duo_add_on_assignment_idfk-nullable

Nullable foreign key

user_preferences.default_duo_add_on_assignment_id may be NULL, so the relationship to subscription_user_add_on_assignments is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F734user_preferences duo_default_namespace_idfk-nullable

Nullable foreign key

user_preferences.duo_default_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F735user_preferences knowledge_graph_governing_namespace_idfk-nullable

Nullable foreign key

user_preferences.knowledge_graph_governing_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F736user_project_member_roles shared_with_group_idfk-nullable

Nullable foreign key

user_project_member_roles.shared_with_group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1337user_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE user_uploads ALTER COLUMN created_at TYPE timestamptz;
F1088users reset_password_sent_attimestamp-tz

TIMESTAMP without time zone

reset_password_sent_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users ALTER COLUMN reset_password_sent_at TYPE timestamptz;
F1089users remember_created_attimestamp-tz

TIMESTAMP without time zone

remember_created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users ALTER COLUMN remember_created_at TYPE timestamptz;
F1090users current_sign_in_attimestamp-tz

TIMESTAMP without time zone

current_sign_in_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users ALTER COLUMN current_sign_in_at TYPE timestamptz;
F1091users last_sign_in_attimestamp-tz

TIMESTAMP without time zone

last_sign_in_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users ALTER COLUMN last_sign_in_at TYPE timestamptz;
F1092users created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users ALTER COLUMN created_at TYPE timestamptz;
F1093users updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users ALTER COLUMN updated_at TYPE timestamptz;
F1094users locked_attimestamp-tz

TIMESTAMP without time zone

locked_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users ALTER COLUMN locked_at TYPE timestamptz;
F1095users password_expires_attimestamp-tz

TIMESTAMP without time zone

password_expires_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users ALTER COLUMN password_expires_at TYPE timestamptz;
F1096users last_credential_check_attimestamp-tz

TIMESTAMP without time zone

last_credential_check_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users ALTER COLUMN last_credential_check_at TYPE timestamptz;
F1097users confirmed_attimestamp-tz

TIMESTAMP without time zone

confirmed_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users ALTER COLUMN confirmed_at TYPE timestamptz;
F1098users confirmation_sent_attimestamp-tz

TIMESTAMP without time zone

confirmation_sent_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users ALTER COLUMN confirmation_sent_at TYPE timestamptz;
F1099users admin_email_unsubscribed_attimestamp-tz

TIMESTAMP without time zone

admin_email_unsubscribed_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users ALTER COLUMN admin_email_unsubscribed_at TYPE timestamptz;
F1100users otp_grace_period_started_attimestamp-tz

TIMESTAMP without time zone

otp_grace_period_started_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users ALTER COLUMN otp_grace_period_started_at TYPE timestamptz;
F1846usersblast-radius

Hub table: referenced by 201 tables

Any change to its key, its delete semantics, or its partitioning touches every dependent. Migrations on hub tables need the longest lock windows and the most careful rollout.

Fix Treat schema changes here as breaking changes with a written rollout plan.

F1849userswide-table

Wide table (78 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F1338users_star_projects created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users_star_projects ALTER COLUMN created_at TYPE timestamptz;
F1339users_star_projects updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE users_star_projects ALTER COLUMN updated_at TYPE timestamptz;
F1832users_statisticsorphan-table

Isolated table

users_statistics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

value_stream_dashboard_counts references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1401verification_codesorphan-table

Isolated table

verification_codes references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_entries_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_container_cache_remote_entries_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_entries_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_local_entries_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_maven_cache_remote_entries_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Nullable foreign key

virtual_registries_packages_maven_registry_upstreams.upstream_id may be NULL, so the relationship to virtual_registries_packages_maven_upstreams is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Nullable foreign key

virtual_registries_packages_maven_registry_upstreams.local_upstream_id may be NULL, so the relationship to virtual_registries_packages_maven_local_upstreams is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

virtual_registries_packages_npm_cache_local_entries_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_local_entries_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

virtual_registries_packages_npm_cache_remote_entries_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F739vulnerabilities finding_idfk-nullable

Nullable foreign key

vulnerabilities.finding_id may be NULL, so the relationship to vulnerability_occurrences is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1340vulnerability_archive_export_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE vulnerability_archive_export_uploads ALTER COLUMN created_at TYPE timestamptz;

Isolated table

vulnerability_archive_exports references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

vulnerability_archived_records references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1404vulnerability_archivesorphan-table

Isolated table

vulnerability_archives references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1341vulnerability_export_part_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE vulnerability_export_part_uploads ALTER COLUMN created_at TYPE timestamptz;
F1342vulnerability_export_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE vulnerability_export_uploads ALTER COLUMN created_at TYPE timestamptz;
F740vulnerability_external_issue_links vulnerability_occurrence_idfk-nullable

Nullable foreign key

vulnerability_external_issue_links.vulnerability_occurrence_id may be NULL, so the relationship to vulnerability_occurrences is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1833vulnerability_feedbackorphan-table

Isolated table

vulnerability_feedback references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1069vulnerability_findings_remediations vulnerability_occurrence_id, vulnerability_remediation_idexclusive-arc

Either/or foreign keys without a CHECK

vulnerability_findings_remediations has several nullable FKs (vulnerability_occurrence_id, vulnerability_remediation_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE vulnerability_findings_remediations ADD CONSTRAINT vulnerability_findings_remediations_one_target CHECK ((vulnerability_occurrence_id IS NOT NULL)::int + (vulnerability_remediation_id IS NOT NULL)::int = 1);
F741vulnerability_findings_remediations vulnerability_occurrence_idfk-nullable

Nullable foreign key

vulnerability_findings_remediations.vulnerability_occurrence_id may be NULL, so the relationship to vulnerability_occurrences is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F742vulnerability_findings_remediations vulnerability_remediation_idfk-nullable

Nullable foreign key

vulnerability_findings_remediations.vulnerability_remediation_id may be NULL, so the relationship to vulnerability_remediations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

Isolated table

vulnerability_historical_statistics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

vulnerability_namespace_historical_statistics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Isolated table

vulnerability_namespace_statistics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F743vulnerability_occurrence_identifiers partition_id, identifier_idfk-nullable

Nullable foreign key

vulnerability_occurrence_identifiers.partition_id.identifier_id may be NULL, so the relationship to vulnerability_identifiers is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F744vulnerability_occurrences vulnerability_idfk-nullable

Nullable foreign key

vulnerability_occurrences.vulnerability_id may be NULL, so the relationship to vulnerabilities is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F745vulnerability_occurrences partition_id, primary_identifier_idfk-nullable

Nullable foreign key

vulnerability_occurrences.partition_id.primary_identifier_id may be NULL, so the relationship to vulnerability_identifiers is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F746vulnerability_reads vulnerability_occurrence_idfk-nullable

Nullable foreign key

vulnerability_reads.vulnerability_occurrence_id may be NULL, so the relationship to vulnerability_occurrences is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1343vulnerability_remediation_uploads created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE vulnerability_remediation_uploads ALTER COLUMN created_at TYPE timestamptz;
F1837vulnerability_statisticsorphan-table

Isolated table

vulnerability_statistics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1120web_hook_logs_daily updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE web_hook_logs_daily ALTER COLUMN updated_at TYPE timestamptz;
F1121web_hook_logs_daily created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE web_hook_logs_daily ALTER COLUMN created_at TYPE timestamptz;
F1405web_hook_logs_dailyorphan-table

Isolated table

web_hook_logs_daily references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F1070web_hooks project_id, integration_id, organization_id, group_idexclusive-arc

Either/or foreign keys without a CHECK

web_hooks has several nullable FKs (project_id, integration_id, organization_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE web_hooks ADD CONSTRAINT web_hooks_one_target CHECK ((project_id IS NOT NULL)::int + (integration_id IS NOT NULL)::int + (organization_id IS NOT NULL)::int + (group_id IS NOT NULL)::int = 1);
F1344web_hooks created_attimestamp-tz

TIMESTAMP without time zone

created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE web_hooks ALTER COLUMN created_at TYPE timestamptz;
F1345web_hooks updated_attimestamp-tz

TIMESTAMP without time zone

updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.

Fix Use TIMESTAMPTZ.

ALTER TABLE web_hooks ALTER COLUMN updated_at TYPE timestamptz;
F1868web_hookswide-table

Wide table (49 columns)

Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.

Fix Look for column groups that always change together and split them out.

F747web_hooks project_idfk-nullable

Nullable foreign key

web_hooks.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F748web_hooks integration_idfk-nullable

Nullable foreign key

web_hooks.integration_id may be NULL, so the relationship to integrations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F749web_hooks organization_idfk-nullable

Nullable foreign key

web_hooks.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F750web_hooks group_idfk-nullable

Nullable foreign key

web_hooks.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F751wiki_page_meta namespace_idfk-nullable

Nullable foreign key

wiki_page_meta.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F752wiki_page_meta project_idfk-nullable

Nullable foreign key

wiki_page_meta.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F753wiki_page_slugs project_idfk-nullable

Nullable foreign key

wiki_page_slugs.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F754wiki_page_slugs namespace_idfk-nullable

Nullable foreign key

wiki_page_slugs.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1838wiki_repository_statesorphan-table

Isolated table

wiki_repository_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

F755work_item_current_statuses custom_status_idfk-nullable

Nullable foreign key

work_item_current_statuses.custom_status_id may be NULL, so the relationship to work_item_custom_statuses is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1071work_item_custom_lifecycles updated_by_id, created_by_idexclusive-arc

Either/or foreign keys without a CHECK

work_item_custom_lifecycles has several nullable FKs (updated_by_id, created_by_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE work_item_custom_lifecycles ADD CONSTRAINT work_item_custom_lifecycles_one_target CHECK ((updated_by_id IS NOT NULL)::int + (created_by_id IS NOT NULL)::int = 1);
F756work_item_custom_lifecycles updated_by_idfk-nullable

Nullable foreign key

work_item_custom_lifecycles.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F757work_item_custom_lifecycles created_by_idfk-nullable

Nullable foreign key

work_item_custom_lifecycles.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1072work_item_custom_statuses updated_by_id, created_by_idexclusive-arc

Either/or foreign keys without a CHECK

work_item_custom_statuses has several nullable FKs (updated_by_id, created_by_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE work_item_custom_statuses ADD CONSTRAINT work_item_custom_statuses_one_target CHECK ((updated_by_id IS NOT NULL)::int + (created_by_id IS NOT NULL)::int = 1);
F758work_item_custom_statuses updated_by_idfk-nullable

Nullable foreign key

work_item_custom_statuses.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F759work_item_custom_statuses created_by_idfk-nullable

Nullable foreign key

work_item_custom_statuses.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F760work_item_custom_types organization_idfk-nullable

Nullable foreign key

work_item_custom_types.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F761work_item_custom_types namespace_idfk-nullable

Nullable foreign key

work_item_custom_types.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1073work_item_dates_sources start_date_sourcing_milestone_id, start_date_sourcing_work_item_id, due_date_sourcing_work_item_id, due_date_sourcing_milestone_idexclusive-arc

Either/or foreign keys without a CHECK

work_item_dates_sources has several nullable FKs (start_date_sourcing_milestone_id, start_date_sourcing_work_item_id, due_date_sourcing_work_item_id, due_date_sourcing_milestone_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE work_item_dates_sources ADD CONSTRAINT work_item_dates_sources_one_target CHECK ((start_date_sourcing_milestone_id IS NOT NULL)::int + (start_date_sourcing_work_item_id IS NOT NULL)::int + (due_date_sourcing_work_item_id IS NOT NULL)::int + (due_date_sourcing_milestone_id IS NOT NULL)::int = 1);
F762work_item_dates_sources start_date_sourcing_milestone_idfk-nullable

Nullable foreign key

work_item_dates_sources.start_date_sourcing_milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F763work_item_dates_sources start_date_sourcing_work_item_idfk-nullable

Nullable foreign key

work_item_dates_sources.start_date_sourcing_work_item_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F764work_item_dates_sources due_date_sourcing_work_item_idfk-nullable

Nullable foreign key

work_item_dates_sources.due_date_sourcing_work_item_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F765work_item_dates_sources due_date_sourcing_milestone_idfk-nullable

Nullable foreign key

work_item_dates_sources.due_date_sourcing_milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F766work_item_parent_links namespace_idfk-nullable

Nullable foreign key

work_item_parent_links.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F767work_item_progresses namespace_idfk-nullable

Nullable foreign key

work_item_progresses.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F768work_item_settings namespace_idfk-nullable

Nullable foreign key

work_item_settings.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F769work_item_settings organization_idfk-nullable

Nullable foreign key

work_item_settings.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1074work_item_transitions promoted_to_epic_id, duplicated_to_id, moved_to_idexclusive-arc

Either/or foreign keys without a CHECK

work_item_transitions has several nullable FKs (promoted_to_epic_id, duplicated_to_id, moved_to_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE work_item_transitions ADD CONSTRAINT work_item_transitions_one_target CHECK ((promoted_to_epic_id IS NOT NULL)::int + (duplicated_to_id IS NOT NULL)::int + (moved_to_id IS NOT NULL)::int = 1);
F770work_item_transitions promoted_to_epic_idfk-nullable

Nullable foreign key

work_item_transitions.promoted_to_epic_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F771work_item_transitions duplicated_to_idfk-nullable

Nullable foreign key

work_item_transitions.duplicated_to_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F772work_item_transitions moved_to_idfk-nullable

Nullable foreign key

work_item_transitions.moved_to_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F773work_item_type_visibility_defaults namespace_idfk-nullable

Nullable foreign key

work_item_type_visibility_defaults.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F774work_item_type_visibility_defaults organization_idfk-nullable

Nullable foreign key

work_item_type_visibility_defaults.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F775workspace_variables project_idfk-nullable

Nullable foreign key

workspace_variables.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F776workspaces personal_access_token_idfk-nullable

Nullable foreign key

workspaces.personal_access_token_id may be NULL, so the relationship to personal_access_tokens is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F777x509_certificates project_idfk-nullable

Nullable foreign key

x509_certificates.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F778x509_issuers project_idfk-nullable

Nullable foreign key

x509_issuers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F779zentao_tracker_data project_idfk-nullable

Nullable foreign key

zentao_tracker_data.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F780zentao_tracker_data group_idfk-nullable

Nullable foreign key

zentao_tracker_data.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F781zentao_tracker_data organization_idfk-nullable

Nullable foreign key

zentao_tracker_data.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1075zoekt_indices zoekt_enabled_namespace_id, zoekt_replica_idexclusive-arc

Either/or foreign keys without a CHECK

zoekt_indices has several nullable FKs (zoekt_enabled_namespace_id, zoekt_replica_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.

Fix Add a CHECK that exactly one is non-null, or restructure with a supertype.

ALTER TABLE zoekt_indices ADD CONSTRAINT zoekt_indices_one_target CHECK ((zoekt_enabled_namespace_id IS NOT NULL)::int + (zoekt_replica_id IS NOT NULL)::int = 1);
F782zoekt_indices zoekt_enabled_namespace_idfk-nullable

Nullable foreign key

zoekt_indices.zoekt_enabled_namespace_id may be NULL, so the relationship to zoekt_enabled_namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F783zoekt_indices zoekt_replica_idfk-nullable

Nullable foreign key

zoekt_indices.zoekt_replica_id may be NULL, so the relationship to zoekt_replicas is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F784zoekt_repositories project_idfk-nullable

Nullable foreign key

zoekt_repositories.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.

Fix Confirm the optionality is a domain rule; document it in the column comment.

F1406zoekt_tasksorphan-table

Isolated table

zoekt_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.

Fix Document its purpose or drop it.

Schema

Schema map: 1429 tables, 1861 foreign keys, 111 domains. Click to open the 3D explorer.namespacesnamespacesnamespaces_consentsnamespaces_storage_limit_exclusionsnamespaces_sync_eventsprojectsprojects_visitsprojectsprojects_sync_eventsprojects_with_pipeline_variablesprojects_branch_rules_merge_request_approval_settingsprojects_branch_rules_squash_optionsusersusers_statisticsusersusers_ops_dashboard_projectsusers_security_dashboard_projectsusers_star_projectsaiai_active_context_connectionsai_audit_eventsai_instance_accessible_entity_rulesai_self_hosted_modelsai_testing_terms_acceptancesai_vectorizable_file_uploadsai_active_context_collectionsai_active_context_migrationsai_active_context_tasksai_conversation_messagesai_events_countsai_feature_settingsai_catalog_mcp_serversai_conversation_threadsai_namespace_feature_access_rulesai_namespace_feature_settingsai_settingsai_usage_eventsai_user_metricsai_agent_identitiesai_catalog_itemsai_catalog_mcp_server_blocksai_catalog_mcp_servers_usersai_tool_rulesai_vectorizable_file_upload_statesai_vectorizable_filesai_catalog_item_consumersai_catalog_item_starsai_catalog_item_versionsai_catalog_item_version_dependenciesai_flow_triggersauditaudit_eventsaudit_events_instance_external_streaming_destinationsaudit_events_instance_amazon_s3_configurationsaudit_events_instance_external_audit_event_destinationsaudit_events_instance_google_cloud_logging_configurationsaudit_events_instance_streaming_event_type_filtersaudit_events_group_external_streaming_destinationsaudit_events_streaming_http_instance_namespace_filtersaudit_events_streaming_instance_event_type_filtersaudit_events_streaming_instance_namespace_filtersaudit_events_amazon_s3_configurationsaudit_events_external_audit_event_destinationsaudit_events_google_cloud_logging_configurationsaudit_events_group_streaming_event_type_filtersaudit_events_streaming_group_namespace_filtersaudit_events_streaming_event_type_filtersaudit_events_streaming_headersaudit_events_streaming_http_group_namespace_filtersbackgroundbackground_operation_jobsbackground_operation_jobs_cell_localbackground_operation_workersbackground_operation_workers_cell_localbackupbackup_finding_evidencesbackup_finding_flagsbackup_finding_identifiersbackup_finding_linksbackup_finding_remediationsbackup_finding_signaturesbackup_findingsbackup_vulnerabilitiesbackup_vulnerability_external_issue_linksbackup_vulnerability_issue_linksbackup_vulnerability_merge_request_linksbackup_vulnerability_readsbackup_vulnerability_severity_overridesbackup_vulnerability_state_transitionsbackup_vulnerability_user_mentionsbatchedbatched_background_migrationsbatched_background_migration_jobsbatched_background_migration_job_transition_logspp_ai_active_context_code_repositoriesp_batched_git_ref_updates_deletionsp_catalog_resource_sync_eventsp_ci_builds_partition_overrides_0p_ci_builds_partition_overrides_1p_ci_builds_partition_overrides_2p_ci_finished_build_ch_sync_eventsp_ci_finished_pipeline_ch_sync_eventsp_ci_job_definitionsp_ci_job_runtime_environmentsp_ci_pipeline_artifact_statesp_ci_pipeline_iidsp_ci_pipeline_iids_00p_ci_pipeline_iids_01p_ci_pipeline_iids_02p_ci_pipeline_iids_03p_ci_pipeline_iids_04p_ci_pipeline_iids_05p_ci_pipeline_iids_06p_ci_pipeline_iids_07p_ci_pipeline_iids_08p_ci_pipeline_iids_09p_ci_pipeline_iids_10p_ci_pipeline_iids_11p_ci_pipeline_iids_12p_ci_pipeline_iids_13p_ci_pipeline_iids_14p_ci_pipeline_iids_15p_ci_pipeline_iids_16p_ci_pipeline_iids_17p_ci_pipeline_iids_18p_ci_pipeline_iids_19p_ci_pipeline_iids_20p_ci_pipeline_iids_21p_ci_pipeline_iids_22p_ci_pipeline_iids_23p_ci_pipeline_iids_24p_ci_pipeline_iids_25p_ci_pipeline_iids_26p_ci_pipeline_iids_27p_ci_pipeline_iids_28p_ci_pipeline_iids_29p_ci_pipeline_iids_30p_ci_pipeline_iids_31p_ci_pipeline_iids_32p_ci_pipeline_iids_33p_ci_pipeline_iids_34p_ci_pipeline_iids_35p_ci_pipeline_iids_36p_ci_pipeline_iids_37p_ci_pipeline_iids_38p_ci_pipeline_iids_39p_ci_pipeline_iids_40p_ci_pipeline_iids_41p_ci_pipeline_iids_42p_ci_pipeline_iids_43p_ci_pipeline_iids_44p_ci_pipeline_iids_45p_ci_pipeline_iids_46p_ci_pipeline_iids_47p_ci_pipeline_iids_48p_ci_pipeline_iids_49p_ci_pipeline_iids_50p_ci_pipeline_iids_51p_ci_pipeline_iids_52p_ci_pipeline_iids_53p_ci_pipeline_iids_54p_ci_pipeline_iids_55p_ci_pipeline_iids_56p_ci_pipeline_iids_57p_ci_pipeline_iids_58p_ci_pipeline_iids_59p_ci_pipeline_iids_60p_ci_pipeline_iids_61p_ci_pipeline_iids_62p_ci_pipeline_iids_63p_ci_runtime_environmentsp_knowledge_graph_code_indexing_tasksp_ci_pipelinesp_ai_active_context_code_enabled_namespacesp_ci_pipeline_variablesp_ci_stagesp_ci_workloadsp_ci_buildsp_ci_workload_variable_inclusionsp_ci_build_namesp_ci_build_needsp_ci_build_sourcesp_ci_builds_partition_overridesp_ci_job_annotationsp_ci_job_artifactsp_ci_job_definition_instancesp_ci_job_inputsp_ci_job_messagesp_ci_runner_machine_buildsp_ci_build_trace_metadatap_ci_job_artifact_reportsp_generated_ref_commitsp_duo_workflows_checkpoint_blobsp_duo_workflows_checkpoint_headersp_duo_workflows_checkpointsp_sent_notificationsgroupgroup_audit_eventsgroup_secrets_manager_maintenance_tasksgroup_security_exclusionsgroup_type_ci_runnersgroup_type_ci_runner_machinesgroup_crm_settingsgroup_custom_attributesgroup_deletion_schedulesgroup_featuresgroup_import_statesgroup_merge_request_approval_settingsgroup_push_rulesgroup_repository_storage_movesgroup_saved_repliesgroup_scim_auth_access_tokensgroup_scim_identitiesgroup_secret_rotation_infosgroup_secrets_managersgroup_ssh_certificatesgroup_upload_statesgroup_wiki_repositoriesgroup_group_linksgroup_wiki_repository_statesgroup_deploy_tokensincidentincident_management_escalation_policiesincident_management_oncall_schedulesincident_management_timeline_event_tagsincident_management_escalation_rulesincident_management_oncall_rotationsincident_management_oncall_participantsincident_management_issuable_escalation_statusesincident_management_oncall_shiftsincident_management_pending_issue_escalationsincident_management_pending_alert_escalationsincident_management_timeline_eventsincident_management_timeline_event_tag_linksinstanceinstance_audit_eventsinstance_model_selection_feature_settingsinstance_type_ci_runnersinstance_type_ci_runner_machinesinstance_audit_events_streaming_headerslooseloose_foreign_keys_deleted_recordsloose_foreign_keys_namespace_deleted_recordsloose_foreign_keys_organization_deleted_recordsloose_foreign_keys_project_deleted_recordsloose_foreign_keys_user_deleted_recordsmergemerge_request_commits_metadatamerge_request_diff_commitsmerge_request_diff_commits_b5377a7a34merge_request_diff_files_99208b8facmerge_request_requested_changesmerge_request_diff_commit_usersmerge_request_saved_viewsmerge_request_diffsmerge_requests_approval_rulesmerge_request_diff_detailsmerge_request_diff_filesmerge_requestsmerge_requests_approval_rules_approver_groupsmerge_requests_approval_rules_approver_usersmerge_requests_approval_rules_groupsmerge_requests_approval_rules_projectsmerge_request_approval_metricsmerge_request_assigneesmerge_request_assignment_eventsmerge_request_blocksmerge_request_cleanup_schedulesmerge_request_context_commitsmerge_request_merge_schedulesmerge_request_metricsmerge_request_predictionsmerge_request_reviewersmerge_requests_approval_rules_merge_requestsmerge_requests_compliance_violationsmerge_requests_merge_datamerge_trainsmerge_request_context_commit_diff_filesmerge_requests_closing_issuesmerge_request_user_mentionsprojectproject_audit_eventsproject_data_transfersproject_import_export_relation_export_upload_uploadsproject_security_exclusionsproject_security_statisticsproject_statesproject_topic_uploadsproject_type_ci_runnersproject_uploadsproject_topic_upload_statesproject_type_ci_runner_machinesproject_to_security_attributesproject_access_tokensproject_alerting_settingsproject_aliasesproject_authorizationsproject_authorizations_for_migrationproject_auto_devopsproject_build_artifacts_size_refreshesproject_ci_cd_settingsproject_ci_feature_usagesproject_compliance_framework_settingsproject_compliance_standards_adherenceproject_custom_attributesproject_daily_statisticsproject_error_tracking_settingsproject_export_jobsproject_feature_usagesproject_featuresproject_group_linksproject_import_dataproject_import_export_relation_export_upload_upload_statesproject_incident_management_settingsproject_metrics_settingsproject_mirror_dataproject_pages_metadataproject_push_rulesproject_repositoriesproject_repository_storage_movesproject_saved_repliesproject_secrets_managersproject_security_settingsproject_statisticsproject_topicsproject_upload_statesproject_wiki_repositoriesproject_deploy_tokensproject_relation_exportsproject_repository_statesproject_requirement_compliance_statusesproject_secrets_manager_maintenance_tasksproject_settingsproject_compliance_violationsproject_control_compliance_statusesproject_relation_export_uploadsproject_compliance_violations_issuessecuritysecurity_categoriessecurity_finding_token_statusessecurity_inventory_filterssecurity_project_tracked_contextssecurity_scan_profilessecurity_scanssecurity_attributessecurity_findingssecurity_scan_profile_configurationssecurity_scan_profile_project_statusessecurity_scan_profiles_projectssecurity_policy_settingssecurity_scan_profile_triggerssecurity_finding_enrichmentssecurity_orchestration_policy_configurationssecurity_trainingssecurity_orchestration_policy_rule_schedulessecurity_policiessecurity_pipeline_execution_policy_config_linkssecurity_pipeline_execution_project_schedulessecurity_policy_dismissalssecurity_policy_project_linkssecurity_policy_schedule_pipelinessecurity_scan_execution_project_schedulessecurity_scheduled_pipeline_execution_policy_test_runssecurity_policy_requirementsuseruser_audit_eventsuser_permission_export_upload_uploadsuser_uploadsuser_agent_detailsuser_upload_statesuser_admin_rolesuser_broadcast_message_dismissalsuser_calloutsuser_credit_card_validationsuser_custom_attributesuser_detailsuser_follow_usersuser_group_calloutsuser_highest_rolesuser_namespace_calloutsuser_permission_export_upload_upload_statesuser_permission_export_uploadsuser_phone_number_validationsuser_statusesuser_synced_attributes_metadatauser_achievementsuser_group_member_rolesuser_member_rolesuser_project_calloutsuser_project_member_rolesuser_saved_viewsuser_preferencesvaluevalue_stream_dashboard_countsvalue_stream_dashboard_aggregationsvulnerabilityvulnerability_archive_export_uploadsvulnerability_archive_exportsvulnerability_archived_recordsvulnerability_archivesvulnerability_export_part_uploadsvulnerability_export_uploadsvulnerability_exportsvulnerability_feedbackvulnerability_historical_statisticsvulnerability_identifiersvulnerability_namespace_historical_statisticsvulnerability_namespace_statisticsvulnerability_remediation_uploadsvulnerability_remediationsvulnerability_scannersvulnerability_statisticsvulnerability_export_part_upload_statesvulnerability_export_partsvulnerability_export_upload_statesvulnerability_occurrencesvulnerability_partial_scansvulnerability_detection_transitionsvulnerability_finding_ascp_component_linksvulnerability_finding_due_datesvulnerability_finding_evidencesvulnerability_finding_linksvulnerability_finding_risk_scoresvulnerability_finding_signaturesvulnerability_findings_remediationsvulnerability_flagsvulnerability_flip_guardsvulnerability_occurrence_identifiersvulnerability_triggered_workflowsvulnerability_archive_export_upload_statesvulnerability_external_issue_linksvulnerability_issue_linksvulnerability_merge_request_linksvulnerability_readsvulnerability_remediation_upload_statesvulnerability_representation_informationvulnerability_severity_overridesvulnerability_state_transitionsvulnerability_user_mentionsvulnerability_management_policy_ruleswebweb_hook_logs_dailyweb_hookszoektzoekt_nodeszoekt_taskszoekt_enabled_namespaceszoekt_replicaszoekt_indiceszoekt_repositoriesanalyticsanalytics_cycle_analytics_issue_stage_eventsanalytics_cycle_analytics_issue_stage_events_00analytics_cycle_analytics_issue_stage_events_01analytics_cycle_analytics_issue_stage_events_02analytics_cycle_analytics_issue_stage_events_03analytics_cycle_analytics_issue_stage_events_04analytics_cycle_analytics_issue_stage_events_05analytics_cycle_analytics_issue_stage_events_06analytics_cycle_analytics_issue_stage_events_07analytics_cycle_analytics_issue_stage_events_08analytics_cycle_analytics_issue_stage_events_09analytics_cycle_analytics_issue_stage_events_10analytics_cycle_analytics_issue_stage_events_11analytics_cycle_analytics_issue_stage_events_12analytics_cycle_analytics_issue_stage_events_13analytics_cycle_analytics_issue_stage_events_14analytics_cycle_analytics_issue_stage_events_15analytics_cycle_analytics_issue_stage_events_16analytics_cycle_analytics_issue_stage_events_17analytics_cycle_analytics_issue_stage_events_18analytics_cycle_analytics_issue_stage_events_19analytics_cycle_analytics_issue_stage_events_20analytics_cycle_analytics_issue_stage_events_21analytics_cycle_analytics_issue_stage_events_22analytics_cycle_analytics_issue_stage_events_23analytics_cycle_analytics_issue_stage_events_24analytics_cycle_analytics_issue_stage_events_25analytics_cycle_analytics_issue_stage_events_26analytics_cycle_analytics_issue_stage_events_27analytics_cycle_analytics_issue_stage_events_28analytics_cycle_analytics_issue_stage_events_29analytics_cycle_analytics_issue_stage_events_30analytics_cycle_analytics_issue_stage_events_31analytics_cycle_analytics_merge_request_stage_eventsanalytics_cycle_analytics_merge_request_stage_events_00analytics_cycle_analytics_merge_request_stage_events_01analytics_cycle_analytics_merge_request_stage_events_02analytics_cycle_analytics_merge_request_stage_events_03analytics_cycle_analytics_merge_request_stage_events_04analytics_cycle_analytics_merge_request_stage_events_05analytics_cycle_analytics_merge_request_stage_events_06analytics_cycle_analytics_merge_request_stage_events_07analytics_cycle_analytics_merge_request_stage_events_08analytics_cycle_analytics_merge_request_stage_events_09analytics_cycle_analytics_merge_request_stage_events_10analytics_cycle_analytics_merge_request_stage_events_11analytics_cycle_analytics_merge_request_stage_events_12analytics_cycle_analytics_merge_request_stage_events_13analytics_cycle_analytics_merge_request_stage_events_14analytics_cycle_analytics_merge_request_stage_events_15analytics_cycle_analytics_merge_request_stage_events_16analytics_cycle_analytics_merge_request_stage_events_17analytics_cycle_analytics_merge_request_stage_events_18analytics_cycle_analytics_merge_request_stage_events_19analytics_cycle_analytics_merge_request_stage_events_20analytics_cycle_analytics_merge_request_stage_events_21analytics_cycle_analytics_merge_request_stage_events_22analytics_cycle_analytics_merge_request_stage_events_23analytics_cycle_analytics_merge_request_stage_events_24analytics_cycle_analytics_merge_request_stage_events_25analytics_cycle_analytics_merge_request_stage_events_26analytics_cycle_analytics_merge_request_stage_events_27analytics_cycle_analytics_merge_request_stage_events_28analytics_cycle_analytics_merge_request_stage_events_29analytics_cycle_analytics_merge_request_stage_events_30analytics_cycle_analytics_merge_request_stage_events_31analytics_usage_trends_measurementsanalytics_cycle_analytics_stage_event_hashesanalytics_cycle_analytics_aggregationsanalytics_cycle_analytics_group_value_streamsanalytics_devops_adoption_segmentsanalytics_devops_adoption_snapshotsanalytics_cycle_analytics_value_stream_settingsanalytics_dashboards_pointersanalytics_cycle_analytics_group_stagesanalytics_cycle_analytics_stage_aggregationsissueissue_search_data_00issue_search_data_01issue_search_data_02issue_search_data_03issue_search_data_04issue_search_data_05issue_search_data_06issue_search_data_07issue_search_data_08issue_search_data_09issue_search_data_10issue_search_data_11issue_search_data_12issue_search_data_13issue_search_data_14issue_search_data_15issue_search_data_16issue_search_data_17issue_search_data_18issue_search_data_19issue_search_data_20issue_search_data_21issue_search_data_22issue_search_data_23issue_search_data_24issue_search_data_25issue_search_data_26issue_search_data_27issue_search_data_28issue_search_data_29issue_search_data_30issue_search_data_31issue_search_data_32issue_search_data_33issue_search_data_34issue_search_data_35issue_search_data_36issue_search_data_37issue_search_data_38issue_search_data_39issue_search_data_40issue_search_data_41issue_search_data_42issue_search_data_43issue_search_data_44issue_search_data_45issue_search_data_46issue_search_data_47issue_search_data_48issue_search_data_49issue_search_data_50issue_search_data_51issue_search_data_52issue_search_data_53issue_search_data_54issue_search_data_55issue_search_data_56issue_search_data_57issue_search_data_58issue_search_data_59issue_search_data_60issue_search_data_61issue_search_data_62issue_search_data_63issue_tracker_dataissue_assigneesissue_assignment_eventsissue_customer_relations_contactsissue_email_participantsissue_emailsissue_linksissue_metricsissue_search_dataissue_user_mentionsnamespacenamespace_descendantsnamespace_descendants_00namespace_descendants_01namespace_descendants_02namespace_descendants_03namespace_descendants_04namespace_descendants_05namespace_descendants_06namespace_descendants_07namespace_descendants_08namespace_descendants_09namespace_descendants_10namespace_descendants_11namespace_descendants_12namespace_descendants_13namespace_descendants_14namespace_descendants_15namespace_descendants_16namespace_descendants_17namespace_descendants_18namespace_descendants_19namespace_descendants_20namespace_descendants_21namespace_descendants_22namespace_descendants_23namespace_descendants_24namespace_descendants_25namespace_descendants_26namespace_descendants_27namespace_descendants_28namespace_descendants_29namespace_descendants_30namespace_descendants_31namespace_uploadsnamespace_admin_notesnamespace_aggregation_schedulesnamespace_ai_settingsnamespace_bansnamespace_ci_cd_settingsnamespace_detailsnamespace_foundational_agent_statusesnamespace_import_usersnamespace_isolationsnamespace_ldap_settingsnamespace_limitsnamespace_package_settingsnamespace_root_storage_statisticsnamespace_secret_countsnamespace_state_propagationsnamespace_statisticsnamespace_commit_emailsnamespace_settingsnamespace_template_settingsnamespace_cluster_agent_mappingsvirtualvirtual_registries_container_cache_entries_00virtual_registries_container_cache_entries_01virtual_registries_container_cache_entries_02virtual_registries_container_cache_entries_03virtual_registries_container_cache_entries_04virtual_registries_container_cache_entries_05virtual_registries_container_cache_entries_06virtual_registries_container_cache_entries_07virtual_registries_container_cache_entries_08virtual_registries_container_cache_entries_09virtual_registries_container_cache_entries_10virtual_registries_container_cache_entries_11virtual_registries_container_cache_entries_12virtual_registries_container_cache_entries_13virtual_registries_container_cache_entries_14virtual_registries_container_cache_entries_15virtual_registries_container_cache_remote_entries_00virtual_registries_container_cache_remote_entries_01virtual_registries_container_cache_remote_entries_02virtual_registries_container_cache_remote_entries_03virtual_registries_container_cache_remote_entries_04virtual_registries_container_cache_remote_entries_05virtual_registries_container_cache_remote_entries_06virtual_registries_container_cache_remote_entries_07virtual_registries_container_cache_remote_entries_08virtual_registries_container_cache_remote_entries_09virtual_registries_container_cache_remote_entries_10virtual_registries_container_cache_remote_entries_11virtual_registries_container_cache_remote_entries_12virtual_registries_container_cache_remote_entries_13virtual_registries_container_cache_remote_entries_14virtual_registries_container_cache_remote_entries_15virtual_registries_packages_maven_cache_entriesvirtual_registries_packages_maven_cache_entries_00virtual_registries_packages_maven_cache_entries_01virtual_registries_packages_maven_cache_entries_02virtual_registries_packages_maven_cache_entries_03virtual_registries_packages_maven_cache_entries_04virtual_registries_packages_maven_cache_entries_05virtual_registries_packages_maven_cache_entries_06virtual_registries_packages_maven_cache_entries_07virtual_registries_packages_maven_cache_entries_08virtual_registries_packages_maven_cache_entries_09virtual_registries_packages_maven_cache_entries_10virtual_registries_packages_maven_cache_entries_11virtual_registries_packages_maven_cache_entries_12virtual_registries_packages_maven_cache_entries_13virtual_registries_packages_maven_cache_entries_14virtual_registries_packages_maven_cache_entries_15virtual_registries_packages_maven_cache_local_entries_00virtual_registries_packages_maven_cache_local_entries_01virtual_registries_packages_maven_cache_local_entries_02virtual_registries_packages_maven_cache_local_entries_03virtual_registries_packages_maven_cache_local_entries_04virtual_registries_packages_maven_cache_local_entries_05virtual_registries_packages_maven_cache_local_entries_06virtual_registries_packages_maven_cache_local_entries_07virtual_registries_packages_maven_cache_local_entries_08virtual_registries_packages_maven_cache_local_entries_09virtual_registries_packages_maven_cache_local_entries_10virtual_registries_packages_maven_cache_local_entries_11virtual_registries_packages_maven_cache_local_entries_12virtual_registries_packages_maven_cache_local_entries_13virtual_registries_packages_maven_cache_local_entries_14virtual_registries_packages_maven_cache_local_entries_15virtual_registries_packages_maven_cache_remote_entries_00virtual_registries_packages_maven_cache_remote_entries_01virtual_registries_packages_maven_cache_remote_entries_02virtual_registries_packages_maven_cache_remote_entries_03virtual_registries_packages_maven_cache_remote_entries_04virtual_registries_packages_maven_cache_remote_entries_05virtual_registries_packages_maven_cache_remote_entries_06virtual_registries_packages_maven_cache_remote_entries_07virtual_registries_packages_maven_cache_remote_entries_08virtual_registries_packages_maven_cache_remote_entries_09virtual_registries_packages_maven_cache_remote_entries_10virtual_registries_packages_maven_cache_remote_entries_11virtual_registries_packages_maven_cache_remote_entries_12virtual_registries_packages_maven_cache_remote_entries_13virtual_registries_packages_maven_cache_remote_entries_14virtual_registries_packages_maven_cache_remote_entries_15virtual_registries_packages_npm_cache_local_entries_00virtual_registries_packages_npm_cache_local_entries_01virtual_registries_packages_npm_cache_local_entries_02virtual_registries_packages_npm_cache_local_entries_03virtual_registries_packages_npm_cache_local_entries_04virtual_registries_packages_npm_cache_local_entries_05virtual_registries_packages_npm_cache_local_entries_06virtual_registries_packages_npm_cache_local_entries_07virtual_registries_packages_npm_cache_local_entries_08virtual_registries_packages_npm_cache_local_entries_09virtual_registries_packages_npm_cache_local_entries_10virtual_registries_packages_npm_cache_local_entries_11virtual_registries_packages_npm_cache_local_entries_12virtual_registries_packages_npm_cache_local_entries_13virtual_registries_packages_npm_cache_local_entries_14virtual_registries_packages_npm_cache_local_entries_15virtual_registries_packages_npm_cache_remote_entries_00virtual_registries_packages_npm_cache_remote_entries_01virtual_registries_packages_npm_cache_remote_entries_02virtual_registries_packages_npm_cache_remote_entries_03virtual_registries_packages_npm_cache_remote_entries_04virtual_registries_packages_npm_cache_remote_entries_05virtual_registries_packages_npm_cache_remote_entries_06virtual_registries_packages_npm_cache_remote_entries_07virtual_registries_packages_npm_cache_remote_entries_08virtual_registries_packages_npm_cache_remote_entries_09virtual_registries_packages_npm_cache_remote_entries_10virtual_registries_packages_npm_cache_remote_entries_11virtual_registries_packages_npm_cache_remote_entries_12virtual_registries_packages_npm_cache_remote_entries_13virtual_registries_packages_npm_cache_remote_entries_14virtual_registries_packages_npm_cache_remote_entries_15virtual_registries_cleanup_policiesvirtual_registries_container_cache_entriesvirtual_registries_container_cache_remote_entriesvirtual_registries_container_registriesvirtual_registries_container_upstreamsvirtual_registries_packages_maven_cache_remote_entriesvirtual_registries_packages_maven_local_upstreamsvirtual_registries_packages_maven_registriesvirtual_registries_packages_maven_upstreamsvirtual_registries_packages_npm_cache_remote_entriesvirtual_registries_packages_npm_registriesvirtual_registries_packages_npm_upstreamsvirtual_registries_settingsvirtual_registries_container_registry_upstreamsvirtual_registries_packages_maven_cache_remote_entry_statesvirtual_registries_packages_maven_registry_upstreamsvirtual_registries_packages_maven_upstream_rulesvirtual_registries_packages_npm_registry_upstreamsvirtual_registries_packages_maven_cache_local_entriesvirtual_registries_packages_npm_cache_local_entriesabuseabuse_report_uploadsabuse_report_upload_statesabuse_reportsabuse_eventsabuse_report_eventsabuse_report_user_mentionsachievementachievement_uploadsachievement_upload_statesagentagent_group_authorizationsagent_organization_authorizationsagent_project_authorizationsagent_user_access_group_authorizationsagent_user_access_project_authorizationsagent_activity_eventsalertalert_management_alert_metric_image_uploadsalert_management_http_integrationsalert_management_metric_image_upload_statesalert_management_alertsalert_management_alert_assigneesalert_management_alert_metric_imagesalert_management_alert_user_mentionsanalyzeranalyzer_namespace_statusesanalyzer_project_statusesappearanceappearance_uploadsappearance_upload_statesapplicationapplication_setting_termsapplication_settingsapprovalapproval_policy_merge_request_bypass_eventsapproval_policy_rulesapproval_policy_rule_project_linksapproval_group_rulesapproval_merge_request_rulesapproval_project_rulesapproval_group_rules_groupsapproval_group_rules_protected_branchesapproval_group_rules_usersapproval_merge_request_rule_sourcesapproval_merge_request_rules_approved_approversapproval_merge_request_rules_groupsapproval_merge_request_rules_usersapproval_project_rules_groupsapproval_project_rules_protected_branchesapproval_project_rules_usersascpascp_scansascp_componentsascp_component_dependenciesascp_security_contextsascp_security_guidelinesboardboard_assigneesboard_group_recent_visitsboard_labelsboard_project_recent_visitsboard_user_preferencesboardsboards_epic_boardsboardsboards_epic_board_recent_visitsboards_epic_board_labelsboards_epic_listsboards_epic_board_positionsboards_epic_list_user_preferencesboards_epic_user_preferencesbulkbulk_import_export_upload_uploadsbulk_importsbulk_import_configurationsbulk_import_entitiesbulk_import_export_upload_upload_statesbulk_import_exportsbulk_import_export_batchesbulk_import_failuresbulk_import_trackersbulk_import_batch_trackersbulk_import_export_uploadscatalogcatalog_bundled_resourcescatalog_bundled_resource_versionscatalog_bundled_resource_componentscatalog_verified_namespacescatalog_resourcescatalog_resource_versionscatalog_resource_componentscatalog_resource_component_last_usagescdcd_applicationscd_environmentscd_application_flow_definitionscd_application_linkscd_environment_driver_bindingscd_servicescd_version_setscd_artifact_sourcescd_rolloutscd_service_environment_healthscd_rollout_environmentscd_rollout_transitionscd_versionscd_deploymentscd_rollout_stepscd_version_set_entriescd_deployment_transitionschatchat_nameschat_teamscici_build_runtime_environmentsci_deleted_objectsci_freeze_periodsci_gitlab_hosted_runner_monthly_usagesci_group_variablesci_instance_runner_monthly_usagesci_instance_variablesci_job_token_authorizationsci_job_token_group_scope_linksci_job_token_project_scope_linksci_minutes_additional_packsci_namespace_mirrorsci_namespace_monthly_usagesci_partitionsci_pipeline_schedulesci_project_metricsci_project_mirrorsci_project_monthly_usagesci_refsci_resource_groupsci_runner_controller_runner_level_scopings_instance_typeci_runner_controllersci_runner_machinesci_runner_taggingsci_runner_versionsci_runnersci_secure_file_statesci_secure_filesci_subscriptions_projectsci_triggersci_unit_testsci_variablesci_cost_settingsci_hosted_runnersci_pipeline_schedule_inputsci_pipeline_schedule_variablesci_runner_controller_instance_level_scopingsci_runner_controller_runner_level_scopingsci_runner_controller_tokensci_runner_namespacesci_runner_projectsci_runner_taggings_group_typeci_runner_taggings_instance_typeci_runner_taggings_project_typeci_daily_build_group_report_resultsci_pipeline_artifactsci_pipeline_chat_dataci_pipeline_messagesci_pipeline_metadataci_sources_projectsci_build_pending_statesci_build_report_resultsci_build_trace_chunksci_builds_runner_sessionci_job_variablesci_pending_buildsci_resourcesci_running_buildsci_sources_pipelinesci_unit_test_failuresci_job_artifact_statescloudcloud_connector_accesscloud_connector_keysclustercluster_enabled_grantscluster_agentscluster_agent_tokenscluster_agent_url_configurationscluster_groupscluster_platforms_kubernetescluster_projectscluster_providers_awscluster_providers_gcpcluster_agent_migrationsclustersclustersclusters_kubernetes_namespacesclusters_managed_resourcescompliancecompliance_management_frameworkscompliance_requirementscompliance_requirements_controlscompliance_framework_security_policiescontainercontainer_expiration_policiescontainer_registry_protection_rulescontainer_registry_protection_tag_rulescontainer_repositoriescontainer_repository_statescustomcustom_dashboardscustom_emojicustom_fieldscustom_dashboard_search_datacustom_dashboard_versionscustom_field_select_optionscustom_software_licensescustomercustomer_relations_organizationscustomer_relations_contactsdastdast_scanner_profilesdast_site_tokensdast_scanner_profiles_buildsdast_site_validationsdast_sitesdast_site_profilesdast_profilesdast_site_profile_secret_variablesdast_site_profiles_buildsdast_pre_scan_verificationsdast_profile_schedulesdast_profiles_pipelinesdast_profiles_tagsdast_pre_scan_verification_stepsdependencydependency_list_export_part_uploadsdependency_list_export_uploadsdependency_list_exportsdependency_proxy_blob_statesdependency_list_export_part_upload_statesdependency_list_export_partsdependency_proxy_blobsdependency_proxy_group_settingsdependency_proxy_image_ttl_group_policiesdependency_proxy_manifestsdependency_list_export_upload_statesdependency_proxy_manifest_statesdependency_proxy_packages_settingsdependency_firewall_policy_rulesdependency_firewall_activity_statsdeploydeploy_keys_projectsdeploy_tokensdeploymentdeployment_approvalsdeployment_clustersdeployment_merge_requestsdesigndesign_management_action_uploadsdesign_management_action_upload_statesdesign_management_repositoriesdesign_management_repository_statesdesign_management_designsdesign_management_versionsdesign_management_designs_versionsdesign_user_mentionsdoradora_configurationsdora_performance_scoresdora_daily_metricsduoduo_workflows_workflowsduo_workflow_session_artifactsduo_workflows_checkpoint_writesduo_workflows_eventsduo_workflows_workflow_merge_requestsduo_workflows_workflow_notesduo_workflows_workflow_pipelinesduo_workflows_workflow_work_itemsduo_workflows_workloadselasticelastic_index_settingselastic_reindexing_taskselastic_reindexing_subtaskselastic_group_index_statuseselastic_reindexing_sliceselasticsearchelasticsearch_indexed_namespaceselasticsearch_indexed_projectsenabledenabled_foundational_flowsenabled_foundational_flow_check_resultsepicepic_issuesepic_user_mentionserrorerror_tracking_client_keyserror_tracking_errorserror_tracking_error_eventsexternalexternal_pull_requestsexternal_approval_rulesexternal_status_checksexternal_status_checks_protected_branchesforkfork_networksfork_network_membersgeogeo_cache_invalidation_eventsgeo_ci_job_artifact_verification_summariesgeo_eventsgeo_nodesgeo_event_loggeo_node_namespace_linksgeo_node_organization_linksgeo_node_statusesgitlabgitlab_subscription_historiesgitlab_subscriptionsgoverngovern_policiesgovern_policy_enforcementsgpggpg_keysgpg_key_subkeysgpg_signaturesimportimport_export_upload_uploadsimport_offline_exportsimport_placeholder_user_detailsimport_source_usersimport_export_upload_upload_statesimport_export_uploadsimport_failuresimport_offline_configurationsimport_placeholder_membershipsimport_source_user_placeholder_referencesissuableissuable_metric_image_uploadsissuable_metric_image_upload_statesissuable_metric_imagesissuable_resource_linksissuable_severitiesissuable_slasjirajira_connect_installationsjira_connect_subscriptionsjira_importsjira_tracker_datalabellabel_linkslabel_prioritiesldapldap_admin_role_linksldap_group_linkslfslfs_object_stateslfs_objectslfs_file_lockslfs_objects_projectsmembermember_rolesmember_approvalsmembersmembers_deletion_schedulesmembersmlml_modelsml_experimentsml_model_metadataml_model_versionsml_candidatesml_experiment_metadataml_model_version_metadataml_candidate_metadataml_candidate_metricsml_candidate_paramsnotenote_diff_filesnote_duo_metadatanote_metadataoauthoauth_access_grantsoauth_access_tokensoauth_applicationsoauth_consentsoauth_device_grantsoauth_openid_requestsobservabilityobservability_group_o11y_settingsobservability_logs_issues_connectionsobservability_metrics_issues_connectionsobservability_traces_issues_connectionsoperationsoperations_feature_flagsoperations_feature_flags_clientsoperations_user_listsoperations_strategiesoperations_scopesoperations_strategies_user_listsoperations_feature_flags_issuesorganizationorganization_detail_uploadsorganization_detail_upload_statesorganization_detailsorganization_foundational_agent_statusesorganization_isolationsorganization_push_rulesorganization_settingsorganization_user_detailsorganization_usersorganization_cluster_agent_mappingspackagespackages_conan_jwt_signing_keyspackages_helm_metadata_cachespackages_npm_metadata_cachespackages_nuget_symbol_statespackages_package_file_statespackages_rubygems_spec_filespackages_debian_group_distributionspackages_cleanup_policiespackages_composer_packagespackages_debian_group_architecturespackages_debian_group_componentspackages_debian_group_distribution_keyspackages_debian_project_component_file_statespackages_debian_project_distributionspackages_dependenciespackages_helm_metadata_cache_statespackages_packagespackages_protection_rulespackages_rpm_repository_filespackages_build_infospackages_cargo_metadatapackages_composer_metadatapackages_conan_metadatapackages_conan_recipe_revisionspackages_debian_group_component_filespackages_debian_project_architecturespackages_debian_project_componentspackages_debian_project_distribution_keyspackages_debian_publicationspackages_dependency_linkspackages_maven_metadatapackages_npm_metadatapackages_nuget_metadatapackages_nuget_symbolspackages_package_filespackages_pypi_metadatapackages_rpm_metadatapackages_rubygems_metadatapackages_tagspackages_terraform_module_metadatapackages_conan_package_referencespackages_debian_file_metadatapackages_debian_project_component_filespackages_helm_file_metadatapackages_nuget_dependency_link_metadatapackages_package_file_build_infospackages_pypi_file_metadatapackages_conan_package_revisionspackages_conan_file_metadatapagespages_deploymentspages_domainspages_deployment_statespages_domain_acme_orderspersonalpersonal_snippet_upload_statespersonal_access_tokenspersonal_access_token_granular_scopespersonal_access_token_last_used_ipssnippetsnippet_uploadssnippet_repositoriessnippet_repository_storage_movessnippet_statisticssnippet_repository_statessnippet_user_mentionspmpm_advisoriespm_checkpointspm_cve_enrichmentpm_licensespm_malware_advisoriespm_packagespm_affected_packagespm_malware_affected_packagespm_package_versionspm_package_version_licensespostgrespostgres_async_foreign_key_validationspostgres_async_indexespostgres_reindex_actionspostgres_reindex_queued_actionsprotectedprotected_branchesprotected_environmentsprotected_tagsprotected_branch_merge_access_levelsprotected_branch_push_access_levelsprotected_branch_unprotect_access_levelsprotected_environment_approval_rulesprotected_environment_deploy_access_levelsprotected_tag_create_access_levelspushpush_rulespush_event_payloadsrequirementsrequirementsrequirements_management_test_reportsresourceresource_iteration_eventsresource_label_eventsresource_milestone_eventsresource_state_eventsresource_weight_eventsresource_link_eventssamlsaml_group_linkssaml_providerssavedsaved_repliessaved_viewssbomsbom_componentssbom_source_packagessbom_sourcessbom_vulnerability_scan_resultssbom_component_versionssbom_vulnerability_scanssbom_occurrencessbom_graph_pathssbom_occurrence_refssbom_occurrences_vulnerabilitiesscanscan_execution_policy_rulesscan_result_policiesscan_result_policy_violationsscan_result_policy_violation_detailsscimscim_group_membershipsscim_identitiesscim_oauth_access_tokenssecretsecret_detection_token_statusessecret_rotation_infossecretssecrets_management_recovery_keyssecrets_manager_namespace_enrollmentsserviceservice_access_tokensservice_desk_custom_email_credentialsservice_desk_custom_email_verificationsservice_desk_settingsslackslack_api_scopesslack_integrationsslack_integrations_scopesstatusstatus_page_settingsstatus_check_responsesstatus_page_published_incidentssubscriptionsubscription_add_onssubscription_user_add_on_assignment_versionssubscription_add_on_purchasessubscription_seat_assignmentssubscription_user_add_on_assignmentssystemsystem_access_group_microsoft_applicationssystem_access_microsoft_applicationssystem_access_group_microsoft_graph_access_tokenssystem_access_microsoft_graph_access_tokenssystem_note_metadatatagtag_ssh_signaturestag_gpg_signaturestag_x509_signaturestargetedtargeted_messagestargeted_message_dismissalstargeted_message_namespacesterraformterraform_state_version_statesterraform_state_protection_rulesterraform_statesterraform_state_versionswikiwiki_repository_stateswiki_page_metawiki_page_slugswiki_page_meta_user_mentionsworkwork_item_custom_statuseswork_item_custom_typeswork_item_parent_linkswork_item_settingswork_item_type_user_preferenceswork_item_type_visibilitieswork_item_type_visibility_defaultswork_item_custom_lifecycleswork_item_custom_status_mappingswork_item_type_custom_fieldswork_item_custom_lifecycle_statuseswork_item_type_custom_lifecycleswork_item_agent_planswork_item_colorswork_item_current_statuseswork_item_date_field_valueswork_item_dates_sourceswork_item_number_field_valueswork_item_positionswork_item_progresseswork_item_select_field_valueswork_item_text_field_valueswork_item_transitionswork_item_weights_sourcesworkspaceworkspace_agentk_statesworkspace_tokensworkspace_variablesworkspacesworkspaces_agent_config_versionsworkspacesworkspaces_agent_configsx509x509_issuersx509_certificatesx509_commit_signaturesmiscappearancesar_internal_metadatabroadcast_messagescells_outstanding_leasescontent_blocked_statesconversational_development_index_metricscountry_access_logsdetached_partitionsfeature_gatesfeaturesgroups_visitshistorical_datalicensesnotification_settingsorganizationsplansprogramming_languagesschema_migrationsshardstagsupload_statesverification_codesadmin_rolesartifact_registry_namespace_mappingsburned_project_routesiam_outboxkeysnon_sql_service_pingsplan_limitspool_repositoriesqueries_service_pingsraw_usage_datatopicsachievementsactivation_metricsallowed_email_domainsarkose_sessionsatlassian_identitiesauthentication_eventsautomation_rulesaward_emojiaws_rolesbanned_userscompromised_password_detectionsdesignated_beneficiariesearly_access_program_tracking_eventsemailsghost_user_migrationsgranular_scopesip_restrictionsiterations_cadencesknowledge_graph_enabled_namespacesmobile_device_push_subscriptionsonboarding_progressespipl_usersredirect_routesroutessmartcard_identitiesspam_logsterm_agreementstimelog_categoriesupcoming_reconciliationsvs_code_settingsvulnerabilitieswebauthn_registrationsactivity_pub_releases_subscriptionsbadgescsv_issue_importseventsgrafana_integrationsindex_statusesinsightsintegrationsinternal_idslabelsmilestonespath_locksrelation_import_trackersreleasesremote_mirrorsrepository_languagesslsa_attestationssnippetssprintsssh_signaturessubscriptionssupply_chain_attestation_statestarget_branch_rulesuploadsxray_reportscoverage_fuzzing_corpusesdingtalk_tracker_dataepicsevidencesidentitieslistsmilestone_releasesrelease_linksrequired_code_owners_sectionszentao_tracker_dataapprovalsdraft_notesenvironmentsexcluded_merge_requestsissueslist_user_preferencesreviewsdeploymentsdescription_versionsnotessentry_issueszoom_meetingscommit_user_mentionsdiff_note_positionsjob_environmentsrelated_epic_linkssoftware_license_policiessuggestionstimelogstodos

1429 tables · 1861 foreign keys · 111 domains. Open the 3D explorer: rotate, zoom, click any table or relationship.

namespaces 4 tables

Tables whose names start with namespaces_.

Entity-relationship diagram: namespaces, namespaces_consents, namespaces_storage_limit_exclusions, namespaces_sync_eventsnamespacesid PKbigintnamevarcharpathvarcharowner_idbigintcreated_attimestampupdated_attimestamptypevarcharavatarvarcharmembership_lockbooleanshare_with_group_lockbooleanvisibility_levelintegerrequest_access_enabledbooleanldap_sync_statusvarcharldap_sync_errorvarcharldap_sync_last_update_attimestampldap_sync_last_successful_update_attimestampldap_sync_last_sync_attimestamplfs_enabledbooleanparent_id FKbigintshared_runners_minutes_limitintegerrepository_size_limitbigintrequire_two_factor_authenticationbooleantwo_factor_grace_periodintegerproject_creation_levelintegerrunners_tokenvarcharfile_template_project_idbigintsaml_discovery_tokenvarcharrunners_token_encryptedvarcharcustom_project_templates_group_idbigintauto_devops_enabledbooleanextra_shared_runners_minutes_limitintegerlast_ci_minutes_notification_attimestamptzlast_ci_minutes_usage_notification_levelintegersubgroup_creation_levelintegermax_pages_sizeintegermax_artifacts_sizeintegermentions_disabledbooleandefault_branch_protectionsmallintmax_personal_access_token_lifetimeintegershared_runners_enabledbooleanallow_descendants_override_disabled_shared_runnersbooleantraversal_idsbigint[]organization_id FKbigintstatesmallintnamespaces_consentsid PKbigintnamespace_id FKbigintuser_idbigintfeature_namesmallintcreated_attimestamptzupdated_attimestamptznamespaces_storage_limit_exclusionsid PKbigintnamespace_id FKbigintreasontextcreated_attimestamptzupdated_attimestamptznamespaces_sync_eventsid PKbigintnamespace_id FKbigintorganizationsparent_idorganization_idnamespace_idnamespace_idnamespace_id

Relationships

namespaces

44 cols · no RLS · line 524View in 3D
  • Nullable foreign key organization_idnamespaces.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key parent_idnamespaces.parent_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK typetype is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Enum-like column with no CHECK ldap_sync_statusldap_sync_status is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Either/or foreign keys without a CHECK organization_id, parent_idnamespaces has several nullable FKs (organization_id, parent_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone ldap_sync_last_update_atldap_sync_last_update_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone ldap_sync_last_successful_update_atldap_sync_last_successful_update_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone ldap_sync_last_sync_atldap_sync_last_sync_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Hub table: referenced by 353 tables — Any change to its key, its delete semantics, or its partitioning touches every dependent. Migrations on hub tables need the longest lock windows and the most careful rollout.
  • Wide table (44 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name varcharNOT NULL
path varcharNOT NULL
owner_id bigintnull
created_at timestampnull
updated_at timestampnull
type varcharNOT NULLCAST('User' AS varchar)
avatar varcharnull
membership_lock booleannullFALSE
share_with_group_lock booleannullFALSE
visibility_level integerNOT NULL20
request_access_enabled booleanNOT NULLTRUE
ldap_sync_status varcharNOT NULLCAST('ready' AS varchar)
ldap_sync_error varcharnull
ldap_sync_last_update_at timestampnull
ldap_sync_last_successful_update_at timestampnull
ldap_sync_last_sync_at timestampnull
lfs_enabled booleannull
parent_id bigintnullnamespaces.id 1:N · RESTRICT
shared_runners_minutes_limit integernull
repository_size_limit bigintnull
require_two_factor_authentication booleanNOT NULLFALSE
two_factor_grace_period integerNOT NULL48
project_creation_level integernull
runners_token varcharnull
file_template_project_id bigintnull
saml_discovery_token varcharnull
runners_token_encrypted varcharnull
custom_project_templates_group_id bigintnull
auto_devops_enabled booleannull
extra_shared_runners_minutes_limit integernull
last_ci_minutes_notification_at timestamptznull
last_ci_minutes_usage_notification_level integernull
subgroup_creation_level integernull1
max_pages_size integernull
max_artifacts_size integernull
mentions_disabled booleannull
default_branch_protection smallintnull
max_personal_access_token_lifetime integernull
shared_runners_enabled booleanNOT NULLTRUE
allow_descendants_override_disabled_shared_runners booleanNOT NULLFALSE
traversal_ids bigint[]NOT NULLCAST('{}' AS bigint[])
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL
state smallintnull0CHECK state IS NOT NULL

Indexes

  • (parent_id, id) WHERE CAST(type AS text) = CAST('Group' AS text) index_groups_on_parent_id_id
  • (path, id) WHERE CAST(type AS text) = CAST('Group' AS text) index_groups_on_path_and_id
  • UNIQUE (name, parent_id, type) index_namespaces_name_parent_id_type
  • (created_at) index_namespaces_on_created_at
  • (ldap_sync_last_successful_update_at) index_namespaces_on_ldap_sync_last_successful_update_at
  • (name) index_namespaces_on_name_trigram
  • (organization_id) index_namespaces_on_organization_id
  • (organization_id, id) WHERE CAST(type AS text) = CAST('Group' AS text) index_namespaces_on_organization_id_and_id_for_groups
  • (owner_id) index_namespaces_on_owner_id
  • UNIQUE (parent_id, id) index_namespaces_on_parent_id_and_id
  • (path) index_namespaces_on_path
  • (lower(CAST(path AS text))) WHERE parent_id IS NULL AND CAST(type AS text) <> CAST('Project' AS text) index_namespaces_on_path_for_top_level_non_projects
  • (path) index_namespaces_on_path_trigram
  • UNIQUE (runners_token_encrypted) index_namespaces_on_runners_token_encrypted
  • (traversal_ids) index_namespaces_on_traversal_ids
  • (traversal_ids) WHERE CAST(type AS text) = CAST('Group' AS text) index_namespaces_on_traversal_ids_for_groups
  • (traversal_ids) WHERE CAST(type AS text) = CAST('Group' AS text) index_namespaces_on_traversal_ids_for_groups_btree
  • (type, id) index_namespaces_on_type_and_id
  • (name, id) WHERE CAST(type AS text) = CAST('Group' AS text) AND visibility_level = 20 index_namespaces_public_groups_name_id
  • (lower(CAST(name AS text))) index_on_namespaces_lower_name
  • (lower(CAST(path AS text))) index_on_namespaces_lower_path
  • ((traversal_ids)[1], type, id) index_on_namespaces_namespaces_by_top_level_namespace

Referenced by

Table checks: organization_id IS NOT NULL; state IS NOT NULL

namespaces_consents

6 cols · no RLS · line 25180View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
user_id bigintnull
feature_name smallintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (namespace_id, feature_name) index_namespaces_consents_on_namespace_id_and_feature_name
  • (user_id) index_namespaces_consents_on_user_id

Referenced by

  • nothing

namespaces_storage_limit_exclusions

5 cols · no RLS · line 25207View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:1 · CASCADE
reason textNOT NULLCHECK char_length(reason) <= 255
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (namespace_id) unique_idx_namespaces_storage_limit_exclusions_on_namespace_id

Referenced by

  • nothing

Table checks: char_length(reason) <= 255

namespaces_sync_events

2 cols · no RLS · line 25225View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • (namespace_id) index_namespaces_sync_events_on_namespace_id

Referenced by

  • nothing

projects 6 tables

Tables whose names start with projects_.

Entity-relationship diagram: projects, projects_visits, projects_branch_rules_merge_request_approval_settings, projects_branch_rules_squash_options, projects_sync_events, projects_with_pipeline_variablesprojectsid PKbigintnamevarcharpathvarchardescriptiontextcreated_attimestampupdated_attimestampcreator_idbigintnamespace_id FKbigintlast_activity_attimestampimport_urlvarcharvisibility_levelintegerarchivedbooleanavatarvarcharmerge_requests_templatetextstar_countintegermerge_requests_rebase_enabledbooleanimport_typevarcharimport_sourcevarcharapprovals_before_mergeintegerreset_approvals_on_pushbooleanmerge_requests_ff_only_enabledbooleanissues_templatetextmirrorbooleanmirror_last_update_attimestampmirror_last_successful_update_attimestampmirror_user_idbigintshared_runners_enabledbooleanrunners_tokenvarcharbuild_allow_git_fetchbooleanbuild_timeoutintegermirror_trigger_buildsbooleanpending_deletebooleanpublic_buildsbooleanlast_repository_check_failedbooleanlast_repository_check_attimestamponly_allow_merge_if_pipeline_succeedsbooleanhas_external_issue_trackerbooleanrepository_storagevarcharrepository_read_onlybooleanrequest_access_enabledbooleanhas_external_wikibooleanci_config_pathvarcharlfs_enabledbooleandescription_htmltextonly_allow_merge_if_all_discussions_are_resolvedbooleanrepository_size_limitbigintprinting_merge_request_link_enabledbooleanauto_cancel_pending_pipelinesintegerservice_desk_enabledbooleancached_markdown_versionintegerlast_repository_updated_attimestampdisable_overriding_approvers_per_merge_requestbooleanstorage_versionsmallintresolve_outdated_diff_discussionsbooleanremote_mirror_available_overriddenbooleanonly_mirror_protected_branchesbooleanpull_mirror_available_overriddenbooleanjobs_cache_indexintegerexternal_authorization_classification_labelvarcharmirror_overwrites_diverged_branchesbooleanpages_https_onlybooleanexternal_webhook_tokenvarcharpackages_enabledbooleanmerge_requests_author_approvalbooleanpool_repository_idbigintrunners_token_encryptedvarcharbfg_object_mapvarchardetected_repository_languagesbooleanmerge_requests_disable_committers_approvalbooleanrequire_password_to_approvebooleanemails_disabledbooleanmax_pages_sizeintegermax_artifacts_sizeintegerpull_mirror_branch_prefixvarchar(50)remove_source_branch_after_mergebooleanmarked_for_deletion_atdatemarked_for_deletion_by_user_idbigintautoclose_referenced_issuesbooleansuggestion_commit_messagevarchar(255)project_namespace_id FKbiginthiddenbooleanorganization_id FKbigintprojects_visitsid PKbigintentity_idbigintuser_idbigintvisited_at PKtimestamptzprojects_branch_rules_merge_request_approval_settingsid PKbigintcreated_attimestamptzupdated_attimestamptzprotected_branch_id FKbigintproject_id FKbigintprevent_author_approvalbooleanprevent_committer_approvalbooleanprevent_editing_approval_rulesbooleanrequire_reauthentication_to_approvebooleanapproval_removalssmallintprojects_branch_rules_squash_optionsid PKbigintprotected_branch_id FKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzsquash_optionsmallintprojects_sync_eventsid PKbigintproject_id FKbigintprojects_with_pipeline_variablesproject_id PKbigintnamespacesorganizationsprotected_branchesproject_namespace_idorganization_idnamespace_idprotected_branch_idproject_idprotected_branch_idproject_idproject_idproject_id

Relationships

projects

82 cols · no RLS · line 589View in 3D
  • Nullable foreign key project_namespace_idprojects.project_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idprojects.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK import_typeimport_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Either/or foreign keys without a CHECK project_namespace_id, organization_idprojects has several nullable FKs (project_namespace_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone last_activity_atlast_activity_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone mirror_last_update_atmirror_last_update_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone mirror_last_successful_update_atmirror_last_successful_update_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone last_repository_check_atlast_repository_check_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone last_repository_updated_atlast_repository_updated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Hub table: referenced by 371 tables — Any change to its key, its delete semantics, or its partitioning touches every dependent. Migrations on hub tables need the longest lock windows and the most careful rollout.
  • Wide table (82 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name varcharnull
path varcharnull
description textnull
created_at timestampnull
updated_at timestampnull
creator_id bigintnull
namespace_id bigintNOT NULLnamespaces.id 1:N · RESTRICT
last_activity_at timestampnull
import_url varcharnull
visibility_level integerNOT NULL0
archived booleanNOT NULLFALSE
avatar varcharnull
merge_requests_template textnull
star_count integerNOT NULL0CHECK star_count >= 0
merge_requests_rebase_enabled booleannullFALSE
import_type varcharnull
import_source varcharnull
approvals_before_merge integerNOT NULL0
reset_approvals_on_push booleannullTRUE
merge_requests_ff_only_enabled booleannullFALSE
issues_template textnull
mirror booleanNOT NULLFALSE
mirror_last_update_at timestampnull
mirror_last_successful_update_at timestampnull
mirror_user_id bigintnull
shared_runners_enabled booleanNOT NULLTRUE
runners_token varcharnull
build_allow_git_fetch booleanNOT NULLTRUE
build_timeout integerNOT NULL3600
mirror_trigger_builds booleanNOT NULLFALSE
pending_delete booleannullFALSE
public_builds booleanNOT NULLTRUE
last_repository_check_failed booleannull
last_repository_check_at timestampnull
only_allow_merge_if_pipeline_succeeds booleanNOT NULLFALSE
has_external_issue_tracker booleannull
repository_storage varcharNOT NULLCAST('default' AS varchar)
repository_read_only booleannull
request_access_enabled booleanNOT NULLTRUE
has_external_wiki booleannull
ci_config_path varcharnull
lfs_enabled booleannull
description_html textnull
only_allow_merge_if_all_discussions_are_resolved booleannull
repository_size_limit bigintnull
printing_merge_request_link_enabled booleanNOT NULLTRUE
auto_cancel_pending_pipelines integerNOT NULL1
service_desk_enabled booleannullTRUE
cached_markdown_version integernull
last_repository_updated_at timestampnull
disable_overriding_approvers_per_merge_request booleannull
storage_version smallintnull
resolve_outdated_diff_discussions booleannull
remote_mirror_available_overridden booleannull
only_mirror_protected_branches booleannull
pull_mirror_available_overridden booleannull
jobs_cache_index integernull
external_authorization_classification_label varcharnull
mirror_overwrites_diverged_branches booleannull
pages_https_only booleannullTRUE
external_webhook_token varcharnull
packages_enabled booleannull
merge_requests_author_approval booleannullFALSE
pool_repository_id bigintnull
runners_token_encrypted varcharnull
bfg_object_map varcharnull
detected_repository_languages booleannull
merge_requests_disable_committers_approval booleannull
require_password_to_approve booleannull
emails_disabled booleannull
max_pages_size integernull
max_artifacts_size integernull
pull_mirror_branch_prefix varchar(50)null
remove_source_branch_after_merge booleannull
marked_for_deletion_at datenull
marked_for_deletion_by_user_id bigintnull
autoclose_referenced_issues booleannull
suggestion_commit_message varchar(255)null
project_namespace_id bigintnullnamespaces.id 1:1 · CASCADECHECK project_namespace_id IS NOT NULL
hidden booleanNOT NULLFALSE
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • (repository_storage, created_at) WHERE last_repository_check_at IS NULL idx_project_repository_check_partial
  • (created_at, id) WHERE archived = TRUE AND pending_delete = FALSE AND hidden = FALSE idx_projects_api_created_at_id_for_archived
  • (created_at, id) WHERE archived = TRUE AND visibility_level = 20 AND pending_delete = FALSE AND hidden = FALSE idx_projects_api_created_at_id_for_archived_vis20
  • (created_at, id) WHERE visibility_level = 10 AND pending_delete = FALSE AND hidden = FALSE idx_projects_api_created_at_id_for_vis10
  • (id, created_at) WHERE disable_overriding_approvers_per_merge_request = FALSE OR disable_overriding_approvers_per_merge_request IS NULL idx_projects_id_created_at_disable_overriding_approvers_false
  • (id, created_at) WHERE disable_overriding_approvers_per_merge_request = TRUE idx_projects_id_created_at_disable_overriding_approvers_true
  • (id, repository_storage, last_repository_updated_at) idx_projects_on_repository_storage_last_repository_updated_at
  • (import_type, creator_id, created_at) WHERE import_type IS NOT NULL index_imported_projects_on_import_type_creator_id_created_at
  • (import_type, id) WHERE import_type IS NOT NULL index_imported_projects_on_import_type_id
  • (created_at, id) index_projects_api_created_at_id_desc
  • (last_activity_at, id) index_projects_api_last_activity_at_id_desc
  • (name, id) index_projects_api_name_id_desc
  • (path, id) index_projects_api_path_id_desc
  • (updated_at, id) index_projects_api_updated_at_id_desc
  • (created_at, id) WHERE visibility_level = 20 index_projects_api_vis20_created_at
  • (last_activity_at, id) WHERE visibility_level = 20 index_projects_api_vis20_last_activity_at
  • (name, id) WHERE visibility_level = 20 index_projects_api_vis20_name
  • (path, id) WHERE visibility_level = 20 index_projects_api_vis20_path
  • (updated_at, id) WHERE visibility_level = 20 index_projects_api_vis20_updated_at
  • (id) WHERE marked_for_deletion_at IS NULL index_projects_not_aimed_for_deletion
  • (creator_id, created_at, id) index_projects_on_creator_id_and_created_at_and_id
  • (creator_id, id) index_projects_on_creator_id_and_id
  • (creator_id, import_type, created_at) WHERE import_type IS NOT NULL index_projects_on_creator_id_import_type_and_created_at_partial
  • (description) index_projects_on_description_trigram
  • (id) WHERE archived = FALSE AND pending_delete = FALSE index_projects_on_id_and_archived_and_pending_delete
  • (id, marked_for_deletion_at) WHERE marked_for_deletion_at IS NOT NULL index_projects_on_id_and_marked_for_deletion_at
  • UNIQUE (id) WHERE visibility_level = ANY(ARRAY[10, 20]) index_projects_on_id_partial_for_visibility
  • (id) WHERE service_desk_enabled = TRUE index_projects_on_id_service_desk_enabled
  • (last_activity_at, id) index_projects_on_last_activity_at_and_id
  • (last_repository_check_at) WHERE last_repository_check_at IS NOT NULL index_projects_on_last_repository_check_at
  • (last_repository_check_failed) index_projects_on_last_repository_check_failed
  • (last_repository_updated_at) index_projects_on_last_repository_updated_at
  • (lower(CAST(name AS text))) index_projects_on_lower_name
  • (marked_for_deletion_by_user_id) WHERE marked_for_deletion_by_user_id IS NOT NULL index_projects_on_marked_for_deletion_by_user_id
  • (creator_id, created_at) WHERE mirror = TRUE AND mirror_trigger_builds = TRUE index_projects_on_mirror_creator_id_created_at
  • (id) WHERE mirror = TRUE AND mirror_trigger_builds = TRUE index_projects_on_mirror_id_where_mirror_and_trigger_builds
  • (mirror_user_id) index_projects_on_mirror_user_id
  • (name, id) index_projects_on_name_and_id
  • (name) index_projects_on_name_trigram
  • (namespace_id, id) index_projects_on_namespace_id_and_id
  • (namespace_id, repository_size_limit) index_projects_on_namespace_id_and_repository_size_limit
  • (organization_id, id) index_projects_on_organization_id_and_id
  • (path) index_projects_on_path_trigram
  • (pending_delete) index_projects_on_pending_delete
  • (pool_repository_id) WHERE pool_repository_id IS NOT NULL index_projects_on_pool_repository_id
  • UNIQUE (project_namespace_id) index_projects_on_project_namespace_id
  • (repository_storage) index_projects_on_repository_storage
  • (star_count) index_projects_on_star_count
  • (updated_at, id) index_projects_on_updated_at_and_id
  • (id, creator_id, created_at) WHERE service_desk_enabled = TRUE index_service_desk_enabled_projects_on_id_creator_id_created_at
  • UNIQUE (runners_token) index_uniq_projects_on_runners_token
  • UNIQUE (runners_token_encrypted) index_uniq_projects_on_runners_token_encrypted
  • UNIQUE (name, namespace_id) unique_projects_on_name_namespace_id

Referenced by

Table checks: organization_id IS NOT NULL; project_namespace_id IS NOT NULL; star_count >= 0

projects_visits

4 cols · no RLS · line 7093View in 3D
  • Isolated tableprojects_visits references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
entity_id bigintNOT NULL
user_id bigintNOT NULL
visited_at PKtimestamptzNOT NULL

Indexes

  • (entity_id) index_projects_visits_on_entity_id
  • (user_id, entity_id, visited_at) index_projects_visits_on_user_id_and_entity_id_and_visited_at

Referenced by

  • nothing

projects_branch_rules_merge_request_approval_settings

10 cols · no RLS · line 29436View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
protected_branch_id bigintNOT NULLprotected_branches.id 1:1 · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
prevent_author_approval booleanNOT NULLFALSE
prevent_committer_approval booleanNOT NULLFALSE
prevent_editing_approval_rules booleanNOT NULLFALSE
require_reauthentication_to_approve booleanNOT NULLFALSE
approval_removals smallintNOT NULL1

Indexes

  • (project_id) idx_branch_rules_mr_approval_settings_on_project_id
  • UNIQUE (protected_branch_id) idx_branch_rules_mr_approval_settings_on_protected_branch_id

Referenced by

  • nothing

projects_branch_rules_squash_options

6 cols · no RLS · line 29458View in 3D
  • Junction table allows duplicate links project_id, protected_branch_idprojects_branch_rules_squash_options looks like a many-to-many link table but has no unique constraint across (project_id, protected_branch_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
protected_branch_id bigintNOT NULLprotected_branches.id 1:1 · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
squash_option smallintNOT NULL3

Indexes

  • UNIQUE (protected_branch_id) index_branch_rule_squash_options_on_protected_branch_id
  • (project_id) index_project_branch_rule_squash_options_on_project_id

Referenced by

  • nothing

projects_sync_events

2 cols · no RLS · line 29485View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE

Indexes

  • (project_id) index_projects_sync_events_on_project_id

Referenced by

  • nothing

projects_with_pipeline_variables

1 cols · no RLS · line 29508View in 3D
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE

Indexes

  • none

Referenced by

  • nothing

users 5 tables

Tables whose names start with users_.

Entity-relationship diagram: users, users_ops_dashboard_projects, users_security_dashboard_projects, users_star_projects, users_statisticsusersid PKbigintemailvarcharencrypted_passwordvarcharreset_password_tokenvarcharreset_password_sent_attimestampremember_created_attimestampsign_in_countintegercurrent_sign_in_attimestamplast_sign_in_attimestampcurrent_sign_in_ipvarcharlast_sign_in_ipvarcharcreated_attimestampupdated_attimestampnamevarcharadminbooleanprojects_limitintegerfailed_attemptsintegerlocked_attimestampusernamevarcharcan_create_groupbooleancan_create_teambooleanstatevarcharcolor_scheme_idbigintpassword_expires_attimestampcreated_by_idbigintlast_credential_check_attimestampavatarvarcharconfirmation_tokenvarcharconfirmed_attimestampconfirmation_sent_attimestampunconfirmed_emailvarcharhide_no_ssh_keybooleanadmin_email_unsubscribed_attimestampnotification_emailvarcharhide_no_passwordbooleanpassword_automatically_setbooleanencrypted_otp_secretvarcharencrypted_otp_secret_ivvarcharencrypted_otp_secret_saltvarcharotp_required_for_loginbooleanotp_backup_codestextpublic_emailvarchardashboardintegerproject_viewintegerconsumed_timestepintegerlayoutintegerhide_project_limitbooleannotetextunlock_tokenvarcharotp_grace_period_started_attimestampexternalbooleanincoming_email_tokenvarcharauditorbooleanrequire_two_factor_authentication_from_groupbooleantwo_factor_grace_periodintegerlast_activity_ondatenotified_of_own_activitybooleanpreferred_languagevarchartheme_idsmallintaccepted_term_idbigintfeed_tokenvarcharprivate_profilebooleanroadmap_layoutsmallintinclude_private_contributionsbooleancommit_emailvarchargroup_viewintegermanaging_group_idbigintfirst_namevarchar(255)last_namevarchar(255)static_object_tokenvarchar(255)user_typesmallintstatic_object_token_encryptedtextotp_secret_expires_attimestamptzonboarding_in_progressbooleancolor_mode_idsmallintcomposite_identity_enforcedbooleanorganization_id FKbigintotp_secrettextusers_ops_dashboard_projectsid PKbigintcreated_attimestamptzupdated_attimestamptzuser_id FKbigintproject_id FKbigintusers_security_dashboard_projectsuser_id PKbigintproject_id PKbigintusers_star_projectsid PKbigintproject_id FKbigintuser_idbigintcreated_attimestampupdated_attimestampusers_statisticsid PKbigintcreated_attimestamptzupdated_attimestamptzwithout_groups_and_projectsintegerwith_highest_role_guestintegerwith_highest_role_reporterintegerwith_highest_role_developerintegerwith_highest_role_maintainerintegerwith_highest_role_ownerintegerbotsintegerblockedintegerwith_highest_role_minimal_accessintegerwith_highest_role_guest_with_custom_roleintegerwith_highest_role_plannerintegerwith_highest_role_security_managerintegerorganizationsprojectsorganization_idproject_iduser_idproject_idproject_iduser_id

Relationships

users

78 cols · no RLS · line 692View in 3D
  • Enum-like column with no CHECK statestate is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • TIMESTAMP without time zone reset_password_sent_atreset_password_sent_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone remember_created_atremember_created_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone current_sign_in_atcurrent_sign_in_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone last_sign_in_atlast_sign_in_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone locked_atlocked_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone password_expires_atpassword_expires_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone last_credential_check_atlast_credential_check_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone confirmed_atconfirmed_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone confirmation_sent_atconfirmation_sent_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone admin_email_unsubscribed_atadmin_email_unsubscribed_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone otp_grace_period_started_atotp_grace_period_started_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Hub table: referenced by 201 tables — Any change to its key, its delete semantics, or its partitioning touches every dependent. Migrations on hub tables need the longest lock windows and the most careful rollout.
  • Wide table (78 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
email varcharNOT NULLCAST('' AS varchar)
encrypted_password varcharNOT NULLCAST('' AS varchar)
reset_password_token varcharnull
reset_password_sent_at timestampnull
remember_created_at timestampnull
sign_in_count integernull0
current_sign_in_at timestampnull
last_sign_in_at timestampnull
current_sign_in_ip varcharnull
last_sign_in_ip varcharnull
created_at timestampnull
updated_at timestampnull
name varcharnull
admin booleanNOT NULLFALSE
projects_limit integerNOT NULL
failed_attempts integernull0
locked_at timestampnull
username varcharnull
can_create_group booleanNOT NULLTRUE
can_create_team booleanNOT NULLTRUE
state varcharnull
color_scheme_id bigintNOT NULL1
password_expires_at timestampnull
created_by_id bigintnull
last_credential_check_at timestampnull
avatar varcharnull
confirmation_token varcharnull
confirmed_at timestampnull
confirmation_sent_at timestampnull
unconfirmed_email varcharnull
hide_no_ssh_key booleannullFALSECHECK hide_no_ssh_key IS NOT NULL
admin_email_unsubscribed_at timestampnull
notification_email varcharnull
hide_no_password booleannullFALSECHECK hide_no_password IS NOT NULL
password_automatically_set booleannullFALSE
encrypted_otp_secret varcharnull
encrypted_otp_secret_iv varcharnull
encrypted_otp_secret_salt varcharnull
otp_required_for_login booleanNOT NULLFALSE
otp_backup_codes textnull
public_email varcharnull
dashboard integernull0
project_view integernull2CHECK project_view IS NOT NULL
consumed_timestep integernull
layout integernull0
hide_project_limit booleannullFALSE
note textnull
unlock_token varcharnull
otp_grace_period_started_at timestampnull
external booleannullFALSE
incoming_email_token varcharnull
auditor booleanNOT NULLFALSE
require_two_factor_authentication_from_group booleanNOT NULLFALSE
two_factor_grace_period integerNOT NULL48
last_activity_on datenull
notified_of_own_activity booleannullFALSECHECK notified_of_own_activity IS NOT NULL
preferred_language varcharnull
theme_id smallintnull
accepted_term_id bigintnull
feed_token varcharnull
private_profile booleanNOT NULLFALSE
roadmap_layout smallintnull
include_private_contributions booleannull
commit_email varcharnull
group_view integernull
managing_group_id bigintnull
first_name varchar(255)null
last_name varchar(255)null
static_object_token varchar(255)null
user_type smallintnull0CHECK user_type IS NOT NULL
static_object_token_encrypted textnullCHECK char_length(static_object_token_encrypted) <= 255
otp_secret_expires_at timestamptznull
onboarding_in_progress booleanNOT NULLFALSE
color_mode_id smallintNOT NULL1
composite_identity_enforced booleanNOT NULLFALSE
organization_id bigintNOT NULLorganizations.id 1:N
otp_secret textnullCHECK char_length(otp_secret) <= 255

Indexes

  • (lower(CAST(email AS text))) index_on_users_lower_email
  • (lower(CAST(username AS text))) index_on_users_lower_username
  • (lower(CAST(name AS text))) index_on_users_name_lower
  • (id) WHERE CAST(state AS text) = CAST('active' AS text) AND user_type = ANY(ARRAY[0, 6, 4, 13]) AND user_type = ANY(ARRAY[0, 4, 5]) index_users_for_active_billable_users
  • (id) WHERE …(auditor) index_users_for_auditors
  • (admin) index_users_on_admin
  • (created_at) index_users_on_created_at
  • UNIQUE (email) index_users_on_email
  • (lower(split_part(CAST(email AS text), CAST('@' AS text), 2)), id) index_users_on_email_domain_and_id
  • (email) index_users_on_email_trigram
  • (feed_token) index_users_on_feed_token
  • (group_view) index_users_on_group_view
  • (id, last_activity_on) WHERE CAST(state AS text) = CAST('active' AS text) AND user_type = ANY(ARRAY[0, 4]) index_users_on_id_and_last_activity_on_for_active_human_service
  • (incoming_email_token) index_users_on_incoming_email_token
  • (managing_group_id) index_users_on_managing_group_id
  • (name) index_users_on_name
  • (name) index_users_on_name_trigram
  • (organization_id) index_users_on_organization_id
  • UNIQUE (organization_id, confirmation_token) index_users_on_organization_id_and_confirmation_token
  • UNIQUE (organization_id, reset_password_token) index_users_on_organization_id_and_reset_password_token
  • UNIQUE (organization_id, unlock_token) index_users_on_organization_id_and_unlock_token
  • (public_email) WHERE CAST(public_email AS text) <> CAST('' AS text) AND public_email IS NOT NULL index_users_on_public_email_excluding_null_and_empty
  • (public_email) index_users_on_public_email_trigram
  • (state, user_type) index_users_on_state_and_user_type
  • UNIQUE (static_object_token) index_users_on_static_object_token
  • (created_at, id) WHERE confirmed_at IS NULL AND CAST(state AS text) = CAST('active' AS text) AND user_type = 0 AND sign_in_count = 0 index_users_on_unconfirmed_created_at_active_type_sign_in_count
  • (unconfirmed_email) WHERE unconfirmed_email IS NOT NULL index_users_on_unconfirmed_email
  • (updated_at) index_users_on_updated_at
  • (user_type, id) index_users_on_user_type_and_id
  • (username) index_users_on_username
  • (username) index_users_on_username_trigram
  • (id) WHERE theme_id = 11 temp_index_on_users_where_dark_theme
  • (external) WHERE external IS NULL tmp_index_users_on_external_where_external_is_null

Referenced by

Table checks: project_view IS NOT NULL; user_type IS NOT NULL; hide_no_password IS NOT NULL; hide_no_ssh_key IS NOT NULL; char_length(static_object_token_encrypted) <= 255; notified_of_own_activity IS NOT NULL; char_length(otp_secret) <= 255

users_ops_dashboard_projects

5 cols · no RLS · line 33062View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE

Indexes

  • (project_id) index_users_ops_dashboard_projects_on_project_id
  • UNIQUE (user_id, project_id) index_users_ops_dashboard_projects_on_user_id_and_project_id

Referenced by

  • nothing

users_security_dashboard_projects

2 cols · no RLS · line 33079View in 3D
ColumnTypeNullDefaultReferencesNotes
user_id PKbigintNOT NULLusers.id 1:N · CASCADE
project_id PKbigintNOT NULLprojects.id 1:N · CASCADE

Indexes

  • (user_id) index_users_security_dashboard_projects_on_user_id

Referenced by

  • nothing

users_star_projects

5 cols · no RLS · line 33084View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
user_id bigintNOT NULL
created_at timestampnull
updated_at timestampnull

Indexes

  • (project_id) index_users_star_projects_on_project_id
  • UNIQUE (user_id, project_id) index_users_star_projects_on_user_id_and_project_id

Referenced by

  • nothing

users_statistics

15 cols · no RLS · line 33101View in 3D
  • Isolated tableusers_statistics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
without_groups_and_projects integerNOT NULL0
with_highest_role_guest integerNOT NULL0
with_highest_role_reporter integerNOT NULL0
with_highest_role_developer integerNOT NULL0
with_highest_role_maintainer integerNOT NULL0
with_highest_role_owner integerNOT NULL0
bots integerNOT NULL0
blocked integerNOT NULL0
with_highest_role_minimal_access integerNOT NULL0
with_highest_role_guest_with_custom_role integerNOT NULL0
with_highest_role_planner integerNOT NULL0
with_highest_role_security_manager integerNOT NULL0

Indexes

  • none

Referenced by

  • nothing

ai 31 tables

Tables whose names start with ai_.

Entity-relationship diagram: ai_audit_events, ai_events_counts, ai_usage_events, ai_active_context_collections, ai_active_context_connections, ai_active_context_migrations, ai_active_context_tasks, ai_agent_identities, ai_catalog_item_consumers, ai_catalog_item_stars, ai_catalog_item_version_dependencies, ai_catalog_item_versions, ai_catalog_items, ai_catalog_mcp_server_blocks, ai_catalog_mcp_servers, ai_catalog_mcp_servers_users, ai_conversation_messages, ai_conversation_threads, ai_feature_settings, ai_flow_triggers, ai_instance_accessible_entity_rules, ai_namespace_feature_access_rules, ai_namespace_feature_settings, ai_self_hosted_models, ai_settings, ai_testing_terms_acceptances, ai_tool_rules, ai_user_metrics, ai_vectorizable_file_upload_states, ai_vectorizable_file_uploads, ai_vectorizable_filesai_audit_eventsid PKbigintcreated_at PKtimestamptzcloud_event_iduuidauthor_idbigintproject_idbigintnamespace_idbigintevent_nametextip_addressinetworkflow_idbigintdetailstextai_events_countsid PKbigintevents_date PKdatenamespace_idbigintuser_idbigintorganization_id FKbiginteventsmallinttotal_occurrencesintegerai_usage_eventsid PKbiginttimestamp PKtimestamptzuser_idbigintorganization_id FKbigintcreated_attimestamptzeventsmallintextrasjsonbnamespace_id FKbigintai_active_context_collectionsid PKbigintnametextmetadatajsonbnumber_of_partitionsintegercreated_attimestamptzupdated_attimestamptzconnection_id FKbigintoptionsjsonbai_active_context_connectionsid PKbigintcreated_attimestamptzupdated_attimestamptzactivebooleannametextprefixtextadapter_classtextoptionsjsonbai_active_context_migrationsid PKbigintconnection_id FKbigintstarted_attimestamptzcompleted_attimestamptzcreated_attimestamptzupdated_attimestamptzstatussmallintretries_leftsmallintversiontextmetadatajsonberror_messagetextai_active_context_tasksid PKbigintcreated_attimestamptzupdated_attimestamptzconnection_id FKbigintdepends_on_id FKbigintstarted_attimestamptzcompleted_attimestamptzstatussmallintretries_leftsmallintnametexterror_messagetextparamsjsonbai_agent_identitiesid PKbigintuser_id FKbigintproject_id FKbigintrevoked_attimestamptzcreated_attimestamptzupdated_attimestamptzagent_typetextmachine_fingerprinttextai_catalog_item_consumersid PKbigintai_catalog_item_id FKbigintorganization_id FKbigintgroup_id FKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzenabledbooleanlockedbooleanpinned_version_prefixtextservice_account_id FKbigintparent_item_consumer_id FKbigintai_catalog_item_starsid PKbigintcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintai_catalog_item_id FKbigintuser_id FKbigintai_catalog_item_version_dependenciesid PKbigintai_catalog_item_version_id FKbigintdependency_id FKbigintorganization_id FKbigintai_catalog_item_versionsid PKbigintrelease_datetimestamptzcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintai_catalog_item_id FKbigintschema_versionsmallintversiontextdefinitionjsonbcreated_by_id FKbigintyaml_definition_filetextyaml_definition_file_storesmallintdeprecatedbooleanai_catalog_itemsid PKbigintorganization_id FKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzitem_typesmallintdescriptiontextnametextpublicbooleandeleted_attimestamptzlatest_version_id FKbigintlatest_released_version_id FKbigintverification_levelsmallintidentifiertextfoundational_flow_referencetextlast_30_day_usage_countintegerlast_30_day_usage_count_updated_attimestamptzstar_countintegervisibilitysmallintai_catalog_mcp_server_blocksid PKbigintcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintnamespace_id FKbigintai_catalog_mcp_server_id FKbigintcreated_by_id FKbigintai_catalog_mcp_serversid PKbigintcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintcreated_by_id FKbiginttransportsmallintauth_typesmallintnametextdescriptiontexturltexthomepage_urltextoauth_client_xidtextoauth_client_secretjsonbai_catalog_mcp_servers_usersid PKbigintcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintai_catalog_mcp_server_id FKbigintuser_id FKbiginttokenjsonbrefresh_tokenjsonbexpires_attimestamptzai_conversation_messagesid PKbigintthread_idbigintorganization_id FKbigintcreated_attimestamptzupdated_attimestamptzrolesmallinthas_feedbackbooleanextrasjsonberror_detailsjsonbcontenttextrequest_xidtextmessage_xidtextreferer_urltextai_conversation_threadsid PKbigintuser_id FKbigintorganization_id FKbigintlast_updated_attimestamptzcreated_attimestamptzupdated_attimestamptzconversation_typesmallintai_feature_settingsid PKbigintcreated_attimestamptzupdated_attimestamptzai_self_hosted_model_id FKbigintfeaturesmallintprovidersmallintai_flow_triggersid PKbigintproject_idbigintuser_idbigintconfig_pathtextdescriptiontextevent_typessmallint[]created_attimestamptzupdated_attimestamptzai_catalog_item_consumer_id FKbigintfilterjsonbai_instance_accessible_entity_rulesid PKbigintthrough_namespace_idbigintcreated_attimestamptzupdated_attimestamptzaccessible_entitytextai_namespace_feature_access_rulesid PKbigintcreated_attimestamptzupdated_attimestamptzroot_namespace_id FKbigintthrough_namespace_id FKbigintaccessible_entitytextai_namespace_feature_settingsid PKbigintcreated_attimestamptzupdated_attimestamptznamespace_id FKbigintfeaturesmallintoffered_model_reftextoffered_model_nametextmodel_allowlist_enabledbooleanmodel_allowlist_gitlab_model_refstext[]ai_self_hosted_modelsid PKbigintcreated_attimestamptzupdated_attimestamptzmodelsmallintendpointtextnametextencrypted_api_tokenbyteaencrypted_api_token_ivbyteaidentifiertextprovidersmallintai_settingsid PKbigintai_gateway_urltextsingletonbooleancreated_attimestamptzupdated_attimestamptzamazon_q_oauth_application_id FKbigintamazon_q_service_account_user_id FKbigintamazon_q_readybooleanamazon_q_role_arntextduo_workflow_service_account_user_id FKbigintduo_workflow_oauth_application_id FKbigintenabled_instance_verbose_ai_logsbooleanduo_core_features_enabledbooleanduo_agent_platform_service_urltextfoundational_agents_default_enabledbooleanai_gateway_timeout_secondsintegerminimum_access_level_executesmallintminimum_access_level_managesmallintminimum_access_level_enable_on_projectssmallintminimum_access_level_execute_asyncsmallintfeature_settingsjsonbself_hosted_duo_agent_platform_service_securebooleaninclude_recommended_allowedbooleanallow_all_unix_socketsbooleanenforce_on_local_clientsbooleanallow_project_extensionbooleanallowed_domainstext[]denied_domainstext[]organization_id FKbigintai_testing_terms_acceptancescreated_attimestamptzuser_id PKbigintuser_emailtextai_tool_rulesid PKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzweb_accesssmallintlocal_accesssmallinttool_nametexttool_sourcetexttool_argumentsjsonbproject_id FKbigintbackground_accesssmallintai_user_metricsuser_id PKbigintlast_duo_activity_ondateai_vectorizable_file_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzai_vectorizable_file_upload_id FKbigintproject_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextai_vectorizable_file_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextai_vectorizable_filesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintnametextfiletextnamespacesoauth_applicationsorganizationsprojectsusersdepends_on_idparent_item_consumer_idai_catalog_item_idconnection_idconnection_idconnection_iduser_idproject_idcreated_by_idorganization_idcreated_by_idorganization_idorganization_idorganization_iduser_idorganization_idai_self_hosted_model_idroot_namespace_idthrough_namespace_idnamespace_idamazon_q_oauth_application_idorganization_idduo_workflow_oauth_application_idduo_workflow_service_account_user_idamazon_q_service_account_user_idproject_idnamespace_idnamespace_idorganization_iduser_idproject_idai_vectorizable_file_upload_idproject_idproject_idorganization_idlatest_released_version_idlatest_version_idai_catalog_mcp_server_idnamespace_idorganization_idcreated_by_iduser_idai_catalog_mcp_server_idorganization_idgroup_idproject_idservice_account_idorganization_idai_catalog_item_idai_catalog_item_iduser_idorganization_iddependency_idorganization_idai_catalog_item_version_idai_catalog_item_consumer_id

Relationships

ai_audit_events

10 cols · no RLS · line 5983View in 3D
  • Isolated tableai_audit_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at PKtimestamptzNOT NULL
cloud_event_id uuidNOT NULL
author_id bigintNOT NULL
project_id bigintnull
namespace_id bigintnull
event_name textNOT NULLCHECK char_length(event_name) <= 255
ip_address inetnull
workflow_id bigintnull
details textnull

Indexes

  • UNIQUE (cloud_event_id, created_at) idx_ai_audit_events_on_cloud_event_id_created_at_unique
  • (namespace_id, created_at) idx_ai_audit_events_on_namespace_id_created_at
  • (project_id, created_at) idx_ai_audit_events_on_project_id_created_at
  • (workflow_id, created_at, id) idx_ai_audit_events_on_workflow_id_created_at_id

Referenced by

  • nothing

Table checks: char_length(event_name) <= 255; num_nonnulls(namespace_id, project_id) = 1

ai_events_counts

7 cols · no RLS · line 5999View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
events_date PKdateNOT NULL
namespace_id bigintnull
user_id bigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
event smallintNOT NULL
total_occurrences integerNOT NULL0

Indexes

  • UNIQUE (events_date, namespace_id, event, user_id) idx_ai_events_counts_unique_tuple
  • (organization_id) index_ai_events_counts_on_organization_id
  • (user_id) index_ai_events_counts_on_user_id

Referenced by

  • nothing

ai_usage_events

8 cols · no RLS · line 6010View in 3D
  • Nullable foreign key namespace_idai_usage_events.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
timestamp PKtimestamptzNOT NULL
user_id bigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
created_at timestamptzNOT NULL
event smallintNOT NULL
extras jsonbNOT NULLCAST('{}' AS jsonb)
namespace_id bigintnullnamespaces.id 1:N · SET NULL

Indexes

  • UNIQUE (namespace_id, user_id, event, timestamp) idx_ai_usage_events_uniqueness
  • (namespace_id, event, timestamp, id) index_ai_usage_events_on_namespace_id_event_timestamp_and_id
  • (organization_id) index_ai_usage_events_on_organization_id
  • (user_id) index_ai_usage_events_on_user_id

Referenced by

  • nothing

ai_active_context_collections

8 cols · no RLS · line 12732View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
metadata jsonbNOT NULLCAST('{}' AS jsonb)
number_of_partitions integerNOT NULL1
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
connection_id bigintNOT NULLai_active_context_connections.id 1:N · CASCADE
options jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • UNIQUE (connection_id, name) uniq_idx_ai_active_context_collections_on_connection_id_name

Referenced by

  • nothing

Table checks: char_length(name) <= 255

ai_active_context_connections

8 cols · no RLS · line 12753View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
active booleanNOT NULLFALSE
name textNOT NULLCHECK char_length(name) <= 255
prefix textnullCHECK char_length(prefix) <= 255
adapter_class textNOT NULLCHECK char_length(adapter_class) <= 255
options jsonbNOT NULL

Indexes

  • UNIQUE (active) WHERE active = TRUE index_active_context_connections_single_active
  • UNIQUE (name) index_ai_active_context_connections_on_name

Referenced by

Table checks: char_length(name) <= 255; char_length(adapter_class) <= 255; char_length(prefix) <= 255

ai_active_context_migrations

11 cols · no RLS · line 12776View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
connection_id bigintNOT NULLai_active_context_connections.id 1:N · CASCADE
started_at timestamptznull
completed_at timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
retries_left smallintNOT NULL
version textNOT NULLCHECK version ~ CAST('^[0-9]{14}$' AS text)
metadata jsonbNOT NULLCAST('{}' AS jsonb)
error_message textnullCHECK char_length(error_message) <= 1024

Indexes

  • (connection_id, status) index_ai_active_context_migrations_on_connection_and_status
  • UNIQUE (connection_id, version) index_ai_active_context_migrations_on_connection_and_version

Referenced by

  • nothing

Table checks: retries_left > 0 OR (retries_left = 0 AND status = 255); version ~ CAST('^[0-9]{14}$' AS text); char_length(error_message) <= 1024; char_length(version) <= 255

ai_active_context_tasks

12 cols · no RLS · line 12803View in 3D
  • Nullable foreign key depends_on_idai_active_context_tasks.depends_on_id may be NULL, so the relationship to ai_active_context_tasks is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
connection_id bigintNOT NULLai_active_context_connections.id 1:N · CASCADE
depends_on_id bigintnullai_active_context_tasks.id 1:N · SET NULL
started_at timestamptznull
completed_at timestamptznull
status smallintNOT NULL0
retries_left smallintNOT NULL3
name textNOT NULLCHECK char_length(name) <= 255
error_message textnullCHECK char_length(error_message) <= 1024
params jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (connection_id) index_ai_active_context_tasks_on_connection_id
  • (depends_on_id) index_ai_active_context_tasks_on_depends_on_id

Referenced by

Table checks: retries_left > 0 OR (retries_left = 0 AND status = 255); char_length(error_message) <= 1024; char_length(name) <= 255

ai_agent_identities

8 cols · no RLS · line 12830View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
revoked_at timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
agent_type textNOT NULLCHECK char_length(agent_type) <= 50
machine_fingerprint textNOT NULLCHECK char_length(machine_fingerprint) <= 64

Indexes

  • (project_id) idx_ai_agent_identities_on_project_id
  • UNIQUE (user_id, project_id, agent_type, machine_fingerprint) idx_ai_agent_identities_unique_identity

Referenced by

Table checks: char_length(machine_fingerprint) <= 64; char_length(agent_type) <= 50

ai_catalog_item_consumers

12 cols · no RLS · line 12861View in 3D
  • Nullable foreign key group_idai_catalog_item_consumers.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key parent_item_consumer_idai_catalog_item_consumers.parent_item_consumer_id may be NULL, so the relationship to ai_catalog_item_consumers is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idai_catalog_item_consumers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key service_account_idai_catalog_item_consumers.service_account_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idai_catalog_item_consumers.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK group_id, parent_item_consumer_id, project_id, service_account_id, organization_idai_catalog_item_consumers has several nullable FKs (group_id, parent_item_consumer_id, project_id, service_account_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
ai_catalog_item_id bigintNOT NULLai_catalog_items.id 1:N · RESTRICT
organization_id bigintnullorganizations.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
enabled booleanNOT NULLFALSE
locked booleanNOT NULLTRUE
pinned_version_prefix textnullCHECK char_length(pinned_version_prefix) <= 50
service_account_id bigintnullusers.id 1:1 · SET NULL
parent_item_consumer_id bigintnullai_catalog_item_consumers.id 1:N · CASCADE

Indexes

  • (ai_catalog_item_id) index_ai_catalog_item_consumers_on_ai_catalog_item_id
  • (group_id) index_ai_catalog_item_consumers_on_group_id
  • (organization_id) index_ai_catalog_item_consumers_on_organization_id
  • (parent_item_consumer_id) index_ai_catalog_item_consumers_on_parent_item_consumer_id
  • (project_id) index_ai_catalog_item_consumers_on_project_id
  • UNIQUE (service_account_id) index_ai_catalog_item_consumers_on_service_account_id_unique

Referenced by

Table checks: num_nonnulls(group_id, project_id) = 1; char_length(pinned_version_prefix) <= 50

ai_catalog_item_stars

6 cols · no RLS · line 12887View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
ai_catalog_item_id bigintNOT NULLai_catalog_items.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE

Indexes

  • (organization_id) idx_ai_catalog_item_stars_on_organization_id
  • UNIQUE (ai_catalog_item_id, user_id) index_ai_catalog_item_stars_on_item_and_user
  • (user_id) index_ai_catalog_item_stars_on_user_id

Referenced by

  • nothing

ai_catalog_item_version_dependencies

4 cols · no RLS · line 12905View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
ai_catalog_item_version_id bigintNOT NULLai_catalog_item_versions.id 1:N · CASCADE
dependency_id bigintNOT NULLai_catalog_items.id 1:N · CASCADE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE

Indexes

  • UNIQUE (ai_catalog_item_version_id, dependency_id, organization_id) idx_ai_catalog_item_version_dependencies_version_and_dependency
  • (dependency_id) index_ai_catalog_item_version_dependencies_on_dependency_id
  • (organization_id) index_ai_catalog_item_version_dependencies_on_organization_id

Referenced by

  • nothing

ai_catalog_item_versions

13 cols · no RLS · line 12921View in 3D
  • Nullable foreign key created_by_idai_catalog_item_versions.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Foreign-key cycle — ai_catalog_item_versions → ai_catalog_items → ai_catalog_item_versions. Rows must be inserted with a deferred constraint or a NULL-then-update dance; backups/restores and truncation have no valid order; ON DELETE CASCADE can loop.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
release_date timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
ai_catalog_item_id bigintNOT NULLai_catalog_items.id 1:N · CASCADE
schema_version smallintNOT NULL
version textNOT NULLCHECK char_length(version) <= 50
definition jsonbNOT NULLCAST('{}' AS jsonb)
created_by_id bigintnullusers.id 1:N · SET NULL
yaml_definition_file textnullCHECK char_length(yaml_definition_file) <= 255
yaml_definition_file_store smallintNOT NULL1
deprecated booleanNOT NULLFALSE

Indexes

  • UNIQUE (ai_catalog_item_id, version) idx_ai_catalog_item_version_unique
  • (created_by_id) index_ai_catalog_item_versions_on_created_by_id
  • (organization_id) index_ai_catalog_item_versions_on_organization_id

Referenced by

Table checks: char_length(yaml_definition_file) <= 255; char_length(version) <= 50

ai_catalog_items

19 cols · no RLS · line 12948View in 3D
  • Nullable foreign key project_idai_catalog_items.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key latest_released_version_idai_catalog_items.latest_released_version_id may be NULL, so the relationship to ai_catalog_item_versions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key latest_version_idai_catalog_items.latest_version_id may be NULL, so the relationship to ai_catalog_item_versions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Soft delete collides with non-partial UNIQUE organization_id, identifier, item_typeai_catalog_items soft-deletes via deleted_at, but (organization_id, identifier, item_type) is unique across live AND deleted rows. A user who deletes their account can never sign up again with the same value, and ON CONFLICT upserts will resurrect ghosts.
  • Either/or foreign keys without a CHECK project_id, latest_released_version_id, latest_version_idai_catalog_items has several nullable FKs (project_id, latest_released_version_id, latest_version_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
item_type smallintNOT NULL
description textNOT NULLCHECK char_length(description) <= 1024
name textNOT NULLCHECK char_length(name) <= 255
public booleanNOT NULLFALSE
deleted_at timestamptznull
latest_version_id bigintnullai_catalog_item_versions.id 1:N
latest_released_version_id bigintnullai_catalog_item_versions.id 1:N
verification_level smallintNOT NULL0
identifier textnullCHECK char_length(identifier) <= 255
foundational_flow_reference textnullCHECK char_length(foundational_flow_reference) <= 255
last_30_day_usage_count integerNOT NULL0
last_30_day_usage_count_updated_at timestamptzNOT NULLCAST('1970-01-01 00:00:00' AS timestamp)
star_count integerNOT NULL0CHECK star_count >= 0
visibility smallintNOT NULL0

Indexes

  • (foundational_flow_reference) index_ai_catalog_items_on_foundational_flow_reference
  • (item_type) index_ai_catalog_items_on_item_type
  • (last_30_day_usage_count_updated_at) index_ai_catalog_items_on_last_30_day_usage_count_updated_at
  • (latest_released_version_id) index_ai_catalog_items_on_latest_released_version_id
  • (latest_version_id) index_ai_catalog_items_on_latest_version_id
  • (organization_id, visibility) WHERE deleted_at IS NULL index_ai_catalog_items_on_org_id_and_visibility_not_deleted
  • (project_id) index_ai_catalog_items_on_project_id
  • (public) index_ai_catalog_items_on_public
  • (verification_level) index_ai_catalog_items_on_verification_level
  • (visibility) WHERE visibility = ANY(ARRAY[1, 2]) index_ai_catalog_items_on_visibility_public_and_restricted
  • (deleted_at) WHERE deleted_at IS NULL index_ai_catalog_items_where_deleted_at_is_null
  • UNIQUE (organization_id, identifier, item_type) unique_idx_ai_catalog_items_on_org_id_identifier_item_type

Referenced by

Table checks: char_length(identifier) <= 255; char_length(description) <= 1024; char_length(foundational_flow_reference) <= 255; star_count >= 0; char_length(name) <= 255

ai_catalog_mcp_server_blocks

7 cols · no RLS · line 12984View in 3D
  • Nullable foreign key created_by_idai_catalog_mcp_server_blocks.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
ai_catalog_mcp_server_id bigintNOT NULLai_catalog_mcp_servers.id 1:N · CASCADE
created_by_id bigintnullusers.id 1:N · SET NULL

Indexes

  • (ai_catalog_mcp_server_id) idx_ai_catalog_mcp_server_blocks_on_mcp_server_id
  • (namespace_id, ai_catalog_mcp_server_id) idx_ai_catalog_mcp_server_blocks_on_ns_and_server
  • UNIQUE (organization_id, namespace_id, ai_catalog_mcp_server_id) idx_ai_catalog_mcp_server_blocks_on_org_ns_server
  • (created_by_id) index_ai_catalog_mcp_server_blocks_on_created_by_id

Referenced by

  • nothing

ai_catalog_mcp_servers

13 cols · no RLS · line 13003View in 3D
  • Nullable foreign key created_by_idai_catalog_mcp_servers.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
created_by_id bigintnullusers.id 1:N · SET NULL
transport smallintNOT NULL0
auth_type smallintNOT NULL0
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 2048
url textNOT NULLCHECK char_length(url) <= 2048
homepage_url textnullCHECK char_length(homepage_url) <= 2048
oauth_client_xid textnullCHECK char_length(oauth_client_xid) <= 255
oauth_client_secret jsonbnull

Indexes

  • (organization_id) idx_ai_catalog_mcp_servers_on_organization_id
  • (created_by_id) index_ai_catalog_mcp_servers_on_created_by_id

Referenced by

Table checks: char_length(description) <= 2048; char_length(oauth_client_xid) <= 255; char_length(homepage_url) <= 2048; char_length(url) <= 2048; char_length(name) <= 255

ai_catalog_mcp_servers_users

9 cols · no RLS · line 13033View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
ai_catalog_mcp_server_id bigintNOT NULLai_catalog_mcp_servers.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
token jsonbnull
refresh_token jsonbnull
expires_at timestamptznull

Indexes

  • (organization_id) idx_ai_catalog_mcp_servers_users_on_organization_id
  • (user_id) index_ai_catalog_mcp_servers_users_on_user_id
  • UNIQUE (ai_catalog_mcp_server_id, user_id) index_mcp_servers_users_on_server_and_user

Referenced by

  • nothing

ai_conversation_messages

13 cols · no RLS · line 13054View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
thread_id bigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
role smallintNOT NULL
has_feedback booleannullFALSE
extras jsonbNOT NULLCAST('{}' AS jsonb)
error_details jsonbNOT NULLCAST('{}' AS jsonb)
content textNOT NULLCHECK char_length(content) <= 524288
request_xid textnullCHECK char_length(request_xid) <= 255
message_xid textnullCHECK char_length(message_xid) <= 255
referer_url textnullCHECK char_length(referer_url) <= 255

Indexes

  • (message_xid) index_ai_conversation_messages_on_message_xid
  • (organization_id) index_ai_conversation_messages_on_organization_id
  • (thread_id, created_at) index_ai_conversation_messages_on_thread_id_and_created_at

Referenced by

  • nothing

Table checks: char_length(content) <= 524288; char_length(request_xid) <= 255; char_length(message_xid) <= 255; char_length(referer_url) <= 255

ai_conversation_threads

7 cols · no RLS · line 13083View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
last_updated_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
conversation_type smallintNOT NULL

Indexes

  • (created_at) index_ai_conversation_threads_on_created_at
  • (last_updated_at) index_ai_conversation_threads_on_last_updated_at
  • (organization_id) index_ai_conversation_threads_on_organization_id
  • (user_id, last_updated_at) index_ai_conversation_threads_on_user_id_and_last_updated_at

Referenced by

  • nothing

ai_feature_settings

6 cols · no RLS · line 13111View in 3D
  • Nullable foreign key ai_self_hosted_model_idai_feature_settings.ai_self_hosted_model_id may be NULL, so the relationship to ai_self_hosted_models is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
ai_self_hosted_model_id bigintnullai_self_hosted_models.id 1:N · CASCADE
feature smallintNOT NULL
provider smallintNOT NULL

Indexes

  • (ai_self_hosted_model_id) index_ai_feature_settings_on_ai_self_hosted_model_id
  • UNIQUE (feature) index_ai_feature_settings_on_feature

Referenced by

  • nothing

ai_flow_triggers

10 cols · no RLS · line 13129View in 3D
  • Nullable foreign key ai_catalog_item_consumer_idai_flow_triggers.ai_catalog_item_consumer_id may be NULL, so the relationship to ai_catalog_item_consumers is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
user_id bigintnull
config_path textnullCHECK char_length(config_path) <= 255
description textNOT NULLCHECK char_length(description) <= 255
event_types smallint[]NOT NULLCAST('{}' AS smallint[])
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
ai_catalog_item_consumer_id bigintnullai_catalog_item_consumers.id 1:N · CASCADE
filter jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(filter) = CAST('object' AS text)

Indexes

  • (ai_catalog_item_consumer_id) index_ai_flow_triggers_on_ai_catalog_item_consumer_id
  • (project_id) index_ai_flow_triggers_on_project_id
  • (user_id, project_id) index_ai_flow_triggers_on_user_id_and_project_id

Referenced by

  • nothing

Table checks: char_length(description) <= 255; jsonb_typeof(filter) = CAST('object' AS text); num_nonnulls(ai_catalog_item_consumer_id, user_id) <= 1; char_length(config_path) <= 255

ai_instance_accessible_entity_rules

5 cols · no RLS · line 13155View in 3D
  • Isolated tableai_instance_accessible_entity_rules references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
through_namespace_id bigintnull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
accessible_entity textNOT NULLCHECK char_length(accessible_entity) <= 255

Indexes

  • UNIQUE (accessible_entity) WHERE through_namespace_id IS NULL idx_ai_iaer_default_rule_on_accessible_entity
  • UNIQUE (through_namespace_id, accessible_entity) index_ai_iaer_on_through_namespace_on_accessible_entity

Referenced by

  • nothing

Table checks: char_length(accessible_entity) <= 255

ai_namespace_feature_access_rules

6 cols · no RLS · line 13173View in 3D
  • Nullable foreign key through_namespace_idai_namespace_feature_access_rules.through_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
root_namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
through_namespace_id bigintnullnamespaces.id 1:N · CASCADE
accessible_entity textNOT NULLCHECK char_length(accessible_entity) <= 255

Indexes

  • UNIQUE (root_namespace_id, accessible_entity) WHERE through_namespace_id IS NULL idx_ai_nfar_default_rule_on_root_ns_accessible_entity
  • (root_namespace_id, accessible_entity) index_ai_nfar_on_root_namespace_on_accessible_entity
  • UNIQUE (through_namespace_id, accessible_entity) index_ai_nfar_on_through_namespace_on_accessible_entity

Referenced by

  • nothing

Table checks: char_length(accessible_entity) <= 255

ai_namespace_feature_settings

9 cols · no RLS · line 13192View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
feature smallintNOT NULL
offered_model_ref textnullCHECK char_length(offered_model_ref) <= 255
offered_model_name textnullCHECK char_length(offered_model_name) <= 255
model_allowlist_enabled booleanNOT NULLFALSE
model_allowlist_gitlab_model_refs text[]NOT NULLCAST('{}' AS text[])CHECK cardinality(model_allowlist_gitlab_model_refs) <= 100

Indexes

  • UNIQUE (namespace_id, feature) idx_namespace_feature_settings_on_namespace_id_and_feature

Referenced by

  • nothing

Table checks: cardinality(model_allowlist_gitlab_model_refs) <= 100; char_length(offered_model_ref) <= 255; char_length(offered_model_name) <= 255

ai_self_hosted_models

10 cols · no RLS · line 13216View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
model smallintNOT NULL
endpoint textnullCHECK char_length(endpoint) <= 2048
name textNOT NULLCHECK char_length(name) <= 255
encrypted_api_token byteanull
encrypted_api_token_iv byteanull
identifier textnullCHECK char_length(identifier) <= 255
provider smallintNOT NULL0

Indexes

  • UNIQUE (name) index_ai_self_hosted_models_on_name

Referenced by

Table checks: char_length(endpoint) <= 2048; char_length(name) <= 255; char_length(identifier) <= 255

ai_settings

29 cols · no RLS · line 13241View in 3D
  • Nullable foreign key amazon_q_oauth_application_idai_settings.amazon_q_oauth_application_id may be NULL, so the relationship to oauth_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idai_settings.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key duo_workflow_oauth_application_idai_settings.duo_workflow_oauth_application_id may be NULL, so the relationship to oauth_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key duo_workflow_service_account_user_idai_settings.duo_workflow_service_account_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key amazon_q_service_account_user_idai_settings.amazon_q_service_account_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK amazon_q_oauth_application_id, organization_id, duo_workflow_oauth_application_id, duo_workflow_service_account_user_id, amazon_q_service_account_user_idai_settings has several nullable FKs (amazon_q_oauth_application_id, organization_id, duo_workflow_oauth_application_id, duo_workflow_service_account_user_id, amazon_q_service_account_user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
ai_gateway_url textnullCHECK char_length(ai_gateway_url) <= 2048
singleton booleanNOT NULLTRUEAlways true, used for singleton enforcement
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
amazon_q_oauth_application_id bigintnulloauth_applications.id 1:N · SET NULL
amazon_q_service_account_user_id bigintnullusers.id 1:N · SET NULL
amazon_q_ready booleanNOT NULLFALSE
amazon_q_role_arn textnullCHECK char_length(amazon_q_role_arn) <= 2048
duo_workflow_service_account_user_id bigintnullusers.id 1:N · SET NULL
duo_workflow_oauth_application_id bigintnulloauth_applications.id 1:N · SET NULL
enabled_instance_verbose_ai_logs booleannull
duo_core_features_enabled booleannull
duo_agent_platform_service_url textnullCHECK char_length(duo_agent_platform_service_url) <= 2048
foundational_agents_default_enabled booleannullTRUE
ai_gateway_timeout_seconds integernull60
minimum_access_level_execute smallintnull
minimum_access_level_manage smallintnull
minimum_access_level_enable_on_projects smallintnull
minimum_access_level_execute_async smallintnull
feature_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(feature_settings) = CAST('object' AS text)
self_hosted_duo_agent_platform_service_secure booleanNOT NULLTRUE
include_recommended_allowed booleanNOT NULLFALSE
allow_all_unix_sockets booleanNOT NULLFALSE
enforce_on_local_clients booleanNOT NULLFALSE
allow_project_extension booleanNOT NULLTRUE
allowed_domains text[]NOT NULLCAST('{}' AS text[])
denied_domains text[]NOT NULLCAST('{}' AS text[])
organization_id bigintnullorganizations.id 1:1 · CASCADECHECK organization_id IS NOT NULL

Indexes

  • (amazon_q_oauth_application_id) index_ai_settings_on_amazon_q_oauth_application_id
  • (amazon_q_service_account_user_id) index_ai_settings_on_amazon_q_service_account_user_id
  • (duo_workflow_oauth_application_id) index_ai_settings_on_duo_workflow_oauth_application_id
  • (duo_workflow_service_account_user_id) index_ai_settings_on_duo_workflow_service_account_user_id
  • UNIQUE (organization_id) index_ai_settings_on_organization_id

Referenced by

  • nothing

Table checks: char_length(ai_gateway_url) <= 2048; organization_id IS NOT NULL; char_length(duo_agent_platform_service_url) <= 2048; char_length(amazon_q_role_arn) <= 2048; jsonb_typeof(feature_settings) = CAST('object' AS text)

ai_testing_terms_acceptances

3 cols · no RLS · line 13289View in 3D
  • Isolated tableai_testing_terms_acceptances references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
user_id PKbigintNOT NULL
user_email textNOT NULLCHECK char_length(user_email) <= 255

Indexes

  • none

Referenced by

  • nothing

Table checks: char_length(user_email) <= 255

ai_tool_rules

11 cols · no RLS · line 13296View in 3D
  • Nullable foreign key project_idai_tool_rules.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
web_access smallintnullCHECK web_access IS NULL OR web_access = ANY(ARRAY[0, 1, 2])
local_access smallintnullCHECK local_access IS NULL OR local_access = ANY(ARRAY[0, 1, 2])
tool_name textNOT NULLCHECK char_length(tool_name) <= 255
tool_source textnullCHECK char_length(tool_source) <= 255
tool_arguments jsonbnull
project_id bigintnullprojects.id 1:N · CASCADE
background_access smallintnullCHECK background_access IS NULL OR background_access = ANY(ARRAY[0, 2])

Indexes

  • UNIQUE (namespace_id, project_id, tool_name) idx_ai_tool_rules_ns_proj_tool_unique
  • (project_id) index_ai_tool_rules_on_project_id

Referenced by

  • nothing

Table checks: char_length(tool_source) <= 255; char_length(tool_name) <= 255; background_access IS NULL OR background_access = ANY(ARRAY[0, 2]); web_access IS NOT NULL OR local_access IS NOT NULL OR background_access IS NOT NULL; local_access IS NULL OR local_access = ANY(ARRAY[0, 1, 2]); web_access IS NULL OR web_access = ANY(ARRAY[0, 1, 2])

ai_user_metrics

2 cols · no RLS · line 13334View in 3D
ColumnTypeNullDefaultReferencesNotes
user_id PKbigintNOT NULLusers.id 1:1 · CASCADE
last_duo_activity_on dateNOT NULL

Indexes

  • none

Referenced by

  • nothing

ai_vectorizable_file_upload_states

10 cols · no RLS · line 13339View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
ai_vectorizable_file_upload_id bigintNOT NULLai_vectorizable_file_uploads.id 1:1 · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_ai_vec_file_upload_states_failed_verification
  • (ai_vectorizable_file_upload_id) WHERE verification_state = 0 OR verification_state = 3 idx_ai_vec_file_upload_states_needs_verification_id
  • (ai_vectorizable_file_upload_id, verification_started_at) WHERE verification_state = 1 idx_ai_vec_file_upload_states_on_verification_started
  • (verification_state) idx_ai_vec_file_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_ai_vec_file_upload_states_pending_verification
  • UNIQUE (ai_vectorizable_file_upload_id) idx_ai_vectorizable_file_upload_states_on_upload_id
  • (project_id) index_ai_vectorizable_file_upload_states_on_project_id

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

ai_vectorizable_file_uploads

16 cols · no RLS · line 13362View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnull
namespace_id bigintnull
project_id bigintnullCHECK project_id IS NOT NULL
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • (checksum) ai_vectorizable_file_uploads_checksum_idx
  • (model_id, model_type, uploader, created_at) ai_vectorizable_file_uploads_model_id_model_type_uploader_c_idx
  • (namespace_id) ai_vectorizable_file_uploads_namespace_id_idx
  • (organization_id) ai_vectorizable_file_uploads_organization_id_idx
  • (project_id) ai_vectorizable_file_uploads_project_id_idx
  • (store) ai_vectorizable_file_uploads_store_idx
  • (uploaded_by_user_id) ai_vectorizable_file_uploads_uploaded_by_user_id_idx
  • (uploader, path) ai_vectorizable_file_uploads_uploader_path_idx
  • UNIQUE (id) idx_ai_vec_file_upl_on_id_unique

Referenced by

Table checks: char_length(path) <= 511; project_id IS NOT NULL; char_length(checksum) <= 64

ai_vectorizable_files

6 cols · no RLS · line 13384View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
file textNOT NULLCHECK char_length(file) <= 255

Indexes

  • (project_id) index_ai_vectorizable_files_on_project_id

Referenced by

  • nothing

Table checks: char_length(file) <= 255; char_length(name) <= 255

audit 18 tables

Tables whose names start with audit_.

Entity-relationship diagram: audit_events, audit_events_amazon_s3_configurations, audit_events_external_audit_event_destinations, audit_events_google_cloud_logging_configurations, audit_events_group_external_streaming_destinations, audit_events_group_streaming_event_type_filters, audit_events_instance_amazon_s3_configurations, audit_events_instance_external_audit_event_destinations, audit_events_instance_external_streaming_destinations, audit_events_instance_google_cloud_logging_configurations, audit_events_instance_streaming_event_type_filters, audit_events_streaming_event_type_filters, audit_events_streaming_group_namespace_filters, audit_events_streaming_headers, audit_events_streaming_http_group_namespace_filters, audit_events_streaming_http_instance_namespace_filters, audit_events_streaming_instance_event_type_filters, audit_events_streaming_instance_namespace_filtersaudit_eventsid PKbigintauthor_idbigintentity_idbigintentity_typevarchardetailstextip_addressinetauthor_nametextentity_pathtexttarget_detailstextcreated_at PKtimestamptarget_typetexttarget_idbigintaudit_events_amazon_s3_configurationsid PKbigintcreated_attimestamptzupdated_attimestamptznamespace_id FKbigintaccess_key_xidtextnametextbucket_nametextaws_regiontextencrypted_secret_access_keybyteaencrypted_secret_access_key_ivbyteastream_destination_id FKbigintactivebooleanaudit_events_external_audit_event_destinationsid PKbigintnamespace_id FKbigintdestination_urltextcreated_attimestamptzupdated_attimestamptzverification_tokentextnametextstream_destination_id FKbigintactivebooleanaudit_events_google_cloud_logging_configurationsid PKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzgoogle_project_id_nametextclient_emailtextlog_id_nametextencrypted_private_keybyteaencrypted_private_key_ivbyteanametextstream_destination_id FKbigintactivebooleanaudit_events_group_external_streaming_destinationsid PKbigintcreated_attimestamptzupdated_attimestamptzgroup_id FKbigintcategorysmallintnametextconfigjsonbencrypted_secret_tokenbyteaencrypted_secret_token_ivbytealegacy_destination_refbigintactivebooleanaudit_events_group_streaming_event_type_filtersid PKbigintcreated_attimestamptzupdated_attimestamptzexternal_streaming_destination_id FKbigintnamespace_id FKbigintaudit_event_typetextkindsmallintaudit_events_instance_amazon_s3_configurationsid PKbigintcreated_attimestamptzupdated_attimestamptzaccess_key_xidtextnametextbucket_nametextaws_regiontextencrypted_secret_access_keybyteaencrypted_secret_access_key_ivbyteastream_destination_id FKbigintactivebooleanaudit_events_instance_external_audit_event_destinationsid PKbigintcreated_attimestamptzupdated_attimestamptzdestination_urltextencrypted_verification_tokenbyteaencrypted_verification_token_ivbyteanametextstream_destination_id FKbigintactivebooleanaudit_events_instance_external_streaming_destinationsid PKbigintcreated_attimestamptzupdated_attimestamptzcategorysmallintnametextconfigjsonbencrypted_secret_tokenbyteaencrypted_secret_token_ivbytealegacy_destination_refbigintactivebooleanaudit_events_instance_google_cloud_logging_configurationsid PKbigintcreated_attimestamptzupdated_attimestamptzgoogle_project_id_nametextclient_emailtextlog_id_nametextnametextencrypted_private_keybyteaencrypted_private_key_ivbyteastream_destination_id FKbigintactivebooleanaudit_events_instance_streaming_event_type_filtersid PKbigintcreated_attimestamptzupdated_attimestamptzexternal_streaming_destination_id FKbigintaudit_event_typetextaudit_events_streaming_event_type_filtersid PKbigintcreated_attimestamptzupdated_attimestamptzexternal_audit_event_destination_id FKbigintaudit_event_typetextgroup_id FKbigintaudit_events_streaming_group_namespace_filtersid PKbigintcreated_attimestamptzupdated_attimestamptzexternal_streaming_destination_id FKbigintnamespace_id FKbigintaudit_events_streaming_headersid PKbigintcreated_attimestamptzupdated_attimestamptzexternal_audit_event_destination_id FKbigintkeytextvaluetextactivebooleangroup_id FKbigintaudit_events_streaming_http_group_namespace_filtersid PKbigintcreated_attimestamptzupdated_attimestamptzexternal_audit_event_destination_id FKbigintnamespace_id FKbigintaudit_events_streaming_http_instance_namespace_filtersid PKbigintcreated_attimestamptzupdated_attimestamptzaudit_events_instance_external_audit_event_destination_id FKbigintnamespace_id FKbigintaudit_events_streaming_instance_event_type_filtersid PKbigintcreated_attimestamptzupdated_attimestamptzinstance_external_audit_event_destination_id FKbigintaudit_event_typetextaudit_events_streaming_instance_namespace_filtersid PKbigintcreated_attimestamptzupdated_attimestamptzexternal_streaming_destination_id FKbigintnamespace_id FKbigintnamespacesgroup_idstream_destination_idstream_destination_idstream_destination_idexternal_streaming_destination_idexternal_streaming_destination_idnamespace_idstream_destination_idnamespace_idstream_destination_idnamespace_idstream_destination_idnamespace_idnamespace_idexternal_streaming_destination_idexternal_streaming_destination_idnamespace_idnamespace_idaudit_events_instance_external_audit_event_destination_idinstance_external_audit_event_destination_idgroup_idexternal_audit_event_destination_idgroup_idexternal_audit_event_destination_idnamespace_idexternal_audit_event_destination_id

Relationships

audit_events

12 cols · no RLS · line 6029View in 3D
  • Enum-like column with no CHECK entity_typeentity_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity entity_type, entity_identity_id points at different tables depending on entity_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • Polymorphic reference without referential integrity target_type, target_idtarget_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tableaudit_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('audit_events_id_seq' AS regclass))
author_id bigintNOT NULL
entity_id bigintNOT NULL
entity_type varcharNOT NULL
details textnull
ip_address inetnull
author_name textnullCHECK char_length(author_name) <= 255
entity_path textnullCHECK char_length(entity_path) <= 5500
target_details textnullCHECK char_length(target_details) <= 5500
created_at PKtimestampNOT NULL
target_type textnullCHECK char_length(target_type) <= 255
target_id bigintnull

Indexes

  • (created_at, author_id) analytics_index_audit_events_part_on_created_at_and_author_id
  • (entity_id, entity_type, id, author_id, created_at) idx_audit_events_part_on_entity_id_desc_author_id_created_at
  • (entity_id, entity_type, created_at, id) index_audit_events_on_entity_id_and_entity_type_and_created_at

Referenced by

  • nothing

Table checks: char_length(entity_path) <= 5500; char_length(author_name) <= 255; char_length(target_type) <= 255; char_length(target_details) <= 5500

audit_events_amazon_s3_configurations

12 cols · no RLS · line 15232View in 3D
  • Nullable foreign key stream_destination_idaudit_events_amazon_s3_configurations.stream_destination_id may be NULL, so the relationship to audit_events_group_external_streaming_destinations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
access_key_xid textNOT NULLCHECK char_length(access_key_xid) <= 128
name textNOT NULLCHECK char_length(name) <= 72
bucket_name textNOT NULLCHECK char_length(bucket_name) <= 63
aws_region textNOT NULLCHECK char_length(aws_region) <= 50
encrypted_secret_access_key byteaNOT NULL
encrypted_secret_access_key_iv byteaNOT NULL
stream_destination_id bigintnullaudit_events_group_external_streaming_destinations.id 1:N · SET NULL
active booleanNOT NULLTRUE

Indexes

  • UNIQUE (stream_destination_id) WHERE stream_destination_id IS NOT NULL uniq_idx_audit_events_aws_configs_stream_dests
  • UNIQUE (namespace_id, bucket_name) unique_amazon_s3_configurations_namespace_id_and_bucket_name
  • UNIQUE (namespace_id, name) unique_amazon_s3_configurations_namespace_id_and_name

Referenced by

  • nothing

Table checks: char_length(bucket_name) <= 63; char_length(aws_region) <= 50; char_length(name) <= 72; char_length(access_key_xid) <= 128

audit_events_external_audit_event_destinations

9 cols · no RLS · line 15260View in 3D
  • Nullable foreign key stream_destination_idaudit_events_external_audit_event_destinations.stream_destination_id may be NULL, so the relationship to audit_events_group_external_streaming_destinations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
destination_url textNOT NULLCHECK char_length(destination_url) <= 255
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
verification_token textnullCHECK char_length(verification_token) <= 24
name textNOT NULLCHECK char_length(name) <= 72
stream_destination_id bigintnullaudit_events_group_external_streaming_destinations.id 1:N · SET NULL
active booleanNOT NULLTRUE

Indexes

  • UNIQUE (namespace_id, verification_token) index_audit_events_external_audit_on_ns_verification_token
  • UNIQUE (namespace_id, destination_url) index_external_audit_event_destinations_on_namespace_id
  • UNIQUE (stream_destination_id) WHERE stream_destination_id IS NOT NULL uniq_idx_audit_events_ext_audit_event_stream_dests
  • UNIQUE (namespace_id, name) unique_external_audit_event_destination_namespace_id_and_name

Referenced by

Table checks: char_length(destination_url) <= 255; char_length(verification_token) <= 24; char_length(name) <= 72

audit_events_google_cloud_logging_configurations

12 cols · no RLS · line 15284View in 3D
  • Nullable foreign key stream_destination_idaudit_events_google_cloud_logging_configurations.stream_destination_id may be NULL, so the relationship to audit_events_group_external_streaming_destinations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
google_project_id_name textNOT NULLCHECK char_length(google_project_id_name) <= 30
client_email textNOT NULLCHECK char_length(client_email) <= 254
log_id_name textnullCAST('audit_events' AS text)CHECK char_length(log_id_name) <= 511
encrypted_private_key byteaNOT NULL
encrypted_private_key_iv byteaNOT NULL
name textNOT NULLCHECK char_length(name) <= 72
stream_destination_id bigintnullaudit_events_group_external_streaming_destinations.id 1:N · SET NULL
active booleanNOT NULLTRUE

Indexes

  • UNIQUE (namespace_id, name) uniq_google_cloud_logging_configuration_namespace_id_and_name
  • UNIQUE (stream_destination_id) WHERE stream_destination_id IS NOT NULL uniq_idx_audit_events_gcp_configs_stream_dests
  • UNIQUE (namespace_id, google_project_id_name, log_id_name) unique_google_cloud_logging_configurations_on_namespace_id

Referenced by

  • nothing

Table checks: char_length(client_email) <= 254; char_length(google_project_id_name) <= 30; char_length(log_id_name) <= 511; char_length(name) <= 72

audit_events_group_external_streaming_destinations

11 cols · no RLS · line 15312View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
category smallintNOT NULL
name textNOT NULLCHECK char_length(name) <= 72
config jsonbNOT NULL
encrypted_secret_token byteaNOT NULLCHECK octet_length(encrypted_secret_token) <= 4112
encrypted_secret_token_iv byteaNOT NULL
legacy_destination_ref bigintnull
active booleanNOT NULLTRUE

Indexes

  • UNIQUE (group_id, category, name) unique_idx_group_destinations_on_name_category_group

Referenced by

Table checks: char_length(name) <= 72; octet_length(encrypted_secret_token) <= 4112

audit_events_group_streaming_event_type_filters

7 cols · no RLS · line 15337View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
external_streaming_destination_id bigintNOT NULLaudit_events_group_external_streaming_destinations.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
audit_event_type textNOT NULLCHECK char_length(audit_event_type) <= 255
kind smallintNOT NULL0

Indexes

  • (namespace_id) idx_audit_events_namespace_event_type_filters_on_group_id
  • UNIQUE (external_streaming_destination_id, audit_event_type) uniq_audit_group_event_filters_destination_id_and_event_type

Referenced by

  • nothing

Table checks: char_length(audit_event_type) <= 255

audit_events_instance_amazon_s3_configurations

11 cols · no RLS · line 15357View in 3D
  • Nullable foreign key stream_destination_idaudit_events_instance_amazon_s3_configurations.stream_destination_id may be NULL, so the relationship to audit_events_instance_external_streaming_destinations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
access_key_xid textNOT NULLCHECK char_length(access_key_xid) <= 128
name textNOT NULLCHECK char_length(name) <= 72
bucket_name textNOT NULLCHECK char_length(bucket_name) <= 63
aws_region textNOT NULLCHECK char_length(aws_region) <= 50
encrypted_secret_access_key byteaNOT NULL
encrypted_secret_access_key_iv byteaNOT NULL
stream_destination_id bigintnullaudit_events_instance_external_streaming_destinations.id 1:N · SET NULL
active booleanNOT NULLTRUE

Indexes

  • UNIQUE (stream_destination_id) WHERE stream_destination_id IS NOT NULL uniq_idx_audit_events_instance_aws_configs_stream_dests
  • UNIQUE (bucket_name) unique_instance_amazon_s3_configurations_bucket_name
  • UNIQUE (name) unique_instance_amazon_s3_configurations_name

Referenced by

  • nothing

Table checks: char_length(name) <= 72; char_length(bucket_name) <= 63; char_length(aws_region) <= 50; char_length(access_key_xid) <= 128

audit_events_instance_external_audit_event_destinations

9 cols · no RLS · line 15384View in 3D
  • Nullable foreign key stream_destination_idaudit_events_instance_external_audit_event_destinations.stream_destination_id may be NULL, so the relationship to audit_events_instance_external_streaming_destinations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
destination_url textNOT NULLCHECK char_length(destination_url) <= 255
encrypted_verification_token byteaNOT NULL
encrypted_verification_token_iv byteaNOT NULL
name textNOT NULLCHECK char_length(name) <= 72
stream_destination_id bigintnullaudit_events_instance_external_streaming_destinations.id 1:N · SET NULL
active booleanNOT NULLTRUE

Indexes

  • UNIQUE (stream_destination_id) WHERE stream_destination_id IS NOT NULL uniq_idx_audit_events_instance_ext_audit_event_stream_dests
  • UNIQUE (name) unique_instance_audit_event_destination_name

Referenced by

Table checks: char_length(name) <= 72; char_length(destination_url) <= 255

audit_events_instance_external_streaming_destinations

10 cols · no RLS · line 15407View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
category smallintNOT NULL
name textNOT NULLCHECK char_length(name) <= 72
config jsonbNOT NULL
encrypted_secret_token byteaNOT NULLCHECK octet_length(encrypted_secret_token) <= 4112
encrypted_secret_token_iv byteaNOT NULL
legacy_destination_ref bigintnull
active booleanNOT NULLTRUE

Indexes

  • UNIQUE (category, name) unique_idx_instance_destinations_on_name_category

Referenced by

Table checks: char_length(name) <= 72; octet_length(encrypted_secret_token) <= 4112

audit_events_instance_google_cloud_logging_configurations

11 cols · no RLS · line 15431View in 3D
  • Nullable foreign key stream_destination_idaudit_events_instance_google_cloud_logging_configurations.stream_destination_id may be NULL, so the relationship to audit_events_instance_external_streaming_destinations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
google_project_id_name textNOT NULLCHECK char_length(google_project_id_name) <= 30
client_email textNOT NULLCHECK char_length(client_email) <= 254
log_id_name textnullCAST('audit_events' AS text)CHECK char_length(log_id_name) <= 511
name textNOT NULLCHECK char_length(name) <= 72
encrypted_private_key byteaNOT NULL
encrypted_private_key_iv byteaNOT NULL
stream_destination_id bigintnullaudit_events_instance_external_streaming_destinations.id 1:N · SET NULL
active booleanNOT NULLTRUE

Indexes

  • UNIQUE (stream_destination_id) WHERE stream_destination_id IS NOT NULL uniq_idx_audit_events_instance_gcp_configs_stream_dests
  • UNIQUE (google_project_id_name, log_id_name) unique_instance_google_cloud_logging_configurations
  • UNIQUE (name) unique_instance_google_cloud_logging_configurations_name

Referenced by

  • nothing

Table checks: char_length(client_email) <= 254; char_length(log_id_name) <= 511; char_length(google_project_id_name) <= 30; char_length(name) <= 72

audit_events_instance_streaming_event_type_filters

5 cols · no RLS · line 15458View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
external_streaming_destination_id bigintNOT NULLaudit_events_instance_external_streaming_destinations.id 1:N · CASCADE
audit_event_type textNOT NULLCHECK char_length(audit_event_type) <= 255

Indexes

  • UNIQUE (external_streaming_destination_id, audit_event_type) uniq_audit_instance_event_filters_destination_id_and_event_type

Referenced by

  • nothing

Table checks: char_length(audit_event_type) <= 255

audit_events_streaming_event_type_filters

6 cols · no RLS · line 15476View in 3D
  • Nullable foreign key group_idaudit_events_streaming_event_type_filters.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
external_audit_event_destination_id bigintNOT NULLaudit_events_external_audit_event_destinations.id 1:N · CASCADE
audit_event_type textNOT NULLCHECK char_length(audit_event_type) <= 255
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • (group_id) index_audit_events_streaming_event_type_filters_on_group_id
  • UNIQUE (external_audit_event_destination_id, audit_event_type) unique_streaming_event_type_filters_destination_id

Referenced by

  • nothing

Table checks: group_id IS NOT NULL; char_length(audit_event_type) <= 255

audit_events_streaming_group_namespace_filters

5 cols · no RLS · line 15496View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
external_streaming_destination_id bigintNOT NULLaudit_events_group_external_streaming_destinations.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • (namespace_id) idx_streaming_group_namespace_filters_on_namespace_id
  • UNIQUE (external_streaming_destination_id, namespace_id) uniq_idx_streaming_group_destination_id_and_namespace_id

Referenced by

  • nothing

audit_events_streaming_headers

8 cols · no RLS · line 15513View in 3D
  • Nullable foreign key group_idaudit_events_streaming_headers.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
external_audit_event_destination_id bigintNOT NULLaudit_events_external_audit_event_destinations.id 1:N · CASCADE
key textNOT NULLCHECK char_length(key) <= 255
value textNOT NULLCHECK char_length(value) <= 2000
active booleanNOT NULLTRUE
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • UNIQUE (key, external_audit_event_destination_id) idx_external_audit_event_destination_id_key_uniq
  • (external_audit_event_destination_id) idx_streaming_headers_on_external_audit_event_destination_id
  • (group_id) index_audit_events_streaming_headers_on_group_id

Referenced by

  • nothing

Table checks: group_id IS NOT NULL; char_length(key) <= 255; char_length(value) <= 2000

audit_events_streaming_http_group_namespace_filters

5 cols · no RLS · line 15536View in 3D
  • Junction table allows duplicate links external_audit_event_destination_id, namespace_idaudit_events_streaming_http_group_namespace_filters looks like a many-to-many link table but has no unique constraint across (external_audit_event_destination_id, namespace_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
external_audit_event_destination_id bigintNOT NULLaudit_events_external_audit_event_destinations.id 1:1 · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:1 · CASCADE

Indexes

  • UNIQUE (external_audit_event_destination_id) unique_audit_events_group_namespace_filters_destination_id
  • UNIQUE (namespace_id) unique_audit_events_group_namespace_filters_namespace_id

Referenced by

  • nothing

audit_events_streaming_http_instance_namespace_filters

5 cols · no RLS · line 15553View in 3D
  • Junction table allows duplicate links audit_events_instance_external_audit_event_destination_id, namespace_idaudit_events_streaming_http_instance_namespace_filters looks like a many-to-many link table but has no unique constraint across (audit_events_instance_external_audit_event_destination_id, namespace_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
audit_events_instance_external_audit_event_destination_id bigintNOT NULLaudit_events_instance_external_audit_event_destinations.id 1:1 · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • (namespace_id) index_audit_events_instance_namespace_filters_on_namespace_id
  • UNIQUE (audit_events_instance_external_audit_event_destination_id) unique_audit_events_instance_namespace_filters_destination_id

Referenced by

  • nothing

audit_events_streaming_instance_event_type_filters

5 cols · no RLS · line 15570View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
instance_external_audit_event_destination_id bigintNOT NULLaudit_events_instance_external_audit_event_destinations.id 1:N · CASCADE
audit_event_type textNOT NULLCHECK char_length(audit_event_type) <= 255

Indexes

  • UNIQUE (instance_external_audit_event_destination_id, audit_event_type) unique_streaming_instance_event_type_filters_destination_id

Referenced by

  • nothing

Table checks: char_length(audit_event_type) <= 255

audit_events_streaming_instance_namespace_filters

5 cols · no RLS · line 15588View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
external_streaming_destination_id bigintNOT NULLaudit_events_instance_external_streaming_destinations.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • (namespace_id) idx_streaming_instance_namespace_filters_on_namespace_id
  • UNIQUE (external_streaming_destination_id, namespace_id) uniq_idx_streaming_destination_id_and_namespace_id

Referenced by

  • nothing

background 4 tables

Tables whose names start with background_.

Entity-relationship diagram: background_operation_jobs, background_operation_jobs_cell_local, background_operation_workers, background_operation_workers_cell_localbackground_operation_jobsid PKuuidworker_iduuidorganization_idbigintpartition PKbigintworker_partitionbigintcreated_attimestamptzstarted_attimestamptzfinished_attimestamptzbatch_sizeintegersub_batch_sizeintegerpause_msintegerstatussmallintattemptssmallintmetricsjsonbmin_cursorjsonbmax_cursorjsonbbackground_operation_jobs_cell_localid PKbigintpartition PKbigintworker_idbigintworker_partitionbigintcreated_attimestamptzstarted_attimestamptzfinished_attimestamptzbatch_sizeintegersub_batch_sizeintegerpause_msintegerstatussmallintattemptssmallintmetricsjsonbmin_cursorjsonbmax_cursorjsonbbackground_operation_workersid PKuuidorganization_idbigintuser_idbiginttotal_tuple_countbigintpartition PKbigintstarted_attimestamptzon_hold_untiltimestamptzcreated_attimestamptzfinished_attimestamptzbatch_sizeintegersub_batch_sizeintegerpause_msintegermax_batch_sizeintegerprioritysmallintstatussmallintintervalsmallintjob_class_nametextbatch_class_nametexttable_nametextcolumn_nametextgitlab_schematextjob_argumentsjsonbmin_cursorjsonbmax_cursorjsonbbackground_operation_workers_cell_localid PKbiginttotal_tuple_countbigintpartition PKbigintstarted_attimestamptzon_hold_untiltimestamptzcreated_attimestamptzfinished_attimestamptzbatch_sizeintegersub_batch_sizeintegerpause_msintegermax_batch_sizeintegerprioritysmallintstatussmallintintervalsmallintjob_class_nametextbatch_class_nametexttable_nametextcolumn_nametextgitlab_schematextjob_argumentsjsonbmin_cursorjsonbmax_cursorjsonb

Relationships

No foreign keys in this domain.

background_operation_jobs

16 cols · no RLS · line 6049View in 3D
  • Isolated tablebackground_operation_jobs references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKuuidNOT NULLgen_random_uuid()
worker_id uuidNOT NULL
organization_id bigintNOT NULL
partition PKbigintNOT NULL1
worker_partition bigintNOT NULL
created_at timestamptzNOT NULL
started_at timestamptznull
finished_at timestamptznull
batch_size integerNOT NULL
sub_batch_size integerNOT NULL
pause_ms integerNOT NULL100CHECK pause_ms >= 100
status smallintNOT NULL0
attempts smallintNOT NULL0
metrics jsonbNOT NULLCAST('{}' AS jsonb)
min_cursor jsonbnull
max_cursor jsonbnull

Indexes

  • (status) index_background_jobs_by_status
  • (created_at) index_background_operation_jobs_by_created_at
  • (organization_id) index_background_operation_jobs_by_organization

Referenced by

  • nothing

Table checks: jsonb_typeof(min_cursor) = CAST('array' AS text) AND jsonb_typeof(max_cursor) = CAST('array' AS text); pause_ms >= 100; num_nonnulls(min_cursor, max_cursor) = 2

background_operation_jobs_cell_local

15 cols · no RLS · line 6072View in 3D
  • Isolated tablebackground_operation_jobs_cell_local references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
partition PKbigintNOT NULL1
worker_id bigintNOT NULL
worker_partition bigintNOT NULL
created_at timestamptzNOT NULL
started_at timestamptznull
finished_at timestamptznull
batch_size integerNOT NULL
sub_batch_size integerNOT NULL
pause_ms integerNOT NULL100CHECK pause_ms >= 100
status smallintNOT NULL0
attempts smallintNOT NULL0
metrics jsonbNOT NULLCAST('{}' AS jsonb)
min_cursor jsonbnull
max_cursor jsonbnull

Indexes

  • (status) index_bj_cell_local_by_status

Referenced by

  • nothing

Table checks: pause_ms >= 100; num_nonnulls(min_cursor, max_cursor) = 2; jsonb_typeof(min_cursor) = CAST('array' AS text) AND jsonb_typeof(max_cursor) = CAST('array' AS text)

background_operation_workers

24 cols · no RLS · line 6094View in 3D
  • Isolated tablebackground_operation_workers references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKuuidNOT NULLgen_random_uuid()
organization_id bigintNOT NULL
user_id bigintNOT NULL
total_tuple_count bigintnull
partition PKbigintNOT NULL1
started_at timestamptznull
on_hold_until timestamptznull
created_at timestamptzNOT NULL
finished_at timestamptznull
batch_size integerNOT NULL
sub_batch_size integerNOT NULLCHECK sub_batch_size > 0
pause_ms integerNOT NULL100
max_batch_size integernull
priority smallintNOT NULL0
status smallintNOT NULL0
interval smallintNOT NULL
job_class_name textNOT NULLCHECK char_length(job_class_name) <= 100
batch_class_name textNOT NULLCHECK char_length(batch_class_name) <= 100
table_name textNOT NULLCHECK char_length(table_name) <= 63
column_name textNOT NULLCHECK char_length(column_name) <= 63
gitlab_schema textNOT NULLCHECK char_length(gitlab_schema) <= 255
job_arguments jsonbnullCAST('[]' AS jsonb)
min_cursor jsonbnull
max_cursor jsonbnull

Indexes

  • (created_at) index_background_operation_workers_by_created_at
  • (organization_id) index_background_operation_workers_by_organization
  • (status) index_background_operation_workers_by_status
  • (user_id) index_background_operation_workers_by_user
  • UNIQUE (partition, organization_id, job_class_name, table_name, column_name, job_arguments) WHERE status = ANY(ARRAY[0, 1, 2]) index_bow_on_unique_undone

Referenced by

  • nothing

Table checks: char_length(column_name) <= 63; char_length(gitlab_schema) <= 255; sub_batch_size > 0; char_length(job_class_name) <= 100; char_length(batch_class_name) <= 100; char_length(table_name) <= 63; batch_size >= sub_batch_size; num_nonnulls(min_cursor, max_cursor) = 2; jsonb_typeof(min_cursor) = CAST('array' AS text) AND jsonb_typeof(max_cursor) = CAST('array' AS text)

background_operation_workers_cell_local

22 cols · no RLS · line 6131View in 3D
  • Isolated tablebackground_operation_workers_cell_local references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
total_tuple_count bigintnull
partition PKbigintNOT NULL1
started_at timestamptznull
on_hold_until timestamptznull
created_at timestamptzNOT NULL
finished_at timestamptznull
batch_size integerNOT NULL
sub_batch_size integerNOT NULLCHECK sub_batch_size > 0
pause_ms integerNOT NULL100
max_batch_size integernull
priority smallintNOT NULL0
status smallintNOT NULL0
interval smallintNOT NULL
job_class_name textNOT NULLCHECK char_length(job_class_name) <= 100
batch_class_name textNOT NULLCHECK char_length(batch_class_name) <= 100
table_name textNOT NULLCHECK char_length(table_name) <= 63
column_name textNOT NULLCHECK char_length(column_name) <= 63
gitlab_schema textNOT NULLCHECK char_length(gitlab_schema) <= 255
job_arguments jsonbnullCAST('[]' AS jsonb)
min_cursor jsonbnull
max_cursor jsonbnull

Indexes

  • (status) index_bow_cell_local_by_status
  • UNIQUE (partition, job_class_name, table_name, column_name, job_arguments) WHERE status = ANY(ARRAY[0, 1, 2]) index_bow_cell_local_on_unique_undone

Referenced by

  • nothing

Table checks: char_length(table_name) <= 63; char_length(column_name) <= 63; char_length(gitlab_schema) <= 255; char_length(batch_class_name) <= 100; batch_size >= sub_batch_size; char_length(job_class_name) <= 100; num_nonnulls(min_cursor, max_cursor) = 2; sub_batch_size > 0; jsonb_typeof(min_cursor) = CAST('array' AS text) AND jsonb_typeof(max_cursor) = CAST('array' AS text)

backup 15 tables

Tables whose names start with backup_.

Entity-relationship diagram: backup_finding_evidences, backup_finding_flags, backup_finding_identifiers, backup_finding_links, backup_finding_remediations, backup_finding_signatures, backup_findings, backup_vulnerabilities, backup_vulnerability_external_issue_links, backup_vulnerability_issue_links, backup_vulnerability_merge_request_links, backup_vulnerability_reads, backup_vulnerability_severity_overrides, backup_vulnerability_state_transitions, backup_vulnerability_user_mentionsbackup_finding_evidencescreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintfinding_idbigintproject_idbigintdate PKdatedatajsonbbackup_finding_flagscreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintfinding_idbigintproject_idbigintdate PKdatedatajsonbbackup_finding_identifierscreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintfinding_idbigintproject_idbigintdate PKdatedatajsonbbackup_finding_linkscreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintfinding_idbigintproject_idbigintdate PKdatedatajsonbbackup_finding_remediationscreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintfinding_idbigintproject_idbigintdate PKdatedatajsonbbackup_finding_signaturescreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintfinding_idbigintproject_idbigintdate PKdatedatajsonbbackup_findingscreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintvulnerability_idbigintproject_idbigintdate PKdatedatajsonbbackup_vulnerabilitiescreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintproject_idbigintdate PKdatedatajsonbtraversal_idsbigint[]backup_vulnerability_external_issue_linkscreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintvulnerability_idbigintproject_idbigintdate PKdatedatajsonbbackup_vulnerability_issue_linkscreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintvulnerability_idbigintproject_idbigintdate PKdatedatajsonbbackup_vulnerability_merge_request_linkscreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintvulnerability_idbigintproject_idbigintdate PKdatedatajsonbbackup_vulnerability_readscreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintvulnerability_idbigintproject_idbigintdate PKdatedatajsonbbackup_vulnerability_severity_overridescreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintvulnerability_idbigintproject_idbigintdate PKdatedatajsonbbackup_vulnerability_state_transitionscreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintvulnerability_idbigintproject_idbigintdate PKdatedatajsonbbackup_vulnerability_user_mentionscreated_attimestamptzupdated_attimestamptzoriginal_record_identifier PKbigintvulnerability_idbigintproject_idbigintdate PKdatedatajsonb

Relationships

No foreign keys in this domain.

backup_finding_evidences

7 cols · no RLS · line 6166View in 3D
  • Isolated tablebackup_finding_evidences references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
original_record_identifier PKbigintNOT NULL
finding_id bigintNOT NULL
project_id bigintNOT NULL
date PKdateNOT NULL
data jsonbNOT NULL

Indexes

  • (finding_id) index_backup_finding_evidences_on_fk
  • (project_id) index_backup_finding_evidences_on_project_id

Referenced by

  • nothing

backup_finding_flags

7 cols · no RLS · line 6177View in 3D
  • Isolated tablebackup_finding_flags references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
original_record_identifier PKbigintNOT NULL
finding_id bigintNOT NULL
project_id bigintNOT NULL
date PKdateNOT NULL
data jsonbNOT NULL

Indexes

  • (finding_id) index_backup_finding_flags_on_fk
  • (project_id) index_backup_finding_flags_on_project_id

Referenced by

  • nothing

backup_finding_identifiers

7 cols · no RLS · line 6188View in 3D
  • Isolated tablebackup_finding_identifiers references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
original_record_identifier PKbigintNOT NULL
finding_id bigintNOT NULL
project_id bigintNOT NULL
date PKdateNOT NULL
data jsonbNOT NULL

Indexes

  • (finding_id) index_backup_finding_identifiers_on_fk
  • (project_id) index_backup_finding_identifiers_on_project_id

Referenced by

  • nothing

backup_finding_remediations

7 cols · no RLS · line 6210View in 3D
  • Isolated tablebackup_finding_remediations references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
original_record_identifier PKbigintNOT NULL
finding_id bigintNOT NULL
project_id bigintNOT NULL
date PKdateNOT NULL
data jsonbNOT NULL

Indexes

  • (finding_id) index_backup_finding_remediations_on_fk
  • (project_id) index_backup_finding_remediations_on_project_id

Referenced by

  • nothing

backup_finding_signatures

7 cols · no RLS · line 6221View in 3D
  • Isolated tablebackup_finding_signatures references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
original_record_identifier PKbigintNOT NULL
finding_id bigintNOT NULL
project_id bigintNOT NULL
date PKdateNOT NULL
data jsonbNOT NULL

Indexes

  • (finding_id) index_backup_finding_signatures_on_fk
  • (project_id) index_backup_finding_signatures_on_project_id

Referenced by

  • nothing

backup_findings

7 cols · no RLS · line 6232View in 3D
  • Isolated tablebackup_findings references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
original_record_identifier PKbigintNOT NULL
vulnerability_id bigintNOT NULL
project_id bigintNOT NULL
date PKdateNOT NULL
data jsonbNOT NULL

Indexes

  • (vulnerability_id) index_backup_findings_on_fk
  • (project_id) index_backup_findings_on_project_id

Referenced by

  • nothing

backup_vulnerabilities

7 cols · no RLS · line 6243View in 3D
  • Isolated tablebackup_vulnerabilities references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
original_record_identifier PKbigintNOT NULL
project_id bigintNOT NULL
date PKdateNOT NULL
data jsonbNOT NULL
traversal_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (traversal_ids, original_record_identifier) index_backup_vulnerabilities_for_restoring
  • (project_id) index_backup_vulnerabilities_on_project_id

Referenced by

  • nothing

backup_vulnerability_reads

7 cols · no RLS · line 6287View in 3D
  • Isolated tablebackup_vulnerability_reads references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
original_record_identifier PKbigintNOT NULL
vulnerability_id bigintNOT NULL
project_id bigintNOT NULL
date PKdateNOT NULL
data jsonbNOT NULL

Indexes

  • (vulnerability_id) index_backup_vulnerability_reads_on_fk
  • (project_id) index_backup_vulnerability_reads_on_project_id

Referenced by

  • nothing

backup_vulnerability_severity_overrides

7 cols · no RLS · line 6298View in 3D
  • Isolated tablebackup_vulnerability_severity_overrides references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
original_record_identifier PKbigintNOT NULL
vulnerability_id bigintNOT NULL
project_id bigintNOT NULL
date PKdateNOT NULL
data jsonbNOT NULL

Indexes

  • (vulnerability_id) index_backup_vulnerability_severity_overrides_on_fk
  • (project_id) index_backup_vulnerability_severity_overrides_on_project_id

Referenced by

  • nothing

backup_vulnerability_state_transitions

7 cols · no RLS · line 6309View in 3D
  • Isolated tablebackup_vulnerability_state_transitions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
original_record_identifier PKbigintNOT NULL
vulnerability_id bigintNOT NULL
project_id bigintNOT NULL
date PKdateNOT NULL
data jsonbNOT NULL

Indexes

  • (vulnerability_id) index_backup_vulnerability_state_transitions_on_fk
  • (project_id) index_backup_vulnerability_state_transitions_on_project_id

Referenced by

  • nothing

backup_vulnerability_user_mentions

7 cols · no RLS · line 6320View in 3D
  • Isolated tablebackup_vulnerability_user_mentions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
original_record_identifier PKbigintNOT NULL
vulnerability_id bigintNOT NULL
project_id bigintNOT NULL
date PKdateNOT NULL
data jsonbNOT NULL

Indexes

  • (vulnerability_id) index_backup_vulnerability_user_mentions_on_fk
  • (project_id) index_backup_vulnerability_user_mentions_on_project_id

Referenced by

  • nothing

batched 3 tables

Tables whose names start with batched_.

Entity-relationship diagram: batched_background_migration_job_transition_logs, batched_background_migration_jobs, batched_background_migrationsbatched_background_migration_job_transition_logsid PKbigintbatched_background_migration_job_id FKbigintcreated_at PKtimestamptzupdated_attimestamptzprevious_statussmallintnext_statussmallintexception_classtextexception_messagetextbatched_background_migration_jobsid PKbigintcreated_attimestamptzupdated_attimestamptzstarted_attimestamptzfinished_attimestamptzbatched_background_migration_id FKbigintmin_valuebigintmax_valuebigintbatch_sizeintegersub_batch_sizeintegerstatussmallintattemptssmallintmetricsjsonbpause_msintegermin_cursorjsonbmax_cursorjsonbbatched_background_migrationsid PKbigintcreated_attimestamptzupdated_attimestamptzmin_valuebigintmax_valuebigintbatch_sizeintegersub_batch_sizeintegerintervalsmallintstatussmallintjob_class_nametextbatch_class_nametexttable_nametextcolumn_nametextjob_argumentsjsonbtotal_tuple_countbigintpause_msintegermax_batch_sizeintegerstarted_attimestamptzon_hold_untiltimestamptzgitlab_schematextfinished_attimestamptzqueued_migration_versiontextmin_cursorjsonbmax_cursorjsonbbatched_background_migration_idbatched_background_migration_job_id

Relationships

batched_background_migration_job_transition_logs

8 cols · no RLS · line 6331View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
batched_background_migration_job_id bigintNOT NULLbatched_background_migration_jobs.id 1:N · CASCADE
created_at PKtimestamptzNOT NULL
updated_at timestamptzNOT NULL
previous_status smallintNOT NULL
next_status smallintNOT NULL
exception_class textnullCHECK char_length(exception_class) <= 100
exception_message textnullCHECK char_length(exception_message) <= 1000

Indexes

  • (batched_background_migration_job_id) i_batched_background_migration_job_transition_logs_on_job_id

Referenced by

  • nothing

Table checks: char_length(exception_message) <= 1000; char_length(exception_class) <= 100

batched_background_migration_jobs

16 cols · no RLS · line 15738View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
started_at timestamptznull
finished_at timestamptznull
batched_background_migration_id bigintNOT NULLbatched_background_migrations.id 1:N · CASCADE
min_value bigintnull
max_value bigintnull
batch_size integerNOT NULL
sub_batch_size integerNOT NULL
status smallintNOT NULL0
attempts smallintNOT NULL0
metrics jsonbNOT NULLCAST('{}' AS jsonb)
pause_ms integerNOT NULL100CHECK pause_ms >= 100
min_cursor jsonbnull
max_cursor jsonbnull

Indexes

  • (batched_background_migration_id, id) index_batched_jobs_by_batched_migration_id_and_id
  • (batched_background_migration_id, status) index_batched_jobs_on_batched_migration_id_and_status
  • (batched_background_migration_id, max_cursor) WHERE max_cursor IS NOT NULL index_migration_jobs_on_migration_id_and_cursor_max_value
  • (batched_background_migration_id, finished_at) index_migration_jobs_on_migration_id_and_finished_at
  • (batched_background_migration_id, max_value) index_migration_jobs_on_migration_id_and_max_value

Referenced by

Table checks: jsonb_typeof(min_cursor) = CAST('array' AS text) AND jsonb_typeof(max_cursor) = CAST('array' AS text); pause_ms >= 100; num_nonnulls(min_value, max_value) = 2 OR num_nonnulls(min_cursor, max_cursor) = 2

batched_background_migrations

24 cols · no RLS · line 15769View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
min_value bigintnull1CHECK min_value > 0
max_value bigintnull
batch_size integerNOT NULL
sub_batch_size integerNOT NULLCHECK sub_batch_size > 0
interval smallintNOT NULL
status smallintNOT NULL0
job_class_name textNOT NULLCHECK char_length(job_class_name) <= 100
batch_class_name textNOT NULLCAST('PrimaryKeyBatchingStrategy' AS text)CHECK char_length(batch_class_name) <= 100
table_name textNOT NULLCHECK char_length(table_name) <= 63
column_name textNOT NULLCHECK char_length(column_name) <= 63
job_arguments jsonbNOT NULLCAST('[]' AS jsonb)
total_tuple_count bigintnull
pause_ms integerNOT NULL100CHECK pause_ms >= 100
max_batch_size integernull
started_at timestamptznull
on_hold_until timestamptznullexecution of this migration is on hold until this time
gitlab_schema textNOT NULLCHECK char_length(gitlab_schema) <= 255
finished_at timestamptznull
queued_migration_version textnullCHECK char_length(queued_migration_version) <= 14
min_cursor jsonbnull
max_cursor jsonbnull

Indexes

  • (status) index_batched_background_migrations_on_status
  • UNIQUE (job_class_name, table_name, column_name, job_arguments) index_batched_background_migrations_on_unique_configuration
  • UNIQUE (gitlab_schema, job_class_name, table_name, column_name, job_arguments) index_batched_migrations_on_gl_schema_and_unique_configuration
  • UNIQUE (queued_migration_version) unique_batched_background_migrations_queued_migration_version

Referenced by

Table checks: char_length(gitlab_schema) <= 255; jsonb_typeof(min_cursor) = CAST('array' AS text) AND jsonb_typeof(max_cursor) = CAST('array' AS text); char_length(column_name) <= 63; pause_ms >= 100; char_length(table_name) <= 63; char_length(queued_migration_version) <= 14; batch_size >= sub_batch_size; char_length(job_class_name) <= 100; num_nonnulls(min_value, max_value) = 2 OR num_nonnulls(min_cursor, max_cursor) = 2; char_length(batch_class_name) <= 100; max_value >= min_value; min_value > 0; sub_batch_size > 0

p 102 tables

Tables whose names start with p_.

Entity-relationship diagram: p_ci_build_names, p_ci_build_needs, p_ci_build_sources, p_ci_build_trace_metadata, p_ci_builds, p_ci_job_annotations, p_ci_job_artifact_reports, p_ci_job_artifacts, p_ci_job_definition_instances, p_ci_job_definitions, p_ci_job_inputs, p_ci_job_messages, p_ci_job_runtime_environments, p_ci_pipeline_artifact_states, p_ci_pipeline_variables, p_ci_pipelines, p_ci_runner_machine_builds, p_ci_stages, p_ci_workload_variable_inclusions, p_ci_workloads, p_ai_active_context_code_enabled_namespaces, p_ai_active_context_code_repositories, p_batched_git_ref_updates_deletions, p_catalog_resource_sync_events, p_ci_finished_build_ch_sync_events, p_ci_finished_pipeline_ch_sync_events, p_ci_runtime_environments, p_duo_workflows_checkpoint_blobs, p_duo_workflows_checkpoint_headers, p_duo_workflows_checkpoints, p_generated_ref_commits, p_knowledge_graph_code_indexing_tasks, p_sent_notifications, p_ci_builds_partition_overrides, p_ci_builds_partition_overrides_0, p_ci_builds_partition_overrides_1, p_ci_builds_partition_overrides_2, p_ci_pipeline_iids, p_ci_pipeline_iids_00, p_ci_pipeline_iids_01, p_ci_pipeline_iids_02, p_ci_pipeline_iids_03, p_ci_pipeline_iids_04, p_ci_pipeline_iids_05, p_ci_pipeline_iids_06, p_ci_pipeline_iids_07, p_ci_pipeline_iids_08, p_ci_pipeline_iids_09, p_ci_pipeline_iids_10, p_ci_pipeline_iids_11, p_ci_pipeline_iids_12, p_ci_pipeline_iids_13, p_ci_pipeline_iids_14, p_ci_pipeline_iids_15, p_ci_pipeline_iids_16, p_ci_pipeline_iids_17, p_ci_pipeline_iids_18, p_ci_pipeline_iids_19, p_ci_pipeline_iids_20, p_ci_pipeline_iids_21, p_ci_pipeline_iids_22, p_ci_pipeline_iids_23, p_ci_pipeline_iids_24, p_ci_pipeline_iids_25, p_ci_pipeline_iids_26, p_ci_pipeline_iids_27, p_ci_pipeline_iids_28, p_ci_pipeline_iids_29, p_ci_pipeline_iids_30, p_ci_pipeline_iids_31, p_ci_pipeline_iids_32, p_ci_pipeline_iids_33, p_ci_pipeline_iids_34, p_ci_pipeline_iids_35, p_ci_pipeline_iids_36, p_ci_pipeline_iids_37, p_ci_pipeline_iids_38, p_ci_pipeline_iids_39, p_ci_pipeline_iids_40, p_ci_pipeline_iids_41, p_ci_pipeline_iids_42, p_ci_pipeline_iids_43, p_ci_pipeline_iids_44, p_ci_pipeline_iids_45, p_ci_pipeline_iids_46, p_ci_pipeline_iids_47, p_ci_pipeline_iids_48, p_ci_pipeline_iids_49, p_ci_pipeline_iids_50, p_ci_pipeline_iids_51, p_ci_pipeline_iids_52, p_ci_pipeline_iids_53, p_ci_pipeline_iids_54, p_ci_pipeline_iids_55, p_ci_pipeline_iids_56, p_ci_pipeline_iids_57, p_ci_pipeline_iids_58, p_ci_pipeline_iids_59, p_ci_pipeline_iids_60, p_ci_pipeline_iids_61, p_ci_pipeline_iids_62, p_ci_pipeline_iids_63p_ci_build_namesbuild_id PKbigintpartition_id PKbigintproject_idbigintnametextsearch_vectortsvectorp_ci_build_needsnametextartifactsbooleanoptionalbooleanbuild_id FKbigintpartition_id PKbigintid PKbigintproject_idbigintp_ci_build_sourcesbuild_id PKbigintpartition_id PKbigintproject_idbigintsourcesmallintpipeline_sourcesmallintp_ci_build_trace_metadatabuild_id PKbigintpartition_id PKbiginttrace_artifact_id FKbigintlast_archival_attempt_attimestamptzarchived_attimestamptzarchival_attemptssmallintchecksumbytearemote_checksumbyteaproject_idbigintp_ci_buildsstatusvarcharfinished_attimestampcreated_attimestampupdated_attimestampstarted_attimestampcoveragedouble precisionnamevarcharallow_failurebooleanstage_idxintegertagbooleanrefvarchartypevarchartarget_urlvarchardescriptionvarcharerased_attimestampartifacts_expire_attimestampenvironmentvarcharwhenvarcharqueued_attimestamplock_versionintegercoverage_regexvarcharretriedbooleanprotectedbooleanfailure_reasonintegerscheduled_attimestamptztoken_encryptedvarcharresource_group_id FKbigintwaiting_for_resource_attimestamptzprocessedbooleanscheduling_typesmallintid PKbigintstage_id FKbigintpartition_id PKbigintauto_canceled_by_partition_id FKbigintauto_canceled_by_id FKbigintcommit_id FKbiginterased_by_idbigintproject_idbigintrunner_idbigintupstream_pipeline_id FKbigintuser_idbigintupstream_pipeline_partition_id FKbigintscoped_user_idbiginttimeoutintegertimeout_sourcesmallintexit_codesmallintdebug_trace_enabledbooleanp_ci_job_annotationsid PKbigintpartition_id PKbigintjob_id FKbigintnametextdatajsonbproject_idbigintp_ci_job_artifact_reportsjob_artifact_id PKbigintpartition_id PKbigintproject_idbigintstatussmallintvalidation_errortextp_ci_job_artifactsproject_idbigintfile_typeintegersizebigintcreated_attimestamptzupdated_attimestamptzexpire_attimestamptzfilevarcharfile_storeintegerfile_sha256byteafile_formatsmallintfile_locationsmallintid PKbigintjob_id FKbigintlockedsmallintpartition_id PKbigintaccessibilitysmallintfile_final_pathtextexposed_astextexposed_pathstext[]p_ci_job_definition_instancesjob_id PKbigintjob_definition_id FKbigintpartition_id PKbigintproject_idbigintp_ci_job_definitionsid PKbigintpartition_id PKbigintproject_idbigintcreated_attimestamptzupdated_attimestamptzinterruptiblebooleanchecksumbyteaconfigjsonbp_ci_job_inputsid PKbigintjob_id FKbigintpartition_id PKbigintproject_idbigintnametextvaluejsonbp_ci_job_messagesid PKbigintjob_id FKbigintpartition_id PKbigintproject_idbigintseveritysmallintcontenttextp_ci_job_runtime_environmentsbuild_id PKbigintpartition_id PKbigintruntime_environment_idbigintrunner_machine_idbigintproject_idbigintsuspend_on_successbooleansuspend_on_failurebooleanp_ci_pipeline_artifact_statesverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzpipeline_artifact_id PKbigintpartition_id PKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextproject_idbigintp_ci_pipeline_variableskeyvarcharencrypted_valuetextencrypted_value_saltvarcharencrypted_value_ivvarcharvariable_typesmallintpartition_id PKbigintrawbooleanid PKbigintpipeline_id FKbigintproject_idbigintp_ci_pipelinesrefvarcharshavarcharbefore_shavarcharcreated_attimestampupdated_attimestamptagbooleanyaml_errorstextcommitted_attimestampproject_idbigintstatusvarcharstarted_attimestampfinished_attimestampdurationintegeruser_idbigintlock_versionintegerpipeline_schedule_id FKbigintsourceintegerconfig_sourceintegerprotectedbooleanfailure_reasonintegeriidintegermerge_request_idbigintsource_shabyteatarget_shabyteaexternal_pull_request_id FKbigintci_ref_id FKbigintlockedsmallintpartition_id PKbigintid PKbigintauto_canceled_by_id FKbigintauto_canceled_by_partition_id FKbiginttrigger_idbigintp_ci_runner_machine_buildspartition_id PKbigintbuild_id PKbigintrunner_machine_idbigintproject_idbigintp_ci_stagesproject_idbigintcreated_attimestampupdated_attimestampnamevarcharstatusintegerlock_versionintegerpositionintegerid PKbigintpartition_id PKbigintpipeline_id FKbigintp_ci_workload_variable_inclusionsid PKbigintworkload_id FKbigintpartition_id PKbigintproject_idbigintcreated_attimestamptzupdated_attimestamptzvariable_nametextp_ci_workloadsid PKbigintpartition_id PKbigintproject_idbigintpipeline_id FKbigintcreated_attimestamptzupdated_attimestamptzbranch_nametextstatussmallintp_ai_active_context_code_enabled_namespacesid PKbigintnamespace_id PKbigintconnection_idbigintmetadatajsonbstatesmallintcreated_attimestamptzupdated_attimestamptzp_ai_active_context_code_repositoriesid PKbigintproject_id PKbigintconnection_idbigintenabled_namespace_idbigintmetadatajsonblast_committextstatesmallintindexed_attimestamptzcreated_attimestamptzupdated_attimestamptzlast_queried_attimestamptzp_batched_git_ref_updates_deletionsid PKbigintproject_idbigintpartition_id PKbigintcreated_attimestamptzupdated_attimestamptzstatussmallintreftextp_catalog_resource_sync_eventsid PKbigintcatalog_resource_idbigintproject_idbigintpartition_id PKbigintstatussmallintcreated_attimestamptzupdated_attimestamptzp_ci_finished_build_ch_sync_eventsbuild_id PKbigintpartition PKbigintbuild_finished_attimestampprocessedbooleanproject_idbigintp_ci_finished_pipeline_ch_sync_eventspipeline_id PKbigintproject_namespace_idbigintpartition PKbigintpipeline_finished_attimestampprocessedbooleanp_ci_runtime_environmentsid PKbigintpartition PKbigintproject_idbigintcreated_attimestamptzupdated_attimestamptzenvironment_keytextp_duo_workflows_checkpoint_blobsid PKbigintworkflow_id FKbigintproject_idbigintnamespace_idbigintworkflow_created_at PKtimestamptzcreated_attimestamptzupdated_attimestamptzcurrent_threadintegerthread_tstextchanneltextversiontextwrite_typetextstep_actiontextdatabyteap_duo_workflows_checkpoint_headersid PKbigintworkflow_id FKbigintproject_idbigintnamespace_idbigintworkflow_created_at PKtimestamptzcreated_attimestamptzupdated_attimestamptzcurrent_threadintegercheckpointjsonbmetadatajsonbthread_tstextparent_tstextcheckpoint_nstextp_duo_workflows_checkpointsid PKbigintworkflow_id FKbigintproject_idbigintcreated_at PKtimestamptzupdated_attimestamptznamespace_idbigintthread_tstextparent_tstextcheckpointjsonbmetadatajsonbui_chat_logjsonbcurrent_threadintegercheckpoint_nstextp_generated_ref_commitsid PKbigintmerge_request_iid FKbigintproject_id PKbigintcreated_attimestamptzupdated_attimestamptzcommit_shabyteap_knowledge_graph_code_indexing_tasksid PKbigintproject_idbigintcreated_at PKtimestamptzupdated_attimestamptzreftextcommit_shatexttraversal_pathtextp_sent_notificationsid PKbigintproject_idbigintnoteable_idbigintrecipient_idbigintissue_email_participant_id FKbigintnamespace_idbigintcreated_attimestamptzpartition PKintegernoteable_typetextcommit_idtextreply_keytextin_reply_to_discussion_idtextp_ci_builds_partition_overridesbuild_id PKbigintpartition_id FKbigintproject_idbigintp_ci_builds_partition_overrides_0build_id PKbigintpartition_idbigintproject_idbigintp_ci_builds_partition_overrides_1build_id PKbigintpartition_idbigintproject_idbigintp_ci_builds_partition_overrides_2build_id PKbigintpartition_idbigintproject_idbigintp_ci_pipeline_iidsproject_id PKbigintiid PKintegerp_ci_pipeline_iids_00project_id PKbigintiid PKintegerp_ci_pipeline_iids_01project_id PKbigintiid PKintegerp_ci_pipeline_iids_02project_id PKbigintiid PKintegerp_ci_pipeline_iids_03project_id PKbigintiid PKintegerp_ci_pipeline_iids_04project_id PKbigintiid PKintegerp_ci_pipeline_iids_05project_id PKbigintiid PKintegerp_ci_pipeline_iids_06project_id PKbigintiid PKintegerp_ci_pipeline_iids_07project_id PKbigintiid PKintegerp_ci_pipeline_iids_08project_id PKbigintiid PKintegerp_ci_pipeline_iids_09project_id PKbigintiid PKintegerp_ci_pipeline_iids_10project_id PKbigintiid PKintegerp_ci_pipeline_iids_11project_id PKbigintiid PKintegerp_ci_pipeline_iids_12project_id PKbigintiid PKintegerp_ci_pipeline_iids_13project_id PKbigintiid PKintegerp_ci_pipeline_iids_14project_id PKbigintiid PKintegerp_ci_pipeline_iids_15project_id PKbigintiid PKintegerp_ci_pipeline_iids_16project_id PKbigintiid PKintegerp_ci_pipeline_iids_17project_id PKbigintiid PKintegerp_ci_pipeline_iids_18project_id PKbigintiid PKintegerp_ci_pipeline_iids_19project_id PKbigintiid PKintegerp_ci_pipeline_iids_20project_id PKbigintiid PKintegerp_ci_pipeline_iids_21project_id PKbigintiid PKintegerp_ci_pipeline_iids_22project_id PKbigintiid PKintegerp_ci_pipeline_iids_23project_id PKbigintiid PKintegerp_ci_pipeline_iids_24project_id PKbigintiid PKintegerp_ci_pipeline_iids_25project_id PKbigintiid PKintegerp_ci_pipeline_iids_26project_id PKbigintiid PKintegerp_ci_pipeline_iids_27project_id PKbigintiid PKintegerp_ci_pipeline_iids_28project_id PKbigintiid PKintegerp_ci_pipeline_iids_29project_id PKbigintiid PKintegerp_ci_pipeline_iids_30project_id PKbigintiid PKintegerp_ci_pipeline_iids_31project_id PKbigintiid PKintegerp_ci_pipeline_iids_32project_id PKbigintiid PKintegerp_ci_pipeline_iids_33project_id PKbigintiid PKintegerp_ci_pipeline_iids_34project_id PKbigintiid PKintegerp_ci_pipeline_iids_35project_id PKbigintiid PKintegerp_ci_pipeline_iids_36project_id PKbigintiid PKintegerp_ci_pipeline_iids_37project_id PKbigintiid PKintegerp_ci_pipeline_iids_38project_id PKbigintiid PKintegerp_ci_pipeline_iids_39project_id PKbigintiid PKintegerp_ci_pipeline_iids_40project_id PKbigintiid PKintegerp_ci_pipeline_iids_41project_id PKbigintiid PKintegerp_ci_pipeline_iids_42project_id PKbigintiid PKintegerp_ci_pipeline_iids_43project_id PKbigintiid PKintegerp_ci_pipeline_iids_44project_id PKbigintiid PKintegerp_ci_pipeline_iids_45project_id PKbigintiid PKintegerp_ci_pipeline_iids_46project_id PKbigintiid PKintegerp_ci_pipeline_iids_47project_id PKbigintiid PKintegerp_ci_pipeline_iids_48project_id PKbigintiid PKintegerp_ci_pipeline_iids_49project_id PKbigintiid PKintegerp_ci_pipeline_iids_50project_id PKbigintiid PKintegerp_ci_pipeline_iids_51project_id PKbigintiid PKintegerp_ci_pipeline_iids_52project_id PKbigintiid PKintegerp_ci_pipeline_iids_53project_id PKbigintiid PKintegerp_ci_pipeline_iids_54project_id PKbigintiid PKintegerp_ci_pipeline_iids_55project_id PKbigintiid PKintegerp_ci_pipeline_iids_56project_id PKbigintiid PKintegerp_ci_pipeline_iids_57project_id PKbigintiid PKintegerp_ci_pipeline_iids_58project_id PKbigintiid PKintegerp_ci_pipeline_iids_59project_id PKbigintiid PKintegerp_ci_pipeline_iids_60project_id PKbigintiid PKintegerp_ci_pipeline_iids_61project_id PKbigintiid PKintegerp_ci_pipeline_iids_62project_id PKbigintiid PKintegerp_ci_pipeline_iids_63project_id PKbigintiid PKintegerci_pipeline_schedulesci_refsci_resource_groupsduo_workflows_workflowsexternal_pull_requestsissue_email_participantsmerge_requestsnamespacesprojectsauto_canceled_by_partition_id, auto_canceled_by_idnamespace_idexternal_pull_request_idpipeline_schedule_idci_ref_idworkflow_idworkflow_idworkflow_idproject_id, merge_request_iidproject_idissue_email_participant_idpartition_id, pipeline_idpartition_id, pipeline_idpartition_id, pipeline_idpartition_id, stage_idresource_group_idupstream_pipeline_partition_id, upstream_pipeline_idauto_canceled_by_partition_id, auto_canceled_by_idpartition_id, commit_idpartition_id, workload_idpartition_id, build_idpartition_id, build_idpartition_id, build_idpartition_id, build_idpartition_id, job_idpartition_id, job_idpartition_id, job_definition_idpartition_id, job_idpartition_id, job_idpartition_id, job_idpartition_id, build_idpartition_id, trace_artifact_idpartition_id, build_idpartition_id, job_artifact_id

Relationships

p_ci_build_names

5 cols · no RLS · line 6345View in 3D
ColumnTypeNullDefaultReferencesNotes
build_id PKbigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
partition_id PKbigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
project_id bigintNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
search_vector tsvectornull

Indexes

  • (project_id, build_id) index_p_ci_build_names_on_project_id_and_build_id
  • (search_vector) index_p_ci_build_names_on_search_vector

Referenced by

  • nothing

Table checks: char_length(name) <= 255

p_ci_build_needs

7 cols · no RLS · line 6355View in 3D
  • Foreign key without index partition_id, build_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan p_ci_build_needs to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_build_needs maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
name textNOT NULL
artifacts booleanNOT NULLTRUE
optional booleanNOT NULLFALSE
build_id bigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
partition_id PKbigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
id PKbigintNOT NULL
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • UNIQUE (build_id, name, partition_id) p_ci_build_needs_build_id_name_partition_id_idx
  • (project_id) p_ci_build_needs_project_id_idx

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

p_ci_build_sources

5 cols · no RLS · line 6367View in 3D
ColumnTypeNullDefaultReferencesNotes
build_id PKbigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
partition_id PKbigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
project_id bigintNOT NULL
source smallintnull
pipeline_source smallintnull

Indexes

  • (pipeline_source) index_p_ci_build_sources_on_pipeline_source
  • (project_id, build_id) index_p_ci_build_sources_on_project_id_and_build_id
  • (project_id, source, build_id, partition_id) index_p_ci_build_sources_on_search_columns

Referenced by

  • nothing

p_ci_build_trace_metadata

9 cols · no RLS · line 6376View in 3D
  • Foreign key without index partition_id, trace_artifact_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_job_artifacts must scan p_ci_build_trace_metadata to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_build_trace_metadata maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_job_artifacts rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
  • Nullable foreign key partition_id, trace_artifact_idp_ci_build_trace_metadata.partition_id.trace_artifact_id may be NULL, so the relationship to p_ci_job_artifacts is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
build_id PKbigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
partition_id PKbigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
trace_artifact_id bigintnullp_ci_job_artifacts.partition_id 1:N · CASCADE
last_archival_attempt_at timestamptznull
archived_at timestamptznull
archival_attempts smallintNOT NULL0
checksum byteanull
remote_checksum byteanull
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (project_id) index_p_ci_build_trace_metadata_on_project_id
  • (trace_artifact_id) index_p_ci_build_trace_metadata_on_trace_artifact_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

p_ci_builds

47 cols · no RLS · line 6390View in 3D
  • Foreign key without index partition_id, stage_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_stages must scan p_ci_builds to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_builds maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_stages rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
  • Foreign key without index upstream_pipeline_partition_id, upstream_pipeline_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan p_ci_builds to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_builds maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
  • Foreign key without index auto_canceled_by_partition_id, auto_canceled_by_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan p_ci_builds to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_builds maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
  • Foreign key without index partition_id, commit_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan p_ci_builds to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_builds maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
  • Nullable foreign key partition_id, stage_idp_ci_builds.partition_id.stage_id may be NULL, so the relationship to p_ci_stages is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key resource_group_idp_ci_builds.resource_group_id may be NULL, so the relationship to ci_resource_groups is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key upstream_pipeline_partition_id, upstream_pipeline_idp_ci_builds.upstream_pipeline_partition_id.upstream_pipeline_id may be NULL, so the relationship to p_ci_pipelines is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key auto_canceled_by_partition_id, auto_canceled_by_idp_ci_builds.auto_canceled_by_partition_id.auto_canceled_by_id may be NULL, so the relationship to p_ci_pipelines is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key partition_id, commit_idp_ci_builds.partition_id.commit_id may be NULL, so the relationship to p_ci_pipelines is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK statusstatus is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Enum-like column with no CHECK typetype is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • TIMESTAMP without time zone finished_atfinished_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone started_atstarted_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone erased_aterased_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone artifacts_expire_atartifacts_expire_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone queued_atqueued_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Wide table (47 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
status varcharnull
finished_at timestampnull
created_at timestampnull
updated_at timestampnull
started_at timestampnull
coverage double precisionnull
name varcharnull
allow_failure booleanNOT NULLFALSE
stage_idx integernull
tag booleannull
ref varcharnull
type varcharnull
target_url varcharnull
description varcharnull
erased_at timestampnull
artifacts_expire_at timestampnull
environment varcharnull
when varcharnull
queued_at timestampnull
lock_version integernull0CHECK lock_version IS NOT NULL
coverage_regex varcharnull
retried booleannull
protected booleannull
failure_reason integernull
scheduled_at timestamptznull
token_encrypted varcharnull
resource_group_id bigintnullci_resource_groups.id 1:N · SET NULL
waiting_for_resource_at timestamptznull
processed booleannull
scheduling_type smallintnull
id PKbigintNOT NULL
stage_id bigintnullp_ci_stages.partition_id 1:N · CASCADE
partition_id PKbigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
auto_canceled_by_partition_id bigintnullp_ci_pipelines.partition_id 1:N · SET NULL
auto_canceled_by_id bigintnullp_ci_pipelines.partition_id 1:N · SET NULL
commit_id bigintnullp_ci_pipelines.partition_id 1:N · CASCADE
erased_by_id bigintnull
project_id bigintnullCHECK project_id IS NOT NULL
runner_id bigintnull
upstream_pipeline_id bigintnullp_ci_pipelines.partition_id 1:N · CASCADE
user_id bigintnull
upstream_pipeline_partition_id bigintnullp_ci_pipelines.partition_id 1:N · CASCADE
scoped_user_id bigintnull
timeout integernull
timeout_source smallintnull
exit_code smallintnull
debug_trace_enabled booleannull

Indexes

  • (auto_canceled_by_id) WHERE auto_canceled_by_id IS NOT NULL p_ci_builds_auto_canceled_by_id_idx
  • (commit_id, artifacts_expire_at, id) WHERE CAST(type AS text) = CAST('Ci::Build' AS text) AND (retried = FALSE OR retried IS NULL) AND CAST(name AS text) = ANY(ARRAY[CAST(CAST('sast' AS varchar) AS text), CAST(CAST('secret_detection' AS varchar) AS text), CAST(CAST('dependency_scanning' AS varchar) AS text), CAST(CAST('container_scanning' AS varchar) AS text), CAST(CAST('dast' AS varchar) AS text)]) p_ci_builds_commit_id_artifacts_expire_at_id_idx
  • (commit_id, stage_idx, created_at) p_ci_builds_commit_id_stage_idx_created_at_idx
  • (commit_id, status, type) p_ci_builds_commit_id_status_type_idx
  • (commit_id, type, name, ref) p_ci_builds_commit_id_type_name_ref_idx
  • (commit_id, type, ref) p_ci_builds_commit_id_type_ref_idx
  • (name, id) WHERE CAST(name AS text) = ANY(ARRAY[CAST(CAST('container_scanning' AS varchar) AS text), CAST(CAST('dast' AS varchar) AS text), CAST(CAST('dependency_scanning' AS varchar) AS text), CAST(CAST('license_management' AS varchar) AS text), CAST(CAST('sast' AS varchar) AS text), CAST(CAST('secret_detection' AS varchar) AS text), CAST(CAST('coverage_fuzzing' AS varchar) AS text), CAST(CAST('license_scanning' AS varchar) AS text), CAST(CAST('apifuzzer_fuzz' AS varchar) AS text), CAST(CAST('apifuzzer_fuzz_dnd' AS varchar) AS text)]) AND CAST(type AS text) = CAST('Ci::Build' AS text) p_ci_builds_name_id_idx
  • (project_id, id) p_ci_builds_project_id_id_idx
  • (project_id, name, ref) WHERE CAST(type AS text) = CAST('Ci::Build' AS text) AND CAST(status AS text) = CAST('success' AS text) AND (retried = FALSE OR retried IS NULL) p_ci_builds_project_id_name_ref_idx
  • (project_id, status) WHERE CAST(type AS text) = CAST('Ci::Build' AS text) AND CAST(status AS text) = ANY(ARRAY[CAST(CAST('running' AS varchar) AS text), CAST(CAST('pending' AS varchar) AS text), CAST(CAST('created' AS varchar) AS text)]) p_ci_builds_project_id_status_idx
  • (resource_group_id, status, commit_id) WHERE resource_group_id IS NOT NULL p_ci_builds_resource_group_id_status_commit_id_idx
  • (runner_id, id) p_ci_builds_runner_id_id_idx
  • (runner_id) WHERE CAST(status AS text) = CAST('running' AS text) AND CAST(type AS text) = CAST('Ci::Build' AS text) p_ci_builds_runner_id_idx
  • (scheduled_at) WHERE scheduled_at IS NOT NULL AND CAST(type AS text) = CAST('Ci::Build' AS text) AND CAST(status AS text) = CAST('scheduled' AS text) p_ci_builds_scheduled_at_idx
  • (stage_id) p_ci_builds_stage_id_idx
  • (status, created_at, project_id) WHERE CAST(type AS text) = CAST('Ci::Build' AS text) p_ci_builds_status_created_at_project_id_idx
  • (status, type, runner_id) p_ci_builds_status_type_runner_id_idx
  • UNIQUE (token_encrypted, partition_id) WHERE token_encrypted IS NOT NULL p_ci_builds_token_encrypted_partition_id_idx
  • (updated_at) p_ci_builds_updated_at_idx
  • (upstream_pipeline_id) WHERE upstream_pipeline_id IS NOT NULL p_ci_builds_upstream_pipeline_id_idx
  • (user_id, created_at) WHERE CAST(type AS text) = CAST('Ci::Build' AS text) p_ci_builds_user_id_created_at_idx
  • (user_id) p_ci_builds_user_id_idx

Referenced by

Table checks: lock_version IS NOT NULL; project_id IS NOT NULL

p_ci_job_annotations

6 cols · no RLS · line 6443View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
partition_id PKbigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
job_id bigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
data jsonbNOT NULLCAST('[]' AS jsonb)CHECK jsonb_typeof(data) = CAST('array' AS text)
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • UNIQUE (partition_id, job_id, name) index_p_ci_job_annotations_on_partition_id_job_id_name
  • (project_id) index_p_ci_job_annotations_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(name) <= 255; jsonb_typeof(data) = CAST('array' AS text)

p_ci_job_artifact_reports

5 cols · no RLS · line 6456View in 3D
ColumnTypeNullDefaultReferencesNotes
job_artifact_id PKbigintNOT NULLp_ci_job_artifacts.partition_id 1:1 · CASCADE
partition_id PKbigintNOT NULLp_ci_job_artifacts.partition_id 1:1 · CASCADE
project_id bigintNOT NULL
status smallintNOT NULL
validation_error textnullCHECK char_length(validation_error) <= 255

Indexes

  • (project_id) index_p_ci_job_artifact_reports_on_project_id

Referenced by

  • nothing

Table checks: char_length(validation_error) <= 255

p_ci_job_artifacts

19 cols · no RLS · line 6466View in 3D
  • Foreign key without index partition_id, job_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan p_ci_job_artifacts to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_job_artifacts maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
project_id bigintNOT NULL
file_type integerNOT NULL
size bigintnull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
expire_at timestamptznull
file varcharnull
file_store integernull1CHECK file_store IS NOT NULL
file_sha256 byteanull
file_format smallintnull
file_location smallintnull
id PKbigintNOT NULL
job_id bigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
locked smallintnull2
partition_id PKbigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
accessibility smallintNOT NULL0
file_final_path textnullCHECK char_length(file_final_path) <= 1024
exposed_as textnullCHECK char_length(exposed_as) <= 100
exposed_paths text[]null

Indexes

  • (expire_at) WHERE locked = 0 AND file_type <> 3 AND expire_at IS NOT NULL p_ci_job_artifacts_expire_at_idx
  • (expire_at, job_id) WHERE locked = 2 AND expire_at IS NOT NULL p_ci_job_artifacts_expire_at_job_id_idx1
  • (file_final_path) WHERE file_final_path IS NOT NULL p_ci_job_artifacts_file_final_path_idx
  • (file_store) p_ci_job_artifacts_file_store_idx
  • (file_type, project_id, created_at) WHERE file_type = ANY(ARRAY[5, 6, 8, 23]) p_ci_job_artifacts_file_type_project_id_created_at_idx
  • (id) WHERE file_type = 18 p_ci_job_artifacts_id_idx
  • UNIQUE (job_id, file_type, partition_id) p_ci_job_artifacts_job_id_file_type_partition_id_idx
  • (project_id, created_at, id) p_ci_job_artifacts_project_id_created_at_id_idx
  • (project_id, file_type, id) p_ci_job_artifacts_project_id_file_type_id_idx
  • (project_id, id) WHERE file_type = 18 p_ci_job_artifacts_project_id_id_idx
  • (project_id, id) p_ci_job_artifacts_project_id_id_idx1
  • (project_id) WHERE file_type = ANY(ARRAY[5, 6, 7, 8]) p_ci_job_artifacts_project_id_idx1

Referenced by

Table checks: file_store IS NOT NULL; char_length(file_final_path) <= 1024; char_length(exposed_as) <= 100

p_ci_job_definition_instances

4 cols · no RLS · line 6492View in 3D
  • Foreign key without index partition_id, job_definition_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_job_definitions must scan p_ci_job_definition_instances to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_job_definition_instances maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_job_definitions rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
  • Junction table allows duplicate links job_definition_id, job_id, partition_idp_ci_job_definition_instances looks like a many-to-many link table but has no unique constraint across (job_definition_id, job_id, partition_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
job_id PKbigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
job_definition_id bigintNOT NULLp_ci_job_definitions.partition_id 1:N · RESTRICT
partition_id PKbigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
project_id bigintNOT NULL

Indexes

  • (job_definition_id) index_p_ci_job_definition_instances_on_job_definition_id
  • (project_id) index_p_ci_job_definition_instances_on_project_id

Referenced by

  • nothing

p_ci_job_definitions

8 cols · no RLS · line 6500View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
partition_id PKbigintNOT NULL
project_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptznull
interruptible booleanNOT NULLFALSE
checksum byteaNOT NULL
config jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (interruptible) index_p_ci_job_definitions_on_interruptible
  • UNIQUE (project_id, checksum, partition_id) index_p_ci_job_definitions_on_project_id_and_checksum

Referenced by

p_ci_job_inputs

6 cols · no RLS · line 6512View in 3D
  • Foreign key without index partition_id, job_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan p_ci_job_inputs to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_job_inputs maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
job_id bigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
partition_id PKbigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
project_id bigintNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
value jsonbnull

Indexes

  • UNIQUE (job_id, name, partition_id) index_p_ci_job_inputs_on_job_id_and_name
  • (project_id) index_p_ci_job_inputs_on_project_id

Referenced by

  • nothing

Table checks: char_length(name) <= 255

p_ci_job_messages

6 cols · no RLS · line 6523View in 3D
  • Foreign key without index partition_id, job_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan p_ci_job_messages to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_job_messages maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
job_id bigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
partition_id PKbigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
project_id bigintNOT NULL
severity smallintNOT NULL0
content textnullCHECK char_length(content) <= 10000

Indexes

  • (job_id) index_p_ci_job_messages_on_job_id
  • (project_id) index_p_ci_job_messages_on_project_id

Referenced by

  • nothing

Table checks: char_length(content) <= 10000

p_ci_job_runtime_environments

7 cols · no RLS · line 6534View in 3D
  • Isolated tablep_ci_job_runtime_environments references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
build_id PKbigintNOT NULL
partition_id PKbigintNOT NULL
runtime_environment_id bigintnull
runner_machine_id bigintnull
project_id bigintNOT NULL
suspend_on_success booleanNOT NULLFALSE
suspend_on_failure booleanNOT NULLFALSE

Indexes

  • (project_id) idx_p_ci_job_runtime_envs_on_project_id
  • (runner_machine_id) idx_p_ci_job_runtime_envs_on_runner_machine_id
  • (runtime_environment_id, build_id, runner_machine_id) idx_p_ci_job_runtime_envs_on_runtime_environment_id

Referenced by

  • nothing

p_ci_pipeline_artifact_states

10 cols · no RLS · line 6545View in 3D
  • Isolated tablep_ci_pipeline_artifact_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
pipeline_artifact_id PKbigintNOT NULL
partition_id PKbigintNOT NULL
verification_state smallintNOT NULL0
verification_retry_count smallintnull0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_ci_pipeline_artifact_states_failed_verification
  • (pipeline_artifact_id) WHERE verification_state = 0 OR verification_state = 3 index_ci_pipeline_artifact_states_needs_verification_id
  • UNIQUE (pipeline_artifact_id, partition_id) index_ci_pipeline_artifact_states_on_artifact_and_partition
  • (pipeline_artifact_id, verification_started_at) WHERE verification_state = 1 index_ci_pipeline_artifact_states_on_verification_started
  • (verified_at) WHERE verification_state = 0 index_ci_pipeline_artifact_states_pending_verification
  • (verification_state, pipeline_artifact_id) index_on_pipeline_artifact_id_partition_id_verification_state
  • (project_id) index_p_ci_pipeline_artifact_states_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(verification_failure) <= 255

p_ci_pipeline_variables

10 cols · no RLS · line 6561View in 3D
  • Foreign key without index partition_id, pipeline_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan p_ci_pipeline_variables to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_pipeline_variables maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
key varcharNOT NULL
encrypted_value textnull
encrypted_value_salt varcharnull
encrypted_value_iv varcharnull
variable_type smallintNOT NULL1
partition_id PKbigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
raw booleanNOT NULLFALSE
id PKbigintNOT NULL
pipeline_id bigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (project_id) index_p_ci_pipeline_variables_on_project_id
  • UNIQUE (pipeline_id, key, partition_id) p_ci_pipeline_variables_pipeline_id_key_partition_id_idx

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

p_ci_pipelines

32 cols · no RLS · line 6576View in 3D
  • Foreign key without index auto_canceled_by_partition_id, auto_canceled_by_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan p_ci_pipelines to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_pipelines maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
  • Nullable foreign key external_pull_request_idp_ci_pipelines.external_pull_request_id may be NULL, so the relationship to external_pull_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key auto_canceled_by_partition_id, auto_canceled_by_idp_ci_pipelines.auto_canceled_by_partition_id.auto_canceled_by_id may be NULL, so the relationship to p_ci_pipelines is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key pipeline_schedule_idp_ci_pipelines.pipeline_schedule_id may be NULL, so the relationship to ci_pipeline_schedules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key ci_ref_idp_ci_pipelines.ci_ref_id may be NULL, so the relationship to ci_refs is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK statusstatus is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Either/or foreign keys without a CHECK external_pull_request_id, pipeline_schedule_id, ci_ref_idp_ci_pipelines has several nullable FKs (external_pull_request_id, pipeline_schedule_id, ci_ref_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone committed_atcommitted_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone started_atstarted_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone finished_atfinished_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Wide table (32 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
ref varcharnull
sha varcharnull
before_sha varcharnull
created_at timestampnull
updated_at timestampnull
tag booleannullFALSE
yaml_errors textnull
committed_at timestampnull
project_id bigintnullCHECK project_id IS NOT NULL
status varcharnull
started_at timestampnull
finished_at timestampnull
duration integernull
user_id bigintnull
lock_version integernull0CHECK lock_version IS NOT NULL
pipeline_schedule_id bigintnullci_pipeline_schedules.id 1:N · SET NULL
source integernull
config_source integernull
protected booleannull
failure_reason integernull
iid integernull
merge_request_id bigintnull
source_sha byteanull
target_sha byteanull
external_pull_request_id bigintnullexternal_pull_requests.id 1:N · SET NULL
ci_ref_id bigintnullci_refs.id 1:N · SET NULL
locked smallintNOT NULL1
partition_id PKbigintNOT NULL
id PKbigintNOT NULL
auto_canceled_by_id bigintnullp_ci_pipelines.partition_id 1:N · SET NULL
auto_canceled_by_partition_id bigintnullp_ci_pipelines.partition_id 1:N · SET NULL
trigger_id bigintnull

Indexes

  • (updated_at, id) WHERE CAST(status AS text) = CAST('running' AS text) index_running_ci_pipelines_on_updated_at_and_id
  • (auto_canceled_by_id) p_ci_pipelines_auto_canceled_by_id_idx
  • (ci_ref_id, id) WHERE locked = 1 p_ci_pipelines_ci_ref_id_id_idx
  • (ci_ref_id, id, source, status) WHERE ci_ref_id IS NOT NULL p_ci_pipelines_ci_ref_id_id_source_status_idx
  • (external_pull_request_id) WHERE external_pull_request_id IS NOT NULL p_ci_pipelines_external_pull_request_id_idx
  • (id) WHERE source = 13 p_ci_pipelines_id_idx
  • (merge_request_id) WHERE merge_request_id IS NOT NULL p_ci_pipelines_merge_request_id_idx
  • (pipeline_schedule_id, id) p_ci_pipelines_pipeline_schedule_id_id_idx
  • (project_id, id) p_ci_pipelines_project_id_id_idx
  • UNIQUE (project_id, iid, partition_id) WHERE iid IS NOT NULL p_ci_pipelines_project_id_iid_partition_id_idx
  • (project_id, ref, id) p_ci_pipelines_project_id_ref_id_idx
  • (project_id, ref, status, id) p_ci_pipelines_project_id_ref_status_id_idx
  • (project_id, sha) p_ci_pipelines_project_id_sha_idx
  • (project_id, source) p_ci_pipelines_project_id_source_idx
  • (project_id, status, config_source) p_ci_pipelines_project_id_status_config_source_idx
  • (project_id, status, created_at) p_ci_pipelines_project_id_status_created_at_idx
  • (project_id, status, updated_at) p_ci_pipelines_project_id_status_updated_at_idx
  • (project_id, user_id, status, ref) WHERE source <> 12 p_ci_pipelines_project_id_user_id_status_ref_idx
  • (status, id) p_ci_pipelines_status_id_idx
  • (trigger_id, id) p_ci_pipelines_trigger_id_id_desc_idx
  • (user_id, created_at, config_source) p_ci_pipelines_user_id_created_at_config_source_idx
  • (user_id, created_at, source) p_ci_pipelines_user_id_created_at_source_idx
  • (user_id, id) WHERE CAST(status AS text) = ANY(ARRAY[CAST(CAST('running' AS varchar) AS text), CAST(CAST('waiting_for_resource' AS varchar) AS text), CAST(CAST('preparing' AS varchar) AS text), CAST(CAST('pending' AS varchar) AS text), CAST(CAST('created' AS varchar) AS text), CAST(CAST('scheduled' AS varchar) AS text)]) p_ci_pipelines_user_id_id_idx
  • (user_id, id) WHERE failure_reason = 3 p_ci_pipelines_user_id_id_idx1

Referenced by

Table checks: project_id IS NOT NULL; lock_version IS NOT NULL

p_ci_runner_machine_builds

4 cols · no RLS · line 6614View in 3D
ColumnTypeNullDefaultReferencesNotes
partition_id PKbigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
build_id PKbigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
runner_machine_id bigintNOT NULL
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (project_id) index_p_ci_runner_machine_builds_on_project_id
  • (runner_machine_id) index_p_ci_runner_machine_builds_on_runner_machine_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

p_ci_stages

10 cols · no RLS · line 6623View in 3D
  • Foreign key without index partition_id, pipeline_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan p_ci_stages to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_stages maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
  • Nullable foreign key partition_id, pipeline_idp_ci_stages.partition_id.pipeline_id may be NULL, so the relationship to p_ci_pipelines is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
project_id bigintnullCHECK project_id IS NOT NULL
created_at timestampnull
updated_at timestampnull
name varcharnull
status integernull
lock_version integernull0CHECK lock_version IS NOT NULL
position integernull
id PKbigintNOT NULL
partition_id PKbigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
pipeline_id bigintnullp_ci_pipelines.partition_id 1:N · CASCADE

Indexes

  • (pipeline_id, id) WHERE status = ANY(ARRAY[0, 1, 2, 8, 9, 10]) p_ci_stages_pipeline_id_id_idx
  • UNIQUE (pipeline_id, name, partition_id) p_ci_stages_pipeline_id_name_partition_id_idx
  • (pipeline_id, position) p_ci_stages_pipeline_id_position_idx
  • (project_id) p_ci_stages_project_id_idx

Referenced by

Table checks: project_id IS NOT NULL; lock_version IS NOT NULL

p_ci_workload_variable_inclusions

7 cols · no RLS · line 6639View in 3D
  • Nullable foreign key partition_id, workload_idp_ci_workload_variable_inclusions.partition_id.workload_id may be NULL, so the relationship to p_ci_workloads is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
workload_id bigintnullp_ci_workloads.partition_id 1:N · CASCADE
partition_id PKbigintNOT NULLp_ci_workloads.partition_id 1:N · CASCADE
project_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
variable_name textNOT NULLCHECK char_length(variable_name) <= 255

Indexes

  • (project_id) index_p_ci_workload_variable_inclusions_on_project_id
  • (workload_id, partition_id) p_ci_workload_variable_inclusions_workload_id_idx

Referenced by

  • nothing

Table checks: char_length(variable_name) <= 255

p_ci_workloads

8 cols · no RLS · line 6651View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
partition_id PKbigintNOT NULLp_ci_pipelines.partition_id 1:1 · CASCADE
project_id bigintNOT NULL
pipeline_id bigintNOT NULLp_ci_pipelines.partition_id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
branch_name textnullCHECK char_length(branch_name) <= 255
status smallintNOT NULL0

Indexes

  • (project_id) index_p_ci_workloads_on_project_id
  • UNIQUE (pipeline_id, partition_id) p_ci_workloads_pipeline_id_idx

Referenced by

Table checks: char_length(branch_name) <= 255

p_ai_active_context_code_enabled_namespaces

7 cols · no RLS · line 6867View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id PKbigintNOT NULLnamespaces.id 1:N · CASCADE
connection_id bigintNOT NULL
metadata jsonbNOT NULLCAST('{}' AS jsonb)
state smallintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (namespace_id) idx_ai_active_context_code_enabled_namespaces_namespace_id
  • UNIQUE (connection_id, namespace_id) idx_unique_ai_code_repository_connection_namespace_id

Referenced by

  • nothing

p_ai_active_context_code_repositories

11 cols · no RLS · line 6878View in 3D
  • Isolated tablep_ai_active_context_code_repositories references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id PKbigintNOT NULL
connection_id bigintnull
enabled_namespace_id bigintnull
metadata jsonbNOT NULLCAST('{}' AS jsonb)
last_commit textnullCHECK char_length(last_commit) <= 64
state smallintNOT NULL0
indexed_at timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
last_queried_at timestamptznull

Indexes

  • (project_id, state) idx_ai_code_repository_project_id_state
  • (enabled_namespace_id) idx_p_ai_active_context_code_repositories_enabled_namespace_id
  • UNIQUE (connection_id, project_id) idx_unique_ai_code_repository_connection_project_id
  • (last_queried_at) index_p_ai_active_context_code_repositories_on_last_queried_at

Referenced by

  • nothing

Table checks: char_length(last_commit) <= 64

p_batched_git_ref_updates_deletions

7 cols · no RLS · line 6894View in 3D
  • Isolated tablep_batched_git_ref_updates_deletions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
partition_id PKbigintNOT NULL1
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL1
ref textNOT NULLCHECK char_length(ref) <= 1024

Indexes

  • (project_id, id) WHERE status = 1 idx_deletions_on_project_id_and_id_where_pending

Referenced by

  • nothing

Table checks: char_length(ref) <= 1024

p_catalog_resource_sync_events

7 cols · no RLS · line 6906View in 3D
  • Isolated tablep_catalog_resource_sync_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
catalog_resource_id bigintNOT NULL
project_id bigintNOT NULL
partition_id PKbigintNOT NULL1
status smallintNOT NULL1
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()

Indexes

  • (id) WHERE status = 1 index_p_catalog_resource_sync_events_on_id_where_pending

Referenced by

  • nothing

p_ci_finished_build_ch_sync_events

5 cols · no RLS · line 6917View in 3D
  • TIMESTAMP without time zone build_finished_atbuild_finished_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tablep_ci_finished_build_ch_sync_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
build_id PKbigintNOT NULL
partition PKbigintNOT NULL1
build_finished_at timestampNOT NULL
processed booleanNOT NULLFALSE
project_id bigintNOT NULL

Indexes

  • (build_id % CAST(100 AS bigint), build_id) WHERE processed = FALSE index_ci_finished_build_ch_sync_events_for_partitioned_query
  • (partition, build_finished_at) index_p_ci_finished_build_ch_sync_events_finished_at
  • (project_id) index_p_ci_finished_build_ch_sync_events_on_project_id

Referenced by

  • nothing

p_ci_finished_pipeline_ch_sync_events

5 cols · no RLS · line 6926View in 3D
  • TIMESTAMP without time zone pipeline_finished_atpipeline_finished_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tablep_ci_finished_pipeline_ch_sync_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
pipeline_id PKbigintNOT NULL
project_namespace_id bigintNOT NULL
partition PKbigintNOT NULL1
pipeline_finished_at timestampNOT NULL
processed booleanNOT NULLFALSE

Indexes

  • (project_namespace_id) idx_p_ci_finished_pipeline_ch_sync_evts_on_project_namespace_id
  • (pipeline_id % CAST(100 AS bigint), pipeline_id) WHERE processed = FALSE index_ci_finished_pipeline_ch_sync_events_for_partitioned_query
  • (pipeline_id) WHERE processed = FALSE index_p_ci_finished_pipeline_ch_sync_events_on_pipeline_id

Referenced by

  • nothing

p_ci_runtime_environments

6 cols · no RLS · line 6935View in 3D
  • Isolated tablep_ci_runtime_environments references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
partition PKbigintNOT NULL1
project_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
environment_key textNOT NULLCHECK char_length(environment_key) <= 512

Indexes

  • (project_id, environment_key) idx_p_ci_runtime_environments_on_project_id_environment_key

Referenced by

  • nothing

Table checks: char_length(environment_key) <= 512

p_duo_workflows_checkpoint_blobs

14 cols · no RLS · line 6946View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
workflow_id bigintNOT NULLduo_workflows_workflows.id 1:N · CASCADE
project_id bigintnull
namespace_id bigintnull
workflow_created_at PKtimestamptzNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
current_thread integerNOT NULL0
thread_ts textNOT NULLCHECK char_length(thread_ts) <= 255
channel textNOT NULLCHECK char_length(channel) <= 255
version textNOT NULLCHECK char_length(version) <= 255
write_type textNOT NULLCHECK char_length(write_type) <= 255
step_action textNOT NULLCHECK char_length(step_action) <= 255
data byteaNOT NULLCHECK octet_length(data) <= 1048576

Indexes

  • UNIQUE (project_id, workflow_id, thread_ts, channel, version, step_action, workflow_created_at) idx_duo_wf_checkpoint_blobs_dedup
  • (namespace_id) index_duo_wf_checkpoint_blobs_on_namespace_id
  • (workflow_id) index_duo_wf_checkpoint_blobs_on_workflow_id

Referenced by

  • nothing

Table checks: char_length(step_action) <= 255; char_length(thread_ts) <= 255; char_length(version) <= 255; char_length(write_type) <= 255; octet_length(data) <= 1048576; num_nonnulls(namespace_id, project_id) = 1; char_length(channel) <= 255

p_duo_workflows_checkpoint_headers

13 cols · no RLS · line 6971View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
workflow_id bigintNOT NULLduo_workflows_workflows.id 1:N · CASCADE
project_id bigintnull
namespace_id bigintnull
workflow_created_at PKtimestamptzNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
current_thread integerNOT NULL0
checkpoint jsonbNOT NULL
metadata jsonbNOT NULL
thread_ts textNOT NULLCHECK char_length(thread_ts) <= 255
parent_ts textnullCHECK char_length(parent_ts) <= 255
checkpoint_ns textnullCHECK char_length(checkpoint_ns) <= 4096

Indexes

  • (namespace_id) index_duo_wf_checkpoint_headers_on_namespace_id
  • (workflow_id, thread_ts, id) index_duo_wf_checkpoint_headers_on_workflow_id_thread_ts_id

Referenced by

  • nothing

Table checks: char_length(thread_ts) <= 255; char_length(parent_ts) <= 255; char_length(checkpoint_ns) <= 4096; num_nonnulls(namespace_id, project_id) = 1

p_duo_workflows_checkpoints

13 cols · no RLS · line 6992View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
workflow_id bigintNOT NULLduo_workflows_workflows.id 1:N · CASCADE
project_id bigintnull
created_at PKtimestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintnull
thread_ts textNOT NULLCHECK char_length(thread_ts) <= 255
parent_ts textnullCHECK char_length(parent_ts) <= 255
checkpoint jsonbNOT NULL
metadata jsonbNOT NULL
ui_chat_log jsonbnull
current_thread integerNOT NULL0
checkpoint_ns textnullCHECK char_length(checkpoint_ns) <= 4096

Indexes

  • (namespace_id) index_p_duo_workflows_checkpoints_on_namespace_id
  • (project_id) index_p_duo_workflows_checkpoints_on_project_id
  • (workflow_id, thread_ts) index_p_duo_workflows_checkpoints_thread

Referenced by

  • nothing

Table checks: num_nonnulls(namespace_id, project_id) = 1; char_length(thread_ts) <= 255; char_length(checkpoint_ns) <= 4096; char_length(parent_ts) <= 255

p_generated_ref_commits

6 cols · no RLS · line 7013View in 3D
  • Junction table allows duplicate links merge_request_iid, project_idp_generated_ref_commits looks like a many-to-many link table but has no unique constraint across (merge_request_iid, project_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
merge_request_iid bigintNOT NULLmerge_requests.target_project_id 1:N · CASCADE
project_id PKbigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
commit_sha byteaNOT NULL

Indexes

  • (project_id, merge_request_iid) p_index_generated_ref_commits_on_merge_request_id
  • (project_id, commit_sha) p_index_generated_ref_commits_on_project_id_and_commit_sha

Referenced by

  • nothing

p_knowledge_graph_code_indexing_tasks

7 cols · no RLS · line 7023View in 3D
  • Isolated tablep_knowledge_graph_code_indexing_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
created_at PKtimestamptzNOT NULL
updated_at timestamptzNOT NULL
ref textNOT NULLCHECK char_length(ref) <= 255
commit_sha textNOT NULLCHECK char_length(commit_sha) <= 40
traversal_path textNOT NULLCHECK char_length(traversal_path) <= 1024

Indexes

  • (project_id) index_p_knowledge_graph_code_indexing_tasks_on_project_id

Referenced by

  • nothing

Table checks: char_length(ref) <= 255; char_length(traversal_path) <= 1024; char_length(commit_sha) <= 40

p_sent_notifications

12 cols · no RLS · line 7044View in 3D
  • Nullable foreign key issue_email_participant_idp_sent_notifications.issue_email_participant_id may be NULL, so the relationship to issue_email_participants is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Polymorphic reference without referential integrity noteable_type, noteable_idnoteable_id points at different tables depending on noteable_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('sent_notifications_id_seq' AS regclass))
project_id bigintnull
noteable_id bigintnull
recipient_id bigintnull
issue_email_participant_id bigintnullissue_email_participants.id 1:N · CASCADE
namespace_id bigintNOT NULL
created_at timestamptzNOT NULL
partition PKintegerNOT NULL1
noteable_type textnullCHECK char_length(noteable_type) <= 255
commit_id textnullCHECK char_length(commit_id) <= 255
reply_key textNOT NULLCHECK char_length(reply_key) <= 255
in_reply_to_discussion_id textnullCHECK char_length(in_reply_to_discussion_id) <= 255

Indexes

  • (issue_email_participant_id) index_p_sent_notifications_on_issue_email_participant_id
  • (namespace_id) index_p_sent_notifications_on_namespace_id
  • (noteable_id, id) WHERE noteable_type = CAST('Issue' AS text) index_p_sent_notifications_on_noteable_type_noteable_id_and_id
  • (reply_key) index_p_sent_notifications_on_reply_key
  • (noteable_id) WHERE noteable_type = CAST('Epic' AS text) tmp_idx_p_sent_notifications_on_noteable_id_for_epics

Referenced by

  • nothing

Table checks: char_length(commit_id) <= 255; char_length(reply_key) <= 255; char_length(noteable_type) <= 255; char_length(in_reply_to_discussion_id) <= 255

p_ci_builds_partition_overrides

3 cols · no RLS · line 9184View in 3D
  • Foreign key without index partition_id, build_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan p_ci_builds_partition_overrides to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to p_ci_builds_partition_overrides maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
build_id PKbigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
partition_id bigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
project_id bigintNOT NULL

Indexes

  • (project_id) index_p_ci_builds_partition_overrides_on_project_id

Referenced by

  • nothing

p_ci_builds_partition_overrides_0

3 cols · no RLS · line 9191View in 3D
  • Isolated tablep_ci_builds_partition_overrides_0 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
build_id PKbigintNOT NULL
partition_id bigintNOT NULL
project_id bigintNOT NULL

Indexes

  • (project_id) p_ci_builds_partition_overrides_0_project_id_idx

Referenced by

  • nothing

p_ci_builds_partition_overrides_1

3 cols · no RLS · line 9197View in 3D
  • Isolated tablep_ci_builds_partition_overrides_1 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
build_id PKbigintNOT NULL
partition_id bigintNOT NULL
project_id bigintNOT NULL

Indexes

  • (project_id) p_ci_builds_partition_overrides_1_project_id_idx

Referenced by

  • nothing

p_ci_builds_partition_overrides_2

3 cols · no RLS · line 9203View in 3D
  • Isolated tablep_ci_builds_partition_overrides_2 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
build_id PKbigintNOT NULL
partition_id bigintNOT NULL
project_id bigintNOT NULL

Indexes

  • (project_id) p_ci_builds_partition_overrides_2_project_id_idx

Referenced by

  • nothing

p_ci_pipeline_iids

2 cols · no RLS · line 9209View in 3D
  • Isolated tablep_ci_pipeline_iids references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_00

2 cols · no RLS · line 9215View in 3D
  • Isolated tablep_ci_pipeline_iids_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_01

2 cols · no RLS · line 9220View in 3D
  • Isolated tablep_ci_pipeline_iids_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_02

2 cols · no RLS · line 9225View in 3D
  • Isolated tablep_ci_pipeline_iids_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_03

2 cols · no RLS · line 9230View in 3D
  • Isolated tablep_ci_pipeline_iids_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_04

2 cols · no RLS · line 9235View in 3D
  • Isolated tablep_ci_pipeline_iids_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_05

2 cols · no RLS · line 9240View in 3D
  • Isolated tablep_ci_pipeline_iids_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_06

2 cols · no RLS · line 9245View in 3D
  • Isolated tablep_ci_pipeline_iids_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_07

2 cols · no RLS · line 9250View in 3D
  • Isolated tablep_ci_pipeline_iids_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_08

2 cols · no RLS · line 9255View in 3D
  • Isolated tablep_ci_pipeline_iids_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_09

2 cols · no RLS · line 9260View in 3D
  • Isolated tablep_ci_pipeline_iids_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_10

2 cols · no RLS · line 9265View in 3D
  • Isolated tablep_ci_pipeline_iids_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_11

2 cols · no RLS · line 9270View in 3D
  • Isolated tablep_ci_pipeline_iids_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_12

2 cols · no RLS · line 9275View in 3D
  • Isolated tablep_ci_pipeline_iids_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_13

2 cols · no RLS · line 9280View in 3D
  • Isolated tablep_ci_pipeline_iids_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_14

2 cols · no RLS · line 9285View in 3D
  • Isolated tablep_ci_pipeline_iids_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_15

2 cols · no RLS · line 9290View in 3D
  • Isolated tablep_ci_pipeline_iids_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_16

2 cols · no RLS · line 9295View in 3D
  • Isolated tablep_ci_pipeline_iids_16 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_17

2 cols · no RLS · line 9300View in 3D
  • Isolated tablep_ci_pipeline_iids_17 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_18

2 cols · no RLS · line 9305View in 3D
  • Isolated tablep_ci_pipeline_iids_18 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_19

2 cols · no RLS · line 9310View in 3D
  • Isolated tablep_ci_pipeline_iids_19 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_20

2 cols · no RLS · line 9315View in 3D
  • Isolated tablep_ci_pipeline_iids_20 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_21

2 cols · no RLS · line 9320View in 3D
  • Isolated tablep_ci_pipeline_iids_21 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_22

2 cols · no RLS · line 9325View in 3D
  • Isolated tablep_ci_pipeline_iids_22 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_23

2 cols · no RLS · line 9330View in 3D
  • Isolated tablep_ci_pipeline_iids_23 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_24

2 cols · no RLS · line 9335View in 3D
  • Isolated tablep_ci_pipeline_iids_24 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_25

2 cols · no RLS · line 9340View in 3D
  • Isolated tablep_ci_pipeline_iids_25 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_26

2 cols · no RLS · line 9345View in 3D
  • Isolated tablep_ci_pipeline_iids_26 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_27

2 cols · no RLS · line 9350View in 3D
  • Isolated tablep_ci_pipeline_iids_27 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_28

2 cols · no RLS · line 9355View in 3D
  • Isolated tablep_ci_pipeline_iids_28 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_29

2 cols · no RLS · line 9360View in 3D
  • Isolated tablep_ci_pipeline_iids_29 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_30

2 cols · no RLS · line 9365View in 3D
  • Isolated tablep_ci_pipeline_iids_30 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_31

2 cols · no RLS · line 9370View in 3D
  • Isolated tablep_ci_pipeline_iids_31 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_32

2 cols · no RLS · line 9375View in 3D
  • Isolated tablep_ci_pipeline_iids_32 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_33

2 cols · no RLS · line 9380View in 3D
  • Isolated tablep_ci_pipeline_iids_33 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_34

2 cols · no RLS · line 9385View in 3D
  • Isolated tablep_ci_pipeline_iids_34 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_35

2 cols · no RLS · line 9390View in 3D
  • Isolated tablep_ci_pipeline_iids_35 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_36

2 cols · no RLS · line 9395View in 3D
  • Isolated tablep_ci_pipeline_iids_36 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_37

2 cols · no RLS · line 9400View in 3D
  • Isolated tablep_ci_pipeline_iids_37 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_38

2 cols · no RLS · line 9405View in 3D
  • Isolated tablep_ci_pipeline_iids_38 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_39

2 cols · no RLS · line 9410View in 3D
  • Isolated tablep_ci_pipeline_iids_39 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_40

2 cols · no RLS · line 9415View in 3D
  • Isolated tablep_ci_pipeline_iids_40 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_41

2 cols · no RLS · line 9420View in 3D
  • Isolated tablep_ci_pipeline_iids_41 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_42

2 cols · no RLS · line 9425View in 3D
  • Isolated tablep_ci_pipeline_iids_42 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_43

2 cols · no RLS · line 9430View in 3D
  • Isolated tablep_ci_pipeline_iids_43 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_44

2 cols · no RLS · line 9435View in 3D
  • Isolated tablep_ci_pipeline_iids_44 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_45

2 cols · no RLS · line 9440View in 3D
  • Isolated tablep_ci_pipeline_iids_45 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_46

2 cols · no RLS · line 9445View in 3D
  • Isolated tablep_ci_pipeline_iids_46 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_47

2 cols · no RLS · line 9450View in 3D
  • Isolated tablep_ci_pipeline_iids_47 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_48

2 cols · no RLS · line 9455View in 3D
  • Isolated tablep_ci_pipeline_iids_48 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_49

2 cols · no RLS · line 9460View in 3D
  • Isolated tablep_ci_pipeline_iids_49 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_50

2 cols · no RLS · line 9465View in 3D
  • Isolated tablep_ci_pipeline_iids_50 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_51

2 cols · no RLS · line 9470View in 3D
  • Isolated tablep_ci_pipeline_iids_51 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_52

2 cols · no RLS · line 9475View in 3D
  • Isolated tablep_ci_pipeline_iids_52 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_53

2 cols · no RLS · line 9480View in 3D
  • Isolated tablep_ci_pipeline_iids_53 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_54

2 cols · no RLS · line 9485View in 3D
  • Isolated tablep_ci_pipeline_iids_54 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_55

2 cols · no RLS · line 9490View in 3D
  • Isolated tablep_ci_pipeline_iids_55 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_56

2 cols · no RLS · line 9495View in 3D
  • Isolated tablep_ci_pipeline_iids_56 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_57

2 cols · no RLS · line 9500View in 3D
  • Isolated tablep_ci_pipeline_iids_57 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_58

2 cols · no RLS · line 9505View in 3D
  • Isolated tablep_ci_pipeline_iids_58 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_59

2 cols · no RLS · line 9510View in 3D
  • Isolated tablep_ci_pipeline_iids_59 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_60

2 cols · no RLS · line 9515View in 3D
  • Isolated tablep_ci_pipeline_iids_60 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_61

2 cols · no RLS · line 9520View in 3D
  • Isolated tablep_ci_pipeline_iids_61 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_62

2 cols · no RLS · line 9525View in 3D
  • Isolated tablep_ci_pipeline_iids_62 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

p_ci_pipeline_iids_63

2 cols · no RLS · line 9530View in 3D
  • Isolated tablep_ci_pipeline_iids_63 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
iid PKintegerNOT NULL

Indexes

  • none

Referenced by

  • nothing

group 24 tables

Tables whose names start with group_.

Entity-relationship diagram: group_audit_events, group_crm_settings, group_custom_attributes, group_deletion_schedules, group_deploy_tokens, group_features, group_group_links, group_import_states, group_merge_request_approval_settings, group_push_rules, group_repository_storage_moves, group_saved_replies, group_scim_auth_access_tokens, group_scim_identities, group_secret_rotation_infos, group_secrets_manager_maintenance_tasks, group_secrets_managers, group_security_exclusions, group_ssh_certificates, group_type_ci_runner_machines, group_type_ci_runners, group_upload_states, group_wiki_repositories, group_wiki_repository_statesgroup_audit_eventsid PKbigintcreated_at PKtimestamptzgroup_idbigintauthor_idbiginttarget_idbigintevent_nametextdetailstextip_addressinetauthor_nametextentity_pathtexttarget_detailstexttarget_typetextgroup_crm_settingsgroup_id PKbigintcreated_attimestamptzupdated_attimestamptzenabledbooleansource_group_id FKbigintgroup_custom_attributesid PKbigintcreated_attimestamptzupdated_attimestamptzgroup_id FKbigintkeyvarcharvaluevarchargroup_deletion_schedulesgroup_id PKbigintuser_id FKbigintmarked_for_deletion_ondategroup_deploy_tokensid PKbigintcreated_attimestamptzupdated_attimestamptzgroup_id FKbigintdeploy_token_id FKbigintgroup_featuresgroup_id PKbigintcreated_attimestamptzupdated_attimestamptzwiki_access_levelsmallintgroup_group_linksid PKbigintcreated_attimestamptzupdated_attimestamptzshared_group_id FKbigintshared_with_group_id FKbigintexpires_atdategroup_accesssmallintmember_role_id FKbigintgroup_import_statesgroup_id PKbigintcreated_attimestamptzupdated_attimestamptzstatussmallintjidtextlast_errortextuser_id FKbigintgroup_merge_request_approval_settingscreated_attimestamptzupdated_attimestamptzgroup_id PKbigintallow_author_approvalbooleanallow_committer_approvalbooleanallow_overrides_to_approver_list_per_merge_requestbooleanretain_approvals_on_pushbooleanrequire_password_to_approvebooleanrequire_saml_auth_to_approvebooleanrequire_reauthentication_to_approvebooleangroup_push_rulesid PKbigintcreated_attimestamptzupdated_attimestamptzgroup_id FKbigintmax_file_sizeintegermember_checkbooleanprevent_secretsbooleancommit_committer_name_checkbooleandeny_delete_tagbooleanreject_unsigned_commitsbooleancommit_committer_checkbooleanreject_non_dco_commitsbooleancommit_message_regextextbranch_name_regextextcommit_message_negative_regextextauthor_email_regextextfile_name_regextextgroup_repository_storage_movesid PKbigintcreated_attimestamptzupdated_attimestamptzgroup_id FKbigintstatesmallintsource_storage_nametextdestination_storage_nametexterror_messagetextgroup_saved_repliesid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptznametextcontenttextgroup_scim_auth_access_tokensid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptztoken_encryptedbyteagroup_scim_identitiesid PKbigintgroup_id FKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptzactivebooleanextern_uidtextgroup_secret_rotation_infosid PKbigintgroup_id FKbigintnext_reminder_attimestamptzlast_reminder_attimestamptzcreated_attimestamptzupdated_attimestamptzsecret_metadata_versionintegerrotation_interval_daysintegersecret_nametextgroup_secrets_manager_maintenance_tasksid PKbigintuser_idbigintgroup_idbigintroot_namespace_idbigintorganization_idbigintlast_processed_attimestamptzactionsmallintretry_countsmallintgroup_secrets_managersid PKbigintcreated_attimestamptzupdated_attimestamptzgroup_id FKbigintstatussmallintgroup_pathtextroot_namespace_pathtextorganization_idbigintroot_namespace_idbigintgroup_security_exclusionsid PKbigintgroup_idbigintcreated_attimestamptzupdated_attimestamptzscannersmallinttypesmallintactivebooleandescriptiontextvaluetextgroup_ssh_certificatesid PKbigintnamespace_id FKbigintcreated_attimestamptzfingerprintbyteatitletextkeytextgroup_type_ci_runner_machinesid PKbigintrunner_id FKbigintcreated_attimestamptzupdated_attimestamptzcontacted_attimestamptzcreation_statesmallintexecutor_typesmallintrunner_type PKsmallintconfigjsonbsystem_xidtextplatformtextarchitecturetextrevisiontextip_addresstextversiontextruntime_featuresjsonborganization_idbigintlabelsjsonbgroup_type_ci_runnersid PKbigintcreator_idbigintcreated_attimestamptzupdated_attimestamptzcontacted_attimestamptztoken_expires_attimestamptzpublic_projects_minutes_cost_factordouble precisionprivate_projects_minutes_cost_factordouble precisionaccess_levelintegermaximum_timeoutintegerrunner_type PKsmallintregistration_typesmallintcreation_statesmallintactivebooleanrun_untaggedbooleanlockedbooleannametexttoken_encryptedtextdescriptiontextmaintainer_notetextallowed_planstext[]allowed_plan_idsbigint[]organization_idbigintallowed_plan_name_uidssmallint[]token_rotation_deadlinetimestamptzuuiduuidgroup_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzgroup_upload_id FKbigintnamespace_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextgroup_wiki_repositoriesshard_idbigintgroup_id PKbigintdisk_pathtextlast_repository_updated_attimestamptzgroup_wiki_repository_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzgroup_wiki_repository_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextgroup_id FKbigintdeploy_tokensmember_rolesnamespace_uploadsnamespacesuserssource_group_idgroup_idgroup_iduser_idgroup_idgroup_iddeploy_token_idgroup_idmember_role_idshared_with_group_idshared_group_iduser_idgroup_idgroup_idgroup_idgroup_idgroup_idgroup_idgroup_iduser_idgroup_idgroup_idnamespace_idrunner_id, runner_typenamespace_idgroup_upload_idgroup_idgroup_idgroup_wiki_repository_id

Relationships

group_audit_events

12 cols · no RLS · line 6664View in 3D
  • Polymorphic reference without referential integrity target_type, target_idtarget_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • Isolated tablegroup_audit_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('audit_events_id_seq' AS regclass))
created_at PKtimestamptzNOT NULL
group_id bigintNOT NULL
author_id bigintNOT NULL
target_id bigintnull
event_name textnullCHECK char_length(event_name) <= 255
details textnull
ip_address inetnull
author_name textnullCHECK char_length(author_name) <= 255
entity_path textnullCHECK char_length(entity_path) <= 5500
target_details textnullCHECK char_length(target_details) <= 5500
target_type textnullCHECK char_length(target_type) <= 255

Indexes

  • (author_id, created_at, id) idx_group_audit_events_on_author_id_created_at_id
  • (group_id, author_id, created_at, id) idx_group_audit_events_on_group_id_author_created_at_id
  • (group_id, created_at, id) idx_group_audit_events_on_project_created_at_id

Referenced by

  • nothing

Table checks: char_length(author_name) <= 255; char_length(entity_path) <= 5500; char_length(event_name) <= 255; char_length(target_details) <= 5500; char_length(target_type) <= 255

group_crm_settings

5 cols · no RLS · line 21595View in 3D
  • Nullable foreign key source_group_idgroup_crm_settings.source_group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
group_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
enabled booleanNOT NULLTRUE
source_group_id bigintnullnamespaces.id 1:N · CASCADE

Indexes

  • (group_id) index_group_crm_settings_on_group_id
  • (source_group_id) index_group_crm_settings_on_source_group_id

Referenced by

  • nothing

group_custom_attributes

6 cols · no RLS · line 21612View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
key varcharNOT NULL
value varcharNOT NULL

Indexes

  • UNIQUE (group_id, key) index_group_custom_attributes_on_group_id_and_key
  • (key, value) index_group_custom_attributes_on_key_and_value

Referenced by

  • nothing

group_deletion_schedules

3 cols · no RLS · line 21630View in 3D
  • Junction table allows duplicate links group_id, user_idgroup_deletion_schedules looks like a many-to-many link table but has no unique constraint across (group_id, user_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
group_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
marked_for_deletion_on dateNOT NULL

Indexes

  • (marked_for_deletion_on) index_group_deletion_schedules_on_marked_for_deletion_on
  • (user_id) index_group_deletion_schedules_on_user_id

Referenced by

  • nothing

group_deploy_tokens

5 cols · no RLS · line 21636View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
deploy_token_id bigintNOT NULLdeploy_tokens.id 1:N · CASCADE

Indexes

  • (deploy_token_id) index_group_deploy_tokens_on_deploy_token_id
  • UNIQUE (group_id, deploy_token_id) index_group_deploy_tokens_on_group_and_deploy_token_ids

Referenced by

  • nothing

group_features

4 cols · no RLS · line 21653View in 3D
ColumnTypeNullDefaultReferencesNotes
group_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
wiki_access_level smallintNOT NULL20

Indexes

  • none

Referenced by

  • nothing

group_import_states

7 cols · no RLS · line 21680View in 3D
  • Nullable foreign key user_idgroup_import_states.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
group_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
jid textnullCHECK char_length(jid) <= 100
last_error textnullCHECK char_length(last_error) <= 255
user_id bigintnullusers.id 1:N · CASCADECHECK user_id IS NOT NULL

Indexes

  • (group_id) index_group_import_states_on_group_id
  • (user_id) WHERE user_id IS NOT NULL index_group_import_states_on_user_id

Referenced by

  • nothing

Table checks: char_length(last_error) <= 255; char_length(jid) <= 100; user_id IS NOT NULL

group_merge_request_approval_settings

10 cols · no RLS · line 21701View in 3D
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
allow_author_approval booleanNOT NULLFALSE
allow_committer_approval booleanNOT NULLFALSE
allow_overrides_to_approver_list_per_merge_request booleanNOT NULLFALSE
retain_approvals_on_push booleanNOT NULLFALSE
require_password_to_approve booleanNOT NULLFALSE
require_saml_auth_to_approve booleanNOT NULLFALSE
require_reauthentication_to_approve booleanNOT NULLFALSE

Indexes

  • none

Referenced by

  • nothing

group_push_rules

17 cols · no RLS · line 21714View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id bigintNOT NULLnamespaces.id 1:1 · CASCADE
max_file_size integerNOT NULL0
member_check booleanNOT NULLFALSE
prevent_secrets booleanNOT NULLFALSE
commit_committer_name_check booleanNOT NULLFALSE
deny_delete_tag booleannull
reject_unsigned_commits booleannull
commit_committer_check booleannull
reject_non_dco_commits booleannull
commit_message_regex textnullCHECK char_length(commit_message_regex) <= 511
branch_name_regex textnullCHECK char_length(branch_name_regex) <= 511
commit_message_negative_regex textnullCHECK char_length(commit_message_negative_regex) <= 2047
author_email_regex textnullCHECK char_length(author_email_regex) <= 511
file_name_regex textnullCHECK char_length(file_name_regex) <= 511

Indexes

  • UNIQUE (group_id) index_group_push_rules_on_group_id

Referenced by

  • nothing

Table checks: char_length(commit_message_negative_regex) <= 2047; char_length(file_name_regex) <= 511; char_length(commit_message_regex) <= 511; char_length(author_email_regex) <= 511; char_length(branch_name_regex) <= 511

group_repository_storage_moves

8 cols · no RLS · line 21748View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
state smallintNOT NULL1
source_storage_name textNOT NULLCHECK char_length(source_storage_name) <= 255
destination_storage_name textNOT NULLCHECK char_length(destination_storage_name) <= 255
error_message textnullCHECK char_length(error_message) <= 256

Indexes

  • (group_id) index_group_repository_storage_moves_on_group_id

Referenced by

  • nothing

Table checks: char_length(error_message) <= 256; char_length(destination_storage_name) <= 255; char_length(source_storage_name) <= 255

group_saved_replies

6 cols · no RLS · line 21771View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
content textNOT NULLCHECK char_length(content) <= 10000

Indexes

  • (group_id) index_group_saved_replies_on_group_id

Referenced by

  • nothing

Table checks: char_length(name) <= 255; char_length(content) <= 10000

group_scim_auth_access_tokens

5 cols · no RLS · line 21791View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
token_encrypted byteaNOT NULL

Indexes

  • UNIQUE (group_id, token_encrypted) index_group_scim_access_tokens_on_group_id_and_token

Referenced by

  • nothing

group_scim_identities

7 cols · no RLS · line 21808View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
active booleannullFALSE
extern_uid textNOT NULLCHECK char_length(extern_uid) <= 255

Indexes

  • (group_id) index_group_scim_identities_on_group_id
  • UNIQUE (lower(extern_uid), group_id) index_group_scim_identities_on_lower_extern_uid_group_id
  • UNIQUE (user_id, group_id) index_group_scim_identities_on_user_id_and_group_id

Referenced by

  • nothing

Table checks: char_length(extern_uid) <= 255

group_secret_rotation_infos

9 cols · no RLS · line 21828View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
next_reminder_at timestamptzNOT NULL
last_reminder_at timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
secret_metadata_version integerNOT NULL
rotation_interval_days integerNOT NULL
secret_name textNOT NULLCHECK char_length(secret_name) <= 255

Indexes

  • UNIQUE (group_id, secret_name, secret_metadata_version) idx_group_secret_rotation_infos_group_secret
  • (next_reminder_at) idx_group_secret_rotation_infos_on_next_reminder_at

Referenced by

  • nothing

Table checks: char_length(secret_name) <= 255

group_secrets_manager_maintenance_tasks

8 cols · no RLS · line 21850View in 3D
  • Isolated tablegroup_secrets_manager_maintenance_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintnull
group_id bigintNOT NULL
root_namespace_id bigintNOT NULL
organization_id bigintNOT NULL
last_processed_at timestamptznull
action smallintNOT NULL
retry_count smallintNOT NULL0

Indexes

  • (last_processed_at) idx_gsm_maintenance_tasks_on_last_processed_at
  • (organization_id) idx_gsm_maintenance_tasks_on_organization_id
  • (root_namespace_id) idx_gsm_maintenance_tasks_on_root_namespace_id
  • UNIQUE (group_id) uniq_gsm_maintenance_tasks_on_group_id

Referenced by

  • nothing

group_secrets_managers

9 cols · no RLS · line 21870View in 3D
  • Nullable foreign key group_idgroup_secrets_managers.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL
status smallintNOT NULL0
group_path textnullCHECK char_length(group_path) <= 64
root_namespace_path textnullCHECK char_length(root_namespace_path) <= 64
organization_id bigintnullCHECK organization_id IS NOT NULL
root_namespace_id bigintnullCHECK root_namespace_id IS NOT NULL

Indexes

  • (group_id) index_group_secrets_managers_on_group_id

Referenced by

  • nothing

Table checks: root_namespace_id IS NOT NULL; char_length(root_namespace_path) <= 64; group_id IS NOT NULL; char_length(group_path) <= 64; organization_id IS NOT NULL

group_security_exclusions

9 cols · no RLS · line 21896View in 3D
  • Isolated tablegroup_security_exclusions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
scanner smallintNOT NULL
type smallintNOT NULL
active booleanNOT NULLTRUE
description textnullCHECK char_length(description) <= 255
value textNOT NULLCHECK char_length(value) <= 255

Indexes

  • (group_id) index_group_security_exclusions_on_group_id

Referenced by

  • nothing

Table checks: char_length(description) <= 255; char_length(value) <= 255

group_ssh_certificates

6 cols · no RLS · line 21919View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
fingerprint byteaNOT NULL
title textNOT NULLCHECK char_length(title) <= 256
key textNOT NULLCHECK char_length(key) <= 524288

Indexes

  • UNIQUE (fingerprint, namespace_id) index_group_ssh_certificates_on_fingerprint_and_namespace_id
  • (namespace_id) index_group_ssh_certificates_on_namespace_id

Referenced by

  • nothing

Table checks: char_length(title) <= 256; char_length(key) <= 524288

group_type_ci_runner_machines

18 cols · no RLS · line 21939View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
runner_id bigintNOT NULLgroup_type_ci_runners.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
contacted_at timestamptznull
creation_state smallintNOT NULL0
executor_type smallintnull
runner_type PKsmallintNOT NULLgroup_type_ci_runners.id 1:N · CASCADE
config jsonbNOT NULLCAST('{}' AS jsonb)
system_xid textNOT NULLCHECK char_length(system_xid) <= 64
platform textnullCHECK char_length(platform) <= 255
architecture textnullCHECK char_length(architecture) <= 255
revision textnullCHECK char_length(revision) <= 255
ip_address textnullCHECK char_length(ip_address) <= 1024
version textnullCHECK char_length(version) <= 2048
runtime_features jsonbNOT NULLCAST('{}' AS jsonb)
organization_id bigintnullCHECK organization_id IS NOT NULL
labels jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (contacted_at, id) idx_group_type_ci_runner_machines_on_contacted_at_desc_id_desc
  • UNIQUE (runner_id, runner_type, system_xid) idx_group_type_ci_runner_machines_on_runner_id_type_system_xid
  • (created_at, id) index_group_type_ci_runner_machines_on_created_at_and_id_desc
  • (executor_type) index_group_type_ci_runner_machines_on_executor_type
  • (substring(version, CAST('^\d+\.' AS text)), version, runner_id) index_group_type_ci_runner_machines_on_major_version
  • (substring(version, CAST('^\d+\.\d+\.' AS text)), version, runner_id) index_group_type_ci_runner_machines_on_minor_version
  • (organization_id) index_group_type_ci_runner_machines_on_organization_id
  • (substring(version, CAST('^\d+\.\d+\.\d+' AS text)), version, runner_id) index_group_type_ci_runner_machines_on_patch_version
  • (version) index_group_type_ci_runner_machines_on_version

Referenced by

  • nothing

Table checks: char_length(system_xid) <= 64; char_length(revision) <= 255; char_length(version) <= 2048; char_length(ip_address) <= 1024; char_length(platform) <= 255; char_length(architecture) <= 255; organization_id IS NOT NULL

group_type_ci_runners

26 cols · no RLS · line 21967View in 3D
  • Monetary value stored as float public_projects_minutes_cost_factorpublic_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.
  • Monetary value stored as float private_projects_minutes_cost_factorprivate_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
creator_id bigintnull
created_at timestamptznull
updated_at timestamptznull
contacted_at timestamptznull
token_expires_at timestamptznull
public_projects_minutes_cost_factor double precisionNOT NULL1.0
private_projects_minutes_cost_factor double precisionNOT NULL1.0
access_level integerNOT NULL0
maximum_timeout integernull
runner_type PKsmallintNOT NULL
registration_type smallintNOT NULL0
creation_state smallintNOT NULL0
active booleanNOT NULLTRUE
run_untagged booleanNOT NULLTRUE
locked booleanNOT NULLFALSE
name textnullCHECK char_length(name) <= 256
token_encrypted textnullCHECK char_length(token_encrypted) <= 512
description textnullCHECK char_length(description) <= 1024
maintainer_note textnullCHECK char_length(maintainer_note) <= 1024
allowed_plans text[]NOT NULLCAST('{}' AS text[])
allowed_plan_ids bigint[]NOT NULLCAST('{}' AS bigint[])
organization_id bigintnullCHECK organization_id IS NOT NULL
allowed_plan_name_uids smallint[]NOT NULLCAST('{}' AS smallint[])
token_rotation_deadline timestamptznull
uuid uuidnull

Indexes

  • (contacted_at, id) WHERE active = FALSE idx_group_type_ci_runners_on_contacted_at_and_id_where_inactive
  • (locked) idx_group_type_ci_runners_on_locked
  • (token_expires_at, id) idx_group_type_ci_runners_on_token_expires_at_and_id_desc
  • (token_expires_at, id) idx_group_type_ci_runners_on_token_expires_at_desc_and_id_desc
  • UNIQUE (uuid, runner_type) index_d555ba74c1
  • (active, id) index_group_type_ci_runners_on_active_and_id
  • (contacted_at, id) index_group_type_ci_runners_on_contacted_at_and_id_desc
  • (contacted_at, id) index_group_type_ci_runners_on_contacted_at_desc_and_id_desc
  • (created_at, id) index_group_type_ci_runners_on_created_at_and_id_desc
  • (created_at, id) WHERE active = FALSE index_group_type_ci_runners_on_created_at_and_id_where_inactive
  • (created_at, id) index_group_type_ci_runners_on_created_at_desc_and_id_desc
  • (creator_id) WHERE creator_id IS NOT NULL index_group_type_ci_runners_on_creator_id_where_not_null
  • (description) index_group_type_ci_runners_on_description_trigram
  • (organization_id) index_group_type_ci_runners_on_organization_id
  • UNIQUE (token_encrypted, runner_type) index_group_type_ci_runners_on_token_encrypted_and_runner_type

Referenced by

Table checks: char_length(token_encrypted) <= 512; char_length(name) <= 256; char_length(maintainer_note) <= 1024; char_length(description) <= 1024; organization_id IS NOT NULL

group_upload_states

10 cols · no RLS · line 22001View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
group_upload_id bigintNOT NULLnamespace_uploads.id 1:1 · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_group_upload_states_failed_verification
  • (group_upload_id) WHERE verification_state = 0 OR verification_state = 3 index_group_upload_states_needs_verification_id
  • UNIQUE (group_upload_id) index_group_upload_states_on_group_upload_id
  • (namespace_id) index_group_upload_states_on_namespace_id
  • (group_upload_id, verification_started_at) WHERE verification_state = 1 index_group_upload_states_on_verification_started
  • (verification_state) index_group_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_group_upload_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

group_wiki_repositories

4 cols · no RLS · line 22024View in 3D
ColumnTypeNullDefaultReferencesNotes
shard_id bigintnull
group_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
disk_path textNOT NULLCHECK char_length(disk_path) <= 80
last_repository_updated_at timestamptznull

Indexes

  • UNIQUE (disk_path) index_group_wiki_repositories_on_disk_path
  • (shard_id) index_group_wiki_repositories_on_shard_id

Referenced by

Table checks: char_length(disk_path) <= 80

group_wiki_repository_states

10 cols · no RLS · line 22032View in 3D
  • Nullable foreign key group_idgroup_wiki_repository_states.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
group_wiki_repository_id bigintNOT NULLgroup_wiki_repositories.group_id 1:1 · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_group_wiki_repository_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_group_wiki_repository_states_needs_verification
  • (group_id) index_group_wiki_repository_states_on_group_id
  • UNIQUE (group_wiki_repository_id) index_group_wiki_repository_states_on_group_wiki_repository_id
  • (verification_state) index_group_wiki_repository_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_group_wiki_repository_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255; group_id IS NOT NULL

incident 12 tables

Tables whose names start with incident_.

Entity-relationship diagram: incident_management_pending_alert_escalations, incident_management_pending_issue_escalations, incident_management_escalation_policies, incident_management_escalation_rules, incident_management_issuable_escalation_statuses, incident_management_oncall_participants, incident_management_oncall_rotations, incident_management_oncall_schedules, incident_management_oncall_shifts, incident_management_timeline_event_tag_links, incident_management_timeline_event_tags, incident_management_timeline_eventsincident_management_pending_alert_escalationsid PKbigintrule_id FKbigintalert_id FKbigintprocess_at PKtimestamptzcreated_attimestamptzupdated_attimestamptzproject_id FKbigintincident_management_pending_issue_escalationsid PKbigintrule_id FKbigintissue_id FKbigintprocess_at PKtimestamptzcreated_attimestamptzupdated_attimestamptznamespace_id FKbigintincident_management_escalation_policiesid PKbigintproject_id FKbigintnametextdescriptiontextincident_management_escalation_rulesid PKbigintpolicy_id FKbigintoncall_schedule_id FKbigintstatussmallintelapsed_time_secondsintegeris_removedbooleanuser_id FKbigintproject_id FKbigintincident_management_issuable_escalation_statusesid PKbigintcreated_attimestamptzupdated_attimestamptzissue_id FKbigintpolicy_id FKbigintescalations_started_attimestamptzresolved_attimestamptzstatussmallintnamespace_id FKbigintincident_management_oncall_participantsid PKbigintoncall_rotation_id FKbigintuser_id FKbigintcolor_palettesmallintcolor_weightsmallintis_removedbooleanproject_id FKbigintincident_management_oncall_rotationsid PKbigintcreated_attimestamptzupdated_attimestamptzoncall_schedule_id FKbigintlengthintegerlength_unitsmallintstarts_attimestamptznametextends_attimestamptzactive_period_starttimeactive_period_endtimeproject_id FKbigintincident_management_oncall_schedulesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintiidintegernametextdescriptiontexttimezonetextincident_management_oncall_shiftsid PKbigintrotation_id FKbigintparticipant_id FKbigintstarts_attimestamptzends_attimestamptzproject_id FKbigintincident_management_timeline_event_tag_linksid PKbiginttimeline_event_id FKbiginttimeline_event_tag_id FKbigintcreated_attimestamptzproject_id FKbigintincident_management_timeline_event_tagsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintnametextincident_management_timeline_eventsid PKbigintcreated_attimestamptzupdated_attimestamptzoccurred_attimestamptzproject_id FKbigintauthor_id FKbigintissue_id FKbigintupdated_by_user_id FKbigintpromoted_from_note_id FKbigintcached_markdown_versionintegereditablebooleannotetextnote_htmltextactiontextalert_management_alertsissuesnamespacesnotesprojectsusersproject_idproject_idproject_idissue_idauthor_idupdated_by_user_idproject_idpromoted_from_note_iduser_idproject_idpolicy_idoncall_schedule_idnamespace_idpolicy_idissue_idproject_idoncall_schedule_idproject_idtimeline_event_idtimeline_event_tag_idproject_idoncall_rotation_iduser_idproject_idalert_idrule_idrule_idissue_idnamespace_idproject_idrotation_idparticipant_id

Relationships

incident_management_pending_alert_escalations

7 cols · no RLS · line 6693View in 3D
  • Nullable foreign key project_idincident_management_pending_alert_escalations.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
rule_id bigintNOT NULLincident_management_escalation_rules.id 1:N · CASCADE
alert_id bigintNOT NULLalert_management_alerts.id 1:N · CASCADE
process_at PKtimestamptzNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) idx_incident_management_pending_alert_escalations_on_project_id
  • (alert_id) index_incident_management_pending_alert_escalations_on_alert_id
  • (rule_id) index_incident_management_pending_alert_escalations_on_rule_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

incident_management_pending_issue_escalations

7 cols · no RLS · line 6705View in 3D
  • Nullable foreign key namespace_idincident_management_pending_issue_escalations.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
rule_id bigintNOT NULLincident_management_escalation_rules.id 1:N · CASCADE
issue_id bigintNOT NULLissues.id 1:N · CASCADE
process_at PKtimestamptzNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (namespace_id) idx_incident_management_pending_issue_esc_on_namespace_id
  • (issue_id) index_incident_management_pending_issue_escalations_on_issue_id
  • (rule_id) index_incident_management_pending_issue_escalations_on_rule_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

incident_management_escalation_policies

4 cols · no RLS · line 22404View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 72
description textnullCHECK char_length(description) <= 160

Indexes

  • UNIQUE (project_id, name) index_on_project_id_escalation_policy_name_unique

Referenced by

Table checks: char_length(description) <= 160; char_length(name) <= 72

incident_management_escalation_rules

8 cols · no RLS · line 22422View in 3D
  • Nullable foreign key user_idincident_management_escalation_rules.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idincident_management_escalation_rules.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key oncall_schedule_idincident_management_escalation_rules.oncall_schedule_id may be NULL, so the relationship to incident_management_oncall_schedules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK user_id, project_id, oncall_schedule_idincident_management_escalation_rules has several nullable FKs (user_id, project_id, oncall_schedule_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
policy_id bigintNOT NULLincident_management_escalation_policies.id 1:N · CASCADE
oncall_schedule_id bigintnullincident_management_oncall_schedules.id 1:N · CASCADE
status smallintNOT NULL
elapsed_time_seconds integerNOT NULL
is_removed booleanNOT NULLFALSE
user_id bigintnullusers.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (policy_id, oncall_schedule_id, status, elapsed_time_seconds, user_id) index_escalation_rules_on_all_attributes
  • (user_id) index_escalation_rules_on_user
  • (project_id) index_incident_management_escalation_rules_on_project_id
  • (oncall_schedule_id) index_on_oncall_schedule_escalation_rule

Referenced by

Table checks: project_id IS NOT NULL; num_nonnulls(oncall_schedule_id, user_id) = 1

incident_management_issuable_escalation_statuses

9 cols · no RLS · line 22444View in 3D
  • Nullable foreign key namespace_idincident_management_issuable_escalation_statuses.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key policy_idincident_management_issuable_escalation_statuses.policy_id may be NULL, so the relationship to incident_management_escalation_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK namespace_id, policy_idincident_management_issuable_escalation_statuses has several nullable FKs (namespace_id, policy_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
issue_id bigintNOT NULLissues.id 1:1 · CASCADE
policy_id bigintnullincident_management_escalation_policies.id 1:N · SET NULL
escalations_started_at timestamptznull
resolved_at timestamptznull
status smallintNOT NULL0
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (policy_id) index_im_issuable_escalation_statuses_on_policy_id
  • (namespace_id) index_incident_management_issuable_escalation_statuses_on_names
  • UNIQUE (issue_id) index_uniq_im_issuable_escalation_statuses_on_issue_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

incident_management_oncall_participants

7 cols · no RLS · line 22466View in 3D
  • Nullable foreign key project_idincident_management_oncall_participants.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
oncall_rotation_id bigintNOT NULLincident_management_oncall_rotations.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
color_palette smallintNOT NULL
color_weight smallintNOT NULL
is_removed booleanNOT NULLFALSE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (user_id) index_inc_mgmnt_oncall_participants_on_oncall_user_id
  • UNIQUE (user_id, oncall_rotation_id) index_inc_mgmnt_oncall_participants_on_user_id_and_rotation_id
  • (oncall_rotation_id, is_removed) index_inc_mgmnt_oncall_pcpnt_on_oncall_rotation_id_is_removed
  • (project_id) index_incident_management_oncall_participants_on_project_id

Referenced by

Table checks: project_id IS NOT NULL

incident_management_oncall_rotations

12 cols · no RLS · line 22486View in 3D
  • Nullable foreign key project_idincident_management_oncall_rotations.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
oncall_schedule_id bigintNOT NULLincident_management_oncall_schedules.id 1:N · CASCADE
length integerNOT NULL
length_unit smallintNOT NULL
starts_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 200
ends_at timestamptznull
active_period_start timenull
active_period_end timenull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (oncall_schedule_id, id) index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_id
  • UNIQUE (oncall_schedule_id, name) index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_name
  • (project_id) index_incident_management_oncall_rotations_on_project_id

Referenced by

Table checks: project_id IS NOT NULL; char_length(name) <= 200

incident_management_oncall_schedules

8 cols · no RLS · line 22512View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
iid integerNOT NULL
name textNOT NULLCHECK char_length(name) <= 200
description textnullCHECK char_length(description) <= 1000
timezone textnullCHECK char_length(timezone) <= 100

Indexes

  • UNIQUE (project_id, iid) index_im_oncall_schedules_on_project_id_and_iid
  • (project_id) index_incident_management_oncall_schedules_on_project_id

Referenced by

Table checks: char_length(description) <= 1000; char_length(timezone) <= 100; char_length(name) <= 200

incident_management_oncall_shifts

6 cols · no RLS · line 22535View in 3D
  • Nullable foreign key project_idincident_management_oncall_shifts.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
rotation_id bigintNOT NULLincident_management_oncall_rotations.id 1:N · CASCADE
participant_id bigintNOT NULLincident_management_oncall_participants.id 1:N · CASCADE
starts_at timestamptzNOT NULL
ends_at timestamptzNOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (participant_id) index_incident_management_oncall_shifts_on_participant_id
  • (project_id) index_incident_management_oncall_shifts_on_project_id
  • (rotation_id, starts_at, ends_at) index_oncall_shifts_on_rotation_id_and_starts_at_and_ends_at

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

incident_management_timeline_event_tags

5 cols · no RLS · line 22590View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255

Indexes

  • UNIQUE (project_id, lower(name)) index_im_timeline_event_tags_on_lower_name_and_project_id

Referenced by

Table checks: char_length(name) <= 255

incident_management_timeline_events

14 cols · no RLS · line 22608View in 3D
  • Nullable foreign key author_idincident_management_timeline_events.author_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key updated_by_user_idincident_management_timeline_events.updated_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key promoted_from_note_idincident_management_timeline_events.promoted_from_note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK author_id, updated_by_user_id, promoted_from_note_idincident_management_timeline_events has several nullable FKs (author_id, updated_by_user_id, promoted_from_note_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
occurred_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
author_id bigintnullusers.id 1:N · SET NULL
issue_id bigintNOT NULLissues.id 1:N · CASCADE
updated_by_user_id bigintnullusers.id 1:N · SET NULL
promoted_from_note_id bigintnullnotes.id 1:N · SET NULL
cached_markdown_version integernull
editable booleanNOT NULLFALSE
note textNOT NULLCHECK char_length(note) <= 10000
note_html textNOT NULLCHECK char_length(note_html) <= 10000
action textNOT NULLCHECK char_length(action) <= 128

Indexes

  • (author_id) index_im_timeline_events_author_id
  • (issue_id) index_im_timeline_events_issue_id
  • (project_id) index_im_timeline_events_project_id
  • (promoted_from_note_id) index_im_timeline_events_promoted_from_note_id
  • (updated_by_user_id) index_im_timeline_events_updated_by_user_id

Referenced by

Table checks: char_length(action) <= 128; char_length(note) <= 10000; char_length(note_html) <= 10000

instance 5 tables

Tables whose names start with instance_.

Entity-relationship diagram: instance_audit_events, instance_audit_events_streaming_headers, instance_model_selection_feature_settings, instance_type_ci_runner_machines, instance_type_ci_runnersinstance_audit_eventsid PKbigintcreated_at PKtimestamptzauthor_idbiginttarget_idbigintevent_nametextdetailstextip_addressinetauthor_nametextentity_pathtexttarget_detailstexttarget_typetextinstance_audit_events_streaming_headersid PKbigintcreated_attimestamptzupdated_attimestamptzinstance_external_audit_event_destination_id FKbigintkeytextvaluetextactivebooleaninstance_model_selection_feature_settingsid PKbigintcreated_attimestamptzupdated_attimestamptzfeaturesmallintoffered_model_reftextoffered_model_nametextmodel_allowlist_enabledbooleanmodel_allowlist_gitlab_model_refstext[]instance_type_ci_runner_machinesid PKbigintrunner_id FKbigintcreated_attimestamptzupdated_attimestamptzcontacted_attimestamptzcreation_statesmallintexecutor_typesmallintrunner_type PKsmallintconfigjsonbsystem_xidtextplatformtextarchitecturetextrevisiontextip_addresstextversiontextruntime_featuresjsonborganization_idbigintlabelsjsonbinstance_type_ci_runnersid PKbigintcreator_idbigintcreated_attimestamptzupdated_attimestamptzcontacted_attimestamptztoken_expires_attimestamptzpublic_projects_minutes_cost_factordouble precisionprivate_projects_minutes_cost_factordouble precisionaccess_levelintegermaximum_timeoutintegerrunner_type PKsmallintregistration_typesmallintcreation_statesmallintactivebooleanrun_untaggedbooleanlockedbooleannametexttoken_encryptedtextdescriptiontextmaintainer_notetextallowed_planstext[]allowed_plan_idsbigint[]organization_idbigintallowed_plan_name_uidssmallint[]token_rotation_deadlinetimestamptzuuiduuidaudit_events_instance_external_audit_event_destinationsinstance_external_audit_event_destination_idrunner_id, runner_type

Relationships

instance_audit_events

11 cols · no RLS · line 6717View in 3D
  • Polymorphic reference without referential integrity target_type, target_idtarget_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • Isolated tableinstance_audit_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('audit_events_id_seq' AS regclass))
created_at PKtimestamptzNOT NULL
author_id bigintNOT NULL
target_id bigintnull
event_name textnullCHECK char_length(event_name) <= 255
details textnull
ip_address inetnull
author_name textnullCHECK char_length(author_name) <= 255
entity_path textnullCHECK char_length(entity_path) <= 5500
target_details textnullCHECK char_length(target_details) <= 5500
target_type textnullCHECK char_length(target_type) <= 255

Indexes

  • (author_id, created_at, id) idx_instance_audit_events_on_author_id_created_at_id

Referenced by

  • nothing

Table checks: char_length(author_name) <= 255; char_length(entity_path) <= 5500; char_length(event_name) <= 255; char_length(target_details) <= 5500; char_length(target_type) <= 255

instance_audit_events_streaming_headers

7 cols · no RLS · line 22673View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
instance_external_audit_event_destination_id bigintNOT NULLaudit_events_instance_external_audit_event_destinations.id 1:N · CASCADE
key textNOT NULLCHECK char_length(key) <= 255
value textNOT NULLCHECK char_length(value) <= 2000
active booleanNOT NULLTRUE

Indexes

  • (instance_external_audit_event_destination_id) idx_headers_instance_external_audit_event_destination_id
  • UNIQUE (instance_external_audit_event_destination_id, key) idx_instance_external_audit_event_destination_id_key_uniq

Referenced by

  • nothing

Table checks: char_length(value) <= 2000; char_length(key) <= 255

instance_model_selection_feature_settings

8 cols · no RLS · line 22694View in 3D
  • Isolated tableinstance_model_selection_feature_settings references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
feature smallintNOT NULL
offered_model_ref textnullCHECK char_length(offered_model_ref) <= 255
offered_model_name textnullCHECK char_length(offered_model_name) <= 255
model_allowlist_enabled booleanNOT NULLFALSE
model_allowlist_gitlab_model_refs text[]NOT NULLCAST('{}' AS text[])CHECK cardinality(model_allowlist_gitlab_model_refs) <= 100

Indexes

  • UNIQUE (feature) index_instance_model_selection_feature_settings_on_feature

Referenced by

  • nothing

Table checks: char_length(offered_model_ref) <= 255; char_length(offered_model_name) <= 255; cardinality(model_allowlist_gitlab_model_refs) <= 100

instance_type_ci_runner_machines

18 cols · no RLS · line 22717View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
runner_id bigintNOT NULLinstance_type_ci_runners.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
contacted_at timestamptznull
creation_state smallintNOT NULL0
executor_type smallintnull
runner_type PKsmallintNOT NULLinstance_type_ci_runners.id 1:N · CASCADE
config jsonbNOT NULLCAST('{}' AS jsonb)
system_xid textNOT NULLCHECK char_length(system_xid) <= 64
platform textnullCHECK char_length(platform) <= 255
architecture textnullCHECK char_length(architecture) <= 255
revision textnullCHECK char_length(revision) <= 255
ip_address textnullCHECK char_length(ip_address) <= 1024
version textnullCHECK char_length(version) <= 2048
runtime_features jsonbNOT NULLCAST('{}' AS jsonb)
organization_id bigintnullCHECK organization_id IS NULL
labels jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (created_at, id) idx_instance_type_ci_runner_machines_on_created_at_and_id_desc
  • (contacted_at, id) index_inst_type_ci_runner_machines_on_contacted_at_desc_id_desc
  • UNIQUE (runner_id, runner_type, system_xid) index_inst_type_ci_runner_machines_on_runner_id_type_system_xid
  • (executor_type) index_instance_type_ci_runner_machines_on_executor_type
  • (substring(version, CAST('^\d+\.' AS text)), version, runner_id) index_instance_type_ci_runner_machines_on_major_version
  • (substring(version, CAST('^\d+\.\d+\.' AS text)), version, runner_id) index_instance_type_ci_runner_machines_on_minor_version
  • (organization_id) index_instance_type_ci_runner_machines_on_organization_id
  • (substring(version, CAST('^\d+\.\d+\.\d+' AS text)), version, runner_id) index_instance_type_ci_runner_machines_on_patch_version
  • (version) index_instance_type_ci_runner_machines_on_version

Referenced by

  • nothing

Table checks: char_length(system_xid) <= 64; char_length(revision) <= 255; char_length(version) <= 2048; char_length(ip_address) <= 1024; char_length(platform) <= 255; char_length(architecture) <= 255; organization_id IS NULL

instance_type_ci_runners

26 cols · no RLS · line 22745View in 3D
  • Monetary value stored as float public_projects_minutes_cost_factorpublic_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.
  • Monetary value stored as float private_projects_minutes_cost_factorprivate_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
creator_id bigintnull
created_at timestamptznull
updated_at timestamptznull
contacted_at timestamptznull
token_expires_at timestamptznull
public_projects_minutes_cost_factor double precisionNOT NULL1.0
private_projects_minutes_cost_factor double precisionNOT NULL1.0
access_level integerNOT NULL0
maximum_timeout integernull
runner_type PKsmallintNOT NULL
registration_type smallintNOT NULL0
creation_state smallintNOT NULL0
active booleanNOT NULLTRUE
run_untagged booleanNOT NULLTRUE
locked booleanNOT NULLFALSE
name textnullCHECK char_length(name) <= 256
token_encrypted textnullCHECK char_length(token_encrypted) <= 512
description textnullCHECK char_length(description) <= 1024
maintainer_note textnullCHECK char_length(maintainer_note) <= 1024
allowed_plans text[]NOT NULLCAST('{}' AS text[])
allowed_plan_ids bigint[]NOT NULLCAST('{}' AS bigint[])
organization_id bigintnullCHECK organization_id IS NULL
allowed_plan_name_uids smallint[]NOT NULLCAST('{}' AS smallint[])
token_rotation_deadline timestamptznull
uuid uuidnull

Indexes

  • (active, id) idx_instance_type_ci_runners_on_active_and_id
  • (contacted_at, id) idx_instance_type_ci_runners_on_contacted_at_and_id_desc
  • (contacted_at, id) WHERE active = FALSE idx_instance_type_ci_runners_on_contacted_at_id_where_inactive
  • UNIQUE (token_encrypted, runner_type) idx_instance_type_ci_runners_on_token_encrypted_and_runner_type
  • (token_expires_at, id) idx_instance_type_ci_runners_on_token_expires_at_desc_id_desc
  • UNIQUE (uuid, runner_type) index_ef00fcab21
  • (contacted_at, id) index_instance_type_ci_runners_on_contacted_at_desc_and_id_desc
  • (created_at, id) index_instance_type_ci_runners_on_created_at_and_id_desc
  • (created_at, id) index_instance_type_ci_runners_on_created_at_desc_and_id_desc
  • (created_at, id) WHERE active = FALSE index_instance_type_ci_runners_on_created_at_id_where_inactive
  • (creator_id) WHERE creator_id IS NOT NULL index_instance_type_ci_runners_on_creator_id_where_not_null
  • (description) index_instance_type_ci_runners_on_description_trigram
  • (locked) index_instance_type_ci_runners_on_locked
  • (organization_id) index_instance_type_ci_runners_on_organization_id
  • (token_expires_at, id) index_instance_type_ci_runners_on_token_expires_at_and_id_desc

Referenced by

Table checks: char_length(token_encrypted) <= 512; char_length(name) <= 256; char_length(maintainer_note) <= 1024; char_length(description) <= 1024; organization_id IS NULL

loose 5 tables

Tables whose names start with loose_.

Entity-relationship diagram: loose_foreign_keys_deleted_records, loose_foreign_keys_namespace_deleted_records, loose_foreign_keys_organization_deleted_records, loose_foreign_keys_project_deleted_records, loose_foreign_keys_user_deleted_recordsloose_foreign_keys_deleted_recordsid PKbigintpartition PKbigintprimary_key_valuebigintstatussmallintcreated_attimestamptzfully_qualified_table_nametextconsume_aftertimestamptzcleanup_attemptssmallintloose_foreign_keys_namespace_deleted_recordsid PKuuidpartition PKbigintprimary_key_valuebigintnamespace_idbigintconsume_aftertimestamptzcreated_attimestamptzstatussmallintcleanup_attemptssmallintfully_qualified_table_nametextloose_foreign_keys_organization_deleted_recordsid PKuuidpartition PKbigintprimary_key_valuebigintorganization_idbigintconsume_aftertimestamptzcreated_attimestamptzstatussmallintcleanup_attemptssmallintfully_qualified_table_nametextloose_foreign_keys_project_deleted_recordsid PKuuidpartition PKbigintprimary_key_valuebigintproject_idbigintconsume_aftertimestamptzcreated_attimestamptzstatussmallintcleanup_attemptssmallintfully_qualified_table_nametextloose_foreign_keys_user_deleted_recordsid PKuuidpartition PKbigintprimary_key_valuebigintuser_idbigintconsume_aftertimestamptzcreated_attimestamptzstatussmallintcleanup_attemptssmallintfully_qualified_table_nametext

Relationships

No foreign keys in this domain.

loose_foreign_keys_deleted_records

8 cols · no RLS · line 6737View in 3D
  • Isolated tableloose_foreign_keys_deleted_records references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
partition PKbigintNOT NULL1
primary_key_value bigintNOT NULL
status smallintNOT NULL1
created_at timestamptzNOT NULLnow()
fully_qualified_table_name textNOT NULLCHECK char_length(fully_qualified_table_name) <= 150
consume_after timestamptznullnow()
cleanup_attempts smallintnull0

Indexes

  • (partition, fully_qualified_table_name, consume_after, id) WHERE status = 1 index_loose_foreign_keys_deleted_records_for_partitioned_query

Referenced by

  • nothing

Table checks: char_length(fully_qualified_table_name) <= 150

loose_foreign_keys_namespace_deleted_records

9 cols · no RLS · line 6750View in 3D
  • Isolated tableloose_foreign_keys_namespace_deleted_records references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKuuidNOT NULLgen_random_uuid_v7()
partition PKbigintNOT NULL1
primary_key_value bigintNOT NULL
namespace_id bigintNOT NULL
consume_after timestamptznullnow()
created_at timestamptzNOT NULLnow()
status smallintNOT NULL1
cleanup_attempts smallintnull0
fully_qualified_table_name textNOT NULLCHECK char_length(fully_qualified_table_name) <= 150

Indexes

  • (partition, fully_qualified_table_name, consume_after, id) WHERE status = 1 index_lfk_namespace_deleted_records_partitioned_query

Referenced by

  • nothing

Table checks: char_length(fully_qualified_table_name) <= 150

loose_foreign_keys_organization_deleted_records

9 cols · no RLS · line 6764View in 3D
  • Isolated tableloose_foreign_keys_organization_deleted_records references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKuuidNOT NULLgen_random_uuid_v7()
partition PKbigintNOT NULL1
primary_key_value bigintNOT NULL
organization_id bigintNOT NULL
consume_after timestamptznullnow()
created_at timestamptzNOT NULLnow()
status smallintNOT NULL1
cleanup_attempts smallintnull0
fully_qualified_table_name textNOT NULLCHECK char_length(fully_qualified_table_name) <= 150

Indexes

  • (partition, fully_qualified_table_name, consume_after, id) WHERE status = 1 index_lfk_organization_deleted_records_partitioned_query

Referenced by

  • nothing

Table checks: char_length(fully_qualified_table_name) <= 150

loose_foreign_keys_project_deleted_records

9 cols · no RLS · line 6778View in 3D
  • Isolated tableloose_foreign_keys_project_deleted_records references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKuuidNOT NULLgen_random_uuid_v7()
partition PKbigintNOT NULL1
primary_key_value bigintNOT NULL
project_id bigintNOT NULL
consume_after timestamptznullnow()
created_at timestamptzNOT NULLnow()
status smallintNOT NULL1
cleanup_attempts smallintnull0
fully_qualified_table_name textNOT NULLCHECK char_length(fully_qualified_table_name) <= 150

Indexes

  • (partition, fully_qualified_table_name, consume_after, id) WHERE status = 1 index_lfk_project_deleted_records_partitioned_query

Referenced by

  • nothing

Table checks: char_length(fully_qualified_table_name) <= 150

loose_foreign_keys_user_deleted_records

9 cols · no RLS · line 6792View in 3D
  • Isolated tableloose_foreign_keys_user_deleted_records references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKuuidNOT NULLgen_random_uuid_v7()
partition PKbigintNOT NULL1
primary_key_value bigintNOT NULL
user_id bigintNOT NULL
consume_after timestamptznullnow()
created_at timestamptzNOT NULLnow()
status smallintNOT NULL1
cleanup_attempts smallintnull0
fully_qualified_table_name textNOT NULLCHECK char_length(fully_qualified_table_name) <= 150

Indexes

  • (partition, fully_qualified_table_name, consume_after, id) WHERE status = 1 index_lfk_user_deleted_records_partitioned_query

Referenced by

  • nothing

Table checks: char_length(fully_qualified_table_name) <= 150

merge 33 tables

Tables whose names start with merge_.

Entity-relationship diagram: merge_request_commits_metadata, merge_request_diff_commits_b5377a7a34, merge_request_diff_files_99208b8fac, merge_requests_merge_data, merge_request_approval_metrics, merge_request_assignees, merge_request_assignment_events, merge_request_blocks, merge_request_cleanup_schedules, merge_request_context_commit_diff_files, merge_request_context_commits, merge_request_diff_commit_users, merge_request_diff_commits, merge_request_diff_details, merge_request_diff_files, merge_request_diffs, merge_request_merge_schedules, merge_request_metrics, merge_request_predictions, merge_request_requested_changes, merge_request_reviewers, merge_request_saved_views, merge_request_user_mentions, merge_requests, merge_requests_approval_rules, merge_requests_approval_rules_approver_groups, merge_requests_approval_rules_approver_users, merge_requests_approval_rules_groups, merge_requests_approval_rules_merge_requests, merge_requests_approval_rules_projects, merge_requests_closing_issues, merge_requests_compliance_violations, merge_trainsmerge_request_commits_metadataauthored_datetimestampcommitted_datetimestampid PKbigintproject_id PKbigintcommit_author_idbigintcommitter_idbigintshabyteamessagetextmerge_request_diff_commits_b5377a7a34merge_request_commits_metadata_idbigintmerge_request_diff_id PKbigintproject_id PKbigintrelative_order PKintegermerge_request_diff_files_99208b8facnew_filebooleanrenamed_filebooleandeleted_filebooleantoo_largebooleana_modevarcharb_modevarcharnew_pathtextold_pathtextdifftextbinarybooleanexternal_diff_offsetintegerexternal_diff_sizeintegergeneratedbooleanencoded_file_pathbooleanproject_idbigintmerge_request_diff_id PKbigintrelative_order PKintegermerge_requests_merge_datamerge_request_id PKbigintproject_id FKbigintmerge_user_id FKbigintmerge_paramstextmerge_errortextmerge_jidtextmerge_commit_shabyteamerged_commit_shabyteamerge_ref_shabyteasquash_commit_shabyteain_progress_merge_commit_shabyteamerge_statussmallintauto_merge_enabledbooleansquashbooleanmerge_request_approval_metricsmerge_request_id PKbigintlast_approved_attimestamptztarget_project_id FKbigintmerge_request_assigneesid PKbigintuser_id FKbigintmerge_request_id FKbigintcreated_attimestamptzproject_id FKbigintmerge_request_assignment_eventsid PKbigintuser_id FKbigintmerge_request_id FKbigintcreated_attimestamptzactionsmallintproject_id FKbigintmerge_request_blocksid PKbigintblocking_merge_request_id FKbigintblocked_merge_request_id FKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintmerge_request_cleanup_schedulesmerge_request_id PKbigintscheduled_attimestamptzcompleted_attimestamptzcreated_attimestamptzupdated_attimestamptzstatussmallintfailed_countintegerproject_id FKbigintmerge_request_context_commit_diff_filesshabytearelative_order PKintegernew_filebooleanrenamed_filebooleandeleted_filebooleantoo_largebooleana_modevarchar(255)b_modevarchar(255)new_pathtextold_pathtextdifftextbinarybooleanmerge_request_context_commit_id PKbigintgeneratedbooleanencoded_file_pathbooleanproject_id FKbigintmerge_request_context_commitsid PKbigintauthored_datetimestamptzcommitted_datetimestamptzrelative_orderintegershabyteaauthor_nametextauthor_emailtextcommitter_nametextcommitter_emailtextmessagetextmerge_request_id FKbiginttrailersjsonbproject_id FKbigintmerge_request_diff_commit_usersid PKbigintnametextemailtextorganization_id FKbigintmerge_request_diff_commitsauthored_datetimestampcommitted_datetimestampmerge_request_diff_id PKbigintrelative_order PKintegershabyteamessagetexttrailersjsonbcommit_author_idbigintcommitter_idbigintmerge_request_commits_metadata_idbigintproject_idbigintmerge_request_diff_detailsmerge_request_diff_id PKbigintverification_retry_attimestamptzverified_attimestamptzverification_retry_countsmallintverification_checksumbyteaverification_failuretextverification_statesmallintverification_started_attimestamptzproject_id FKbigintmerge_request_diff_filesmerge_request_diff_id PKbigintrelative_order PKintegernew_filebooleanrenamed_filebooleandeleted_filebooleantoo_largebooleana_modevarcharb_modevarcharnew_pathtextold_pathtextdifftextbinarybooleanexternal_diff_offsetintegerexternal_diff_sizeintegergeneratedbooleanencoded_file_pathbooleanproject_id FKbigintmerge_request_diffsid PKbigintstatevarcharmerge_request_id FKbigintcreated_attimestampupdated_attimestampbase_commit_shavarcharreal_sizevarcharhead_commit_shavarcharstart_commit_shavarcharcommits_countintegerexternal_diffvarcharexternal_diff_storeintegerstored_externallybooleanfiles_countsmallintsortedbooleandiff_typesmallintpatch_id_shabyteaproject_id FKbigintbase_commit_sha_byteabyteastart_commit_sha_byteabyteahead_commit_sha_byteabyteamerge_request_merge_schedulesid PKbigintmerge_request_id FKbigintmerge_aftertimestamptzproject_id FKbigintmerge_request_metricsmerge_request_id FKbigintlatest_build_started_attimestamplatest_build_finished_attimestampfirst_deployed_to_production_attimestampmerged_attimestampcreated_attimestampupdated_attimestampmerged_by_id FKbigintlatest_closed_by_id FKbigintlatest_closed_attimestamptzfirst_comment_attimestamptzfirst_commit_attimestamptzlast_commit_attimestamptzdiff_sizeintegermodified_paths_sizeintegercommits_countintegerfirst_approved_attimestamptzfirst_reassigned_attimestamptzadded_linesintegerremoved_linesintegertarget_project_id FKbigintid PKbigintfirst_contributionbooleanpipeline_idbigintreviewer_first_assigned_attimestamptzmerge_request_predictionsmerge_request_id PKbigintcreated_attimestamptzupdated_attimestamptzsuggested_reviewersjsonbaccepted_reviewersjsonbproject_id FKbigintmerge_request_requested_changesid PKbigintproject_idbigintuser_idbigintmerge_request_idbigintcreated_attimestamptzupdated_attimestamptzmerge_request_reviewersid PKbigintuser_id FKbigintmerge_request_id FKbigintcreated_attimestamptzstatesmallintproject_id FKbigintupdated_attimestamptzmerge_request_saved_viewsid PKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptznametextfiltersjsonbmerge_request_user_mentionsid PKbigintmerge_request_id FKbigintmentioned_users_idsbigint[]mentioned_projects_idsbigint[]mentioned_groups_idsbigint[]note_id FKbigintproject_id FKbigintmerge_requestsid PKbiginttarget_branchvarcharsource_branchvarcharsource_project_id FKbigintauthor_id FKbigintassignee_id FKbiginttitlevarcharcreated_attimestampupdated_attimestampmilestone_id FKbigintmerge_statusvarchartarget_project_id FKbigintiidintegerdescriptiontextupdated_by_id FKbigintmerge_errortextmerge_paramstextmerge_when_pipeline_succeedsbooleanmerge_user_id FKbigintmerge_commit_shavarcharapprovals_before_mergeintegerrebase_commit_shavarcharin_progress_merge_commit_shavarcharlock_versionintegertitle_htmltextdescription_htmltexttime_estimateintegersquashbooleancached_markdown_versionintegerlast_edited_attimestamplast_edited_by_idbigintmerge_jidvarchardiscussion_lockedbooleanlatest_merge_request_diff_id FKbigintallow_maintainer_to_pushbooleanstate_idsmallintrebase_jidvarcharsquash_commit_shabyteamerge_ref_shabyteadraftbooleanprepared_attimestamptzmerged_commit_shabyteaoverride_requested_changesbooleanhead_pipeline_idbigintimported_fromsmallintretargetedbooleanmerge_requests_approval_rulesid PKbigintnametextapprovals_requiredintegerrule_typesmallintoriginsmallintproject_id FKbigintgroup_id FKbigintsource_rule_id FKbigintcreated_attimestamptzupdated_attimestamptzmerge_requests_approval_rules_approver_groupsid PKbigintapproval_rule_id FKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzmerge_requests_approval_rules_approver_usersid PKbigintapproval_rule_id FKbigintuser_id FKbigintproject_id FKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzmerge_requests_approval_rules_groupsid PKbigintapproval_rule_id FKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzmerge_requests_approval_rules_merge_requestsid PKbigintapproval_rule_id FKbigintmerge_request_id FKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzmerge_requests_approval_rules_projectsid PKbigintapproval_rule_id FKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzmerge_requests_closing_issuesid PKbigintmerge_request_id FKbigintissue_id FKbigintcreated_attimestampupdated_attimestampfrom_mr_descriptionbooleanproject_id FKbigintlink_typesmallintmerge_requests_compliance_violationsid PKbigintviolating_user_id FKbigintmerge_request_id FKbigintreasonsmallintseverity_levelsmallintmerged_attimestamptztarget_project_id FKbiginttitletexttarget_branchtextmerge_trainsid PKbigintmerge_request_id FKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptztarget_project_id FKbiginttarget_branchtextstatussmallintmerged_attimestamptzdurationintegerpipeline_idbigintissuesmilestonesnamespacesnotesorganizationsprojectsusersmerge_request_idsource_rule_idorganization_idproject_iduser_idgroup_idproject_idlatest_merge_request_diff_idassignee_idupdated_by_idmilestone_idtarget_project_idmerge_user_idauthor_idsource_project_idapproval_rule_idgroup_iduser_idproject_idapproval_rule_idgroup_idapproval_rule_idgroup_idapproval_rule_idproject_idtarget_project_idmerge_request_idproject_idmerge_request_iduser_idmerge_request_idproject_iduser_idproject_idblocked_merge_request_idblocking_merge_request_idproject_idmerge_request_idproject_idmerge_request_idproject_idmerge_request_diff_idproject_idmerge_request_diff_idproject_idmerge_request_idtarget_project_idmerged_by_idlatest_closed_by_idmerge_request_idproject_idmerge_request_idproject_iduser_idmerge_request_idproject_idmerge_request_idnote_idproject_idapproval_rule_idmerge_request_idproject_idmerge_request_idissue_idmerge_request_idtarget_project_idviolating_user_idmerge_user_idproject_idmerge_request_iduser_idmerge_request_idtarget_project_idproject_idmerge_request_context_commit_id

Relationships

merge_request_commits_metadata

8 cols · no RLS · line 6806View in 3D
  • TIMESTAMP without time zone authored_dateauthored_date stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone committed_datecommitted_date stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tablemerge_request_commits_metadata references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
authored_date timestampnull
committed_date timestampnull
id PKbigintNOT NULL
project_id PKbigintNOT NULL
commit_author_id bigintNOT NULL
committer_id bigintNOT NULL
sha byteaNOT NULL
message textnull

Indexes

  • UNIQUE (project_id, sha) index_merge_request_commits_metadata_on_project_id_and_sha

Referenced by

  • nothing

merge_request_diff_commits_b5377a7a34

4 cols · no RLS · line 6818View in 3D
  • Isolated tablemerge_request_diff_commits_b5377a7a34 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
merge_request_commits_metadata_id bigintNOT NULL
merge_request_diff_id PKbigintNOT NULL
project_id PKbigintNOT NULL
relative_order PKintegerNOT NULL

Indexes

  • (project_id) index_merge_request_diff_commits_b5377a7a34_on_project_id
  • (merge_request_commits_metadata_id) index_partitioned_mrdc_on_merge_request_commits_metadata_id

Referenced by

  • nothing

merge_request_diff_files_99208b8fac

17 cols · no RLS · line 6826View in 3D
  • Enum-like column with no CHECK a_modea_mode is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Enum-like column with no CHECK b_modeb_mode is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Isolated tablemerge_request_diff_files_99208b8fac references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
new_file booleanNOT NULL
renamed_file booleanNOT NULL
deleted_file booleanNOT NULL
too_large booleanNOT NULL
a_mode varcharNOT NULL
b_mode varcharNOT NULL
new_path textnull
old_path textNOT NULL
diff textnull
binary booleannull
external_diff_offset integernull
external_diff_size integernull
generated booleannull
encoded_file_path booleanNOT NULLFALSE
project_id bigintnullCHECK project_id IS NOT NULL
merge_request_diff_id PKbigintNOT NULL
relative_order PKintegerNOT NULL

Indexes

  • (merge_request_diff_id) index_merge_request_diff_files_99208b8fac_on_mr_diff_id
  • (project_id) index_merge_request_diff_files_99208b8fac_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

merge_requests_merge_data

14 cols · no RLS · line 6848View in 3D
  • Nullable foreign key merge_user_idmerge_requests_merge_data.merge_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
merge_request_id PKbigintNOT NULLmerge_requests.id 1:1 · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
merge_user_id bigintnullusers.id 1:N · SET NULL
merge_params textnull
merge_error textnull
merge_jid textnullCHECK char_length(merge_jid) <= 255
merge_commit_sha byteanull
merged_commit_sha byteanull
merge_ref_sha byteanull
squash_commit_sha byteanull
in_progress_merge_commit_sha byteanull
merge_status smallintNOT NULL0
auto_merge_enabled booleanNOT NULLFALSE
squash booleanNOT NULLFALSE

Indexes

  • (merge_user_id) index_merge_requests_merge_data_on_merge_user_id
  • (project_id) index_merge_requests_merge_data_on_project_id

Referenced by

  • nothing

Table checks: char_length(merge_jid) <= 255

merge_request_approval_metrics

3 cols · no RLS · line 23812View in 3D
ColumnTypeNullDefaultReferencesNotes
merge_request_id PKbigintNOT NULLmerge_requests.id 1:1 · CASCADE
last_approved_at timestamptzNOT NULL
target_project_id bigintNOT NULLprojects.id 1:N · CASCADE

Indexes

  • (merge_request_id) index_merge_request_approval_metrics_on_merge_request_id
  • UNIQUE (target_project_id, merge_request_id) index_mr_approval_metrics_on_project_id_and_mr_id

Referenced by

  • nothing

merge_request_assignees

5 cols · no RLS · line 23818View in 3D
  • Nullable foreign key project_idmerge_request_assignees.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
created_at timestamptznull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (merge_request_id, user_id) index_merge_request_assignees_on_merge_request_id_and_user_id
  • (project_id) index_merge_request_assignees_on_project_id
  • (user_id) index_merge_request_assignees_on_user_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

merge_request_assignment_events

6 cols · no RLS · line 23836View in 3D
  • Nullable foreign key project_idmerge_request_assignment_events.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idmerge_request_assignment_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, user_idmerge_request_assignment_events has several nullable FKs (project_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintnullusers.id 1:N · SET NULL
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
created_at timestamptzNOT NULLnow()
action smallintNOT NULL1
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_merge_request_assignment_events_on_project_id
  • (user_id) index_merge_request_assignment_events_on_user_id
  • (merge_request_id, action, created_at, id) index_on_mr_assignment_events_mr_id_action_created_at_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

merge_request_blocks

6 cols · no RLS · line 23855View in 3D
  • Nullable foreign key project_idmerge_request_blocks.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
blocking_merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
blocked_merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (blocked_merge_request_id) index_merge_request_blocks_on_blocked_merge_request_id
  • (project_id) index_merge_request_blocks_on_project_id
  • UNIQUE (blocking_merge_request_id, blocked_merge_request_id) index_mr_blocks_on_blocking_and_blocked_mr_ids

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

merge_request_cleanup_schedules

8 cols · no RLS · line 23874View in 3D
  • Nullable foreign key project_idmerge_request_cleanup_schedules.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
merge_request_id PKbigintNOT NULLmerge_requests.id 1:1 · CASCADE
scheduled_at timestamptzNOT NULL
completed_at timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
failed_count integerNOT NULL0
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (merge_request_id) index_merge_request_cleanup_schedules_on_merge_request_id
  • (project_id) index_merge_request_cleanup_schedules_on_project_id
  • (status) index_merge_request_cleanup_schedules_on_status
  • (scheduled_at) WHERE completed_at IS NULL AND status = 0 index_mr_cleanup_schedules_timestamps_status

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

merge_request_context_commit_diff_files

16 cols · no RLS · line 23904View in 3D
  • Nullable foreign key project_idmerge_request_context_commit_diff_files.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
sha byteaNOT NULL
relative_order PKintegerNOT NULL
new_file booleanNOT NULL
renamed_file booleanNOT NULL
deleted_file booleanNOT NULL
too_large booleanNOT NULL
a_mode varchar(255)NOT NULL
b_mode varchar(255)NOT NULL
new_path textNOT NULL
old_path textNOT NULL
diff textnull
binary booleannull
merge_request_context_commit_id PKbigintNOT NULLmerge_request_context_commits.id 1:N · CASCADE
generated booleannull
encoded_file_path booleanNOT NULLFALSE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (merge_request_context_commit_id, sha) idx_mr_cc_diff_files_on_mr_cc_id_and_sha
  • (project_id) index_merge_request_context_commit_diff_files_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

merge_request_context_commits

13 cols · no RLS · line 23924View in 3D
  • Nullable foreign key project_idmerge_request_context_commits.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key merge_request_idmerge_request_context_commits.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, merge_request_idmerge_request_context_commits has several nullable FKs (project_id, merge_request_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
authored_date timestamptznull
committed_date timestamptznull
relative_order integerNOT NULL
sha byteaNOT NULL
author_name textnull
author_email textnull
committer_name textnull
committer_email textnull
message textnull
merge_request_id bigintnullmerge_requests.id 1:N · CASCADECHECK merge_request_id IS NOT NULL
trailers jsonbNOT NULLCAST('{}' AS jsonb)
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_merge_request_context_commits_on_project_id
  • UNIQUE (merge_request_id, sha) index_mr_context_commits_on_merge_request_id_and_sha

Referenced by

Table checks: merge_request_id IS NOT NULL; project_id IS NOT NULL

merge_request_diff_commit_users

4 cols · no RLS · line 23951View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name textnullCHECK char_length(name) <= 512
email textnullCHECK char_length(email) <= 512
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE

Indexes

  • UNIQUE (organization_id, name, email) index_merge_request_diff_commit_users_on_org_id_name_email

Referenced by

  • nothing

Table checks: char_length(name) <= 512; char_length(email) <= 512; COALESCE(name, CAST('' AS text)) <> CAST('' AS text) OR COALESCE(email, CAST('' AS text)) <> CAST('' AS text)

merge_request_diff_commits

11 cols · no RLS · line 23970View in 3D
  • TIMESTAMP without time zone authored_dateauthored_date stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone committed_datecommitted_date stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tablemerge_request_diff_commits references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
authored_date timestampnull
committed_date timestampnull
merge_request_diff_id PKbigintNOT NULL
relative_order PKintegerNOT NULL
sha byteanull
message textnull
trailers jsonbnullCAST('{}' AS jsonb)
commit_author_id bigintnull
committer_id bigintnull
merge_request_commits_metadata_id bigintnull
project_id bigintnull

Indexes

  • (project_id) index_merge_request_diff_commits_on_project_id
  • (sha) index_merge_request_diff_commits_on_sha
  • (merge_request_commits_metadata_id) WHERE merge_request_commits_metadata_id IS NOT NULL index_mrdc_on_merge_request_commits_metadata_id

Referenced by

  • nothing

merge_request_diff_details

9 cols · no RLS · line 23984View in 3D
  • Nullable foreign key project_idmerge_request_diff_details.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
merge_request_diff_id PKbigintNOT NULLmerge_request_diffs.id 1:1 · CASCADE
verification_retry_at timestamptznull
verified_at timestamptznull
verification_retry_count smallintnull
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
verification_state smallintNOT NULL0
verification_started_at timestamptznull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_merge_request_diff_details_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_merge_request_diff_details_needs_verification
  • (merge_request_diff_id) index_merge_request_diff_details_on_merge_request_diff_id
  • (project_id) index_merge_request_diff_details_on_project_id
  • (verification_state) index_merge_request_diff_details_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_merge_request_diff_details_pending_verification

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(verification_failure) <= 255

merge_request_diff_files

17 cols · no RLS · line 24007View in 3D
  • Nullable foreign key project_idmerge_request_diff_files.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK a_modea_mode is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Enum-like column with no CHECK b_modeb_mode is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
ColumnTypeNullDefaultReferencesNotes
merge_request_diff_id PKbigintNOT NULLmerge_request_diffs.id 1:N · CASCADE
relative_order PKintegerNOT NULL
new_file booleanNOT NULL
renamed_file booleanNOT NULL
deleted_file booleanNOT NULL
too_large booleanNOT NULL
a_mode varcharNOT NULL
b_mode varcharNOT NULL
new_path textnull
old_path textNOT NULL
diff textnull
binary booleannull
external_diff_offset integernull
external_diff_size integernull
generated booleannull
encoded_file_path booleanNOT NULLFALSE
project_id bigintnullprojects.id 1:N · CASCADE

Indexes

  • (project_id) index_merge_request_diff_files_on_project_id

Referenced by

  • nothing

merge_request_diffs

21 cols · no RLS · line 24027View in 3D
  • Nullable foreign key project_idmerge_request_diffs.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK statestate is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
state varcharnull
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
created_at timestampnull
updated_at timestampnull
base_commit_sha varcharnull
real_size varcharnull
head_commit_sha varcharnull
start_commit_sha varcharnull
commits_count integernull
external_diff varcharnull
external_diff_store integernull1CHECK external_diff_store IS NOT NULL
stored_externally booleannull
files_count smallintnull
sorted booleanNOT NULLFALSE
diff_type smallintNOT NULL1
patch_id_sha byteanull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
base_commit_sha_bytea byteanull
start_commit_sha_bytea byteanull
head_commit_sha_bytea byteanull

Indexes

  • (id) WHERE files_count > 0 AND (NOT stored_externally OR stored_externally IS NULL) index_merge_request_diffs_by_id_partial
  • (external_diff) index_merge_request_diffs_on_external_diff
  • (external_diff_store) index_merge_request_diffs_on_external_diff_store
  • (head_commit_sha_bytea) index_merge_request_diffs_on_head_commit_sha_bytea
  • (merge_request_id, id) index_merge_request_diffs_on_merge_request_id_and_id
  • (project_id, id) index_merge_request_diffs_on_project_id_and_id
  • UNIQUE (merge_request_id) WHERE diff_type = 2 index_merge_request_diffs_on_unique_merge_request_id
  • (head_commit_sha) index_on_merge_request_diffs_head_commit_sha

Referenced by

Table checks: project_id IS NOT NULL; external_diff_store IS NOT NULL

merge_request_merge_schedules

4 cols · no RLS · line 24062View in 3D
  • Junction table allows duplicate links merge_request_id, project_idmerge_request_merge_schedules looks like a many-to-many link table but has no unique constraint across (merge_request_id, project_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
merge_request_id bigintNOT NULLmerge_requests.id 1:1 · CASCADE
merge_after timestamptznull
project_id bigintNOT NULLprojects.id 1:N · CASCADE

Indexes

  • (merge_after, merge_request_id) index_merge_request_merge_schedules_on_merge_after_and_mr_id
  • UNIQUE (merge_request_id) index_merge_request_merge_schedules_on_merge_request_id
  • (project_id) index_merge_request_merge_schedules_on_project_id

Referenced by

  • nothing

merge_request_metrics

25 cols · no RLS · line 24078View in 3D
  • Nullable foreign key target_project_idmerge_request_metrics.target_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key merged_by_idmerge_request_metrics.merged_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key latest_closed_by_idmerge_request_metrics.latest_closed_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK target_project_id, merged_by_id, latest_closed_by_idmerge_request_metrics has several nullable FKs (target_project_id, merged_by_id, latest_closed_by_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone latest_build_started_atlatest_build_started_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone latest_build_finished_atlatest_build_finished_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone first_deployed_to_production_atfirst_deployed_to_production_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone merged_atmerged_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
merge_request_id bigintNOT NULLmerge_requests.id 1:1 · CASCADE
latest_build_started_at timestampnull
latest_build_finished_at timestampnull
first_deployed_to_production_at timestampnull
merged_at timestampnull
created_at timestampNOT NULL
updated_at timestampNOT NULL
merged_by_id bigintnullusers.id 1:N · SET NULL
latest_closed_by_id bigintnullusers.id 1:N · SET NULL
latest_closed_at timestamptznull
first_comment_at timestamptznull
first_commit_at timestamptznull
last_commit_at timestamptznull
diff_size integernull
modified_paths_size integernull
commits_count integernull
first_approved_at timestamptznull
first_reassigned_at timestamptznull
added_lines integernull
removed_lines integernull
target_project_id bigintnullprojects.id 1:N · CASCADECHECK target_project_id IS NOT NULL
id PKbigintNOT NULL
first_contribution booleanNOT NULLFALSE
pipeline_id bigintnull
reviewer_first_assigned_at timestamptznull

Indexes

  • (merged_by_id, target_project_id, merge_request_id) idx_merge_request_metrics_on_merged_by_project_and_mr
  • (target_project_id, latest_closed_at, merge_request_id) WHERE latest_closed_at IS NOT NULL idx_mr_metrics_on_project_closed_at_with_mr_id
  • (first_deployed_to_production_at) index_merge_request_metrics_on_first_deployed_to_production_at
  • (latest_closed_by_id) index_merge_request_metrics_on_latest_closed_by_id
  • (merge_request_id, merged_at) WHERE merged_at IS NOT NULL index_merge_request_metrics_on_merge_request_id_and_merged_at
  • (merged_at) index_merge_request_metrics_on_merged_at
  • (pipeline_id) index_merge_request_metrics_on_pipeline_id
  • (target_project_id, merged_at, id) index_mr_metrics_on_target_project_id_merged_at_nulls_last
  • (target_project_id, merged_at, created_at) WHERE merged_at > created_at index_mr_metrics_on_target_project_id_merged_at_time_to_merge
  • UNIQUE (merge_request_id) unique_merge_request_metrics_by_merge_request_id

Referenced by

  • nothing

Table checks: target_project_id IS NOT NULL

merge_request_predictions

6 cols · no RLS · line 24116View in 3D
  • Nullable foreign key project_idmerge_request_predictions.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
merge_request_id PKbigintNOT NULLmerge_requests.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
suggested_reviewers jsonbNOT NULLCAST('{}' AS jsonb)
accepted_reviewers jsonbNOT NULLCAST('{}' AS jsonb)
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_merge_request_predictions_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

merge_request_requested_changes

6 cols · no RLS · line 24135View in 3D
  • Isolated tablemerge_request_requested_changes references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
user_id bigintNOT NULL
merge_request_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (merge_request_id) index_merge_request_requested_changes_on_merge_request_id
  • (project_id) index_merge_request_requested_changes_on_project_id
  • (user_id) index_merge_request_requested_changes_on_user_id

Referenced by

  • nothing

merge_request_reviewers

7 cols · no RLS · line 24153View in 3D
  • Nullable foreign key project_idmerge_request_reviewers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
created_at timestamptzNOT NULL
state smallintNOT NULL0
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
updated_at timestamptznull

Indexes

  • UNIQUE (merge_request_id, user_id) index_merge_request_reviewers_on_merge_request_id_and_user_id
  • (project_id) index_merge_request_reviewers_on_project_id
  • (user_id) index_merge_request_reviewers_on_user_id
  • (user_id, state) WHERE state = 2 index_on_merge_request_reviewers_user_id_and_state

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

merge_request_saved_views

6 cols · no RLS · line 24173View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
filters jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • UNIQUE (user_id, name) index_merge_request_saved_views_on_user_id_and_name

Referenced by

  • nothing

Table checks: char_length(name) <= 255

merge_request_user_mentions

7 cols · no RLS · line 24192View in 3D
  • Nullable foreign key project_idmerge_request_user_mentions.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key note_idmerge_request_user_mentions.note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, note_idmerge_request_user_mentions has several nullable FKs (project_id, note_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
mentioned_users_ids bigint[]null
mentioned_projects_ids bigint[]null
mentioned_groups_ids bigint[]null
note_id bigintnullnotes.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (note_id) WHERE note_id IS NOT NULL index_merge_request_user_mentions_on_note_id
  • (project_id) index_merge_request_user_mentions_on_project_id
  • UNIQUE (merge_request_id, note_id) merge_request_user_mentions_on_mr_id_and_note_id_index
  • UNIQUE (merge_request_id) WHERE note_id IS NULL merge_request_user_mentions_on_mr_id_index

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

merge_requests

46 cols · no RLS · line 24212View in 3D
  • Nullable foreign key latest_merge_request_diff_idmerge_requests.latest_merge_request_diff_id may be NULL, so the relationship to merge_request_diffs is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key assignee_idmerge_requests.assignee_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key updated_by_idmerge_requests.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key milestone_idmerge_requests.milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key merge_user_idmerge_requests.merge_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key author_idmerge_requests.author_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key source_project_idmerge_requests.source_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK merge_statusmerge_status is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Either/or foreign keys without a CHECK latest_merge_request_diff_id, assignee_id, updated_by_id, milestone_id, merge_user_id, author_id, source_project_idmerge_requests has several nullable FKs (latest_merge_request_diff_id, assignee_id, updated_by_id, milestone_id, merge_user_id, author_id, source_project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone last_edited_atlast_edited_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Foreign-key cycle — merge_requests → merge_request_diffs → merge_requests. Rows must be inserted with a deferred constraint or a NULL-then-update dance; backups/restores and truncation have no valid order; ON DELETE CASCADE can loop.
  • Wide table (46 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
target_branch varcharNOT NULL
source_branch varcharNOT NULL
source_project_id bigintnullprojects.id 1:N · SET NULL
author_id bigintnullusers.id 1:N · SET NULL
assignee_id bigintnullusers.id 1:N · SET NULL
title varcharnull
created_at timestampnull
updated_at timestampnull
milestone_id bigintnullmilestones.id 1:N · SET NULL
merge_status varcharNOT NULLCAST('unchecked' AS varchar)
target_project_id bigintNOT NULLprojects.id 1:N · CASCADE
iid integernull
description textnull
updated_by_id bigintnullusers.id 1:N · SET NULL
merge_error textnull
merge_params textnull
merge_when_pipeline_succeeds booleanNOT NULLFALSE
merge_user_id bigintnullusers.id 1:N · SET NULL
merge_commit_sha varcharnull
approvals_before_merge integernull
rebase_commit_sha varcharnull
in_progress_merge_commit_sha varcharnull
lock_version integernull0CHECK lock_version IS NOT NULL
title_html textnull
description_html textnull
time_estimate integernull0
squash booleanNOT NULLFALSE
cached_markdown_version integernull
last_edited_at timestampnull
last_edited_by_id bigintnull
merge_jid varcharnull
discussion_locked booleannull
latest_merge_request_diff_id bigintnullmerge_request_diffs.id 1:N · SET NULL
allow_maintainer_to_push booleannullTRUE
state_id smallintNOT NULL1
rebase_jid varcharnull
squash_commit_sha byteanull
merge_ref_sha byteanull
draft booleanNOT NULLFALSE
prepared_at timestamptznull
merged_commit_sha byteanull
override_requested_changes booleanNOT NULLFALSE
head_pipeline_id bigintnull
imported_from smallintNOT NULL0
retargeted booleanNOT NULLFALSE

Indexes

  • (id, merge_jid) WHERE merge_jid IS NOT NULL AND state_id = 4 idx_merge_requests_on_id_and_merge_jid
  • (id) WHERE state_id = 3 idx_merge_requests_on_merged_state
  • (source_project_id, source_branch) WHERE state_id = 1 idx_merge_requests_on_source_project_and_branch_state_opened
  • (id) WHERE state_id <> 3 idx_merge_requests_on_unmerged_state_id
  • (target_project_id, state_id, created_at, id) idx_mrs_on_target_id_and_created_at_and_state_id
  • (latest_merge_request_diff_id, target_project_id) WHERE state_id = 3 index_merge_requests_for_latest_diffs_with_state_merged
  • (assignee_id) index_merge_requests_on_assignee_id
  • (author_id, created_at) index_merge_requests_on_author_id_and_created_at
  • (author_id, id) index_merge_requests_on_author_id_and_id
  • (author_id, target_project_id) index_merge_requests_on_author_id_and_target_project_id
  • (created_at) index_merge_requests_on_created_at
  • (head_pipeline_id) index_merge_requests_on_head_pipeline_id
  • (latest_merge_request_diff_id) index_merge_requests_on_latest_merge_request_diff_id
  • (merge_user_id) WHERE merge_user_id IS NOT NULL index_merge_requests_on_merge_user_id
  • (milestone_id) index_merge_requests_on_milestone_id
  • (source_branch) index_merge_requests_on_source_branch
  • (source_project_id, source_branch) index_merge_requests_on_source_project_id_and_source_branch
  • (target_branch) index_merge_requests_on_target_branch
  • (target_project_id, created_at, id) index_merge_requests_on_target_project_id_and_created_at_and_id
  • UNIQUE (target_project_id, iid) index_merge_requests_on_target_project_id_and_iid
  • (target_project_id, merged_commit_sha) index_merge_requests_on_target_project_id_and_merged_commit_sha
  • (target_project_id, source_branch) index_merge_requests_on_target_project_id_and_source_branch
  • (target_project_id, squash_commit_sha) index_merge_requests_on_target_project_id_and_squash_commit_sha
  • (target_project_id, target_branch) WHERE state_id = 1 AND merge_when_pipeline_succeeds = TRUE index_merge_requests_on_target_project_id_and_target_branch
  • (target_project_id, updated_at, id) index_merge_requests_on_target_project_id_and_updated_at_and_id
  • (target_project_id, merge_commit_sha, id) index_merge_requests_on_tp_id_and_merge_commit_sha_and_id
  • (updated_by_id) WHERE updated_by_id IS NOT NULL index_merge_requests_on_updated_by_id
  • (target_project_id) index_on_merge_requests_for_latest_diffs

Referenced by

Table checks: lock_version IS NOT NULL

merge_requests_approval_rules

10 cols · no RLS · line 24262View in 3D
  • Nullable foreign key group_idmerge_requests_approval_rules.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idmerge_requests_approval_rules.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key source_rule_idmerge_requests_approval_rules.source_rule_id may be NULL, so the relationship to merge_requests_approval_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK group_id, project_id, source_rule_idmerge_requests_approval_rules has several nullable FKs (group_id, project_id, source_rule_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
approvals_required integerNOT NULL0
rule_type smallintNOT NULL0
origin smallintNOT NULL0
project_id bigintnullprojects.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
source_rule_id bigintnullmerge_requests_approval_rules.id 1:N · SET NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (group_id) index_merge_requests_approval_rules_on_group_id
  • (project_id) index_merge_requests_approval_rules_on_project_id
  • (source_rule_id) index_merge_requests_approval_rules_on_source_rule_id

Referenced by

Table checks: num_nonnulls(group_id, project_id) = 1; char_length(name) <= 255

merge_requests_approval_rules_approver_groups

5 cols · no RLS · line 24277View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
approval_rule_id bigintNOT NULLmerge_requests_approval_rules.id 1:N · CASCADE
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (group_id) index_merge_requests_approval_rules_approver_groups_on_group_id
  • UNIQUE (approval_rule_id, group_id) index_mrs_ars_approver_groups_on_ar_id_and_group_id

Referenced by

  • nothing

merge_requests_approval_rules_approver_users

7 cols · no RLS · line 24294View in 3D
  • Nullable foreign key project_idmerge_requests_approval_rules_approver_users.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idmerge_requests_approval_rules_approver_users.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
approval_rule_id bigintNOT NULLmerge_requests_approval_rules.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (group_id) index_merge_requests_approval_rules_approver_users_on_group_id
  • (user_id) index_merge_requests_approval_rules_approver_users_on_user_id
  • (project_id) index_mrs_approval_rules_approver_users_on_project_id
  • UNIQUE (approval_rule_id, user_id) index_mrs_ars_users_on_ar_id_and_user_id

Referenced by

  • nothing

Table checks: num_nonnulls(group_id, project_id) = 1

merge_requests_approval_rules_groups

5 cols · no RLS · line 24314View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
approval_rule_id bigintNOT NULLmerge_requests_approval_rules.id 1:N · CASCADE
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (group_id) index_merge_requests_approval_rules_groups_on_group_id
  • UNIQUE (approval_rule_id, group_id) index_mrs_ars_groups_on_ar_id_and_group_id

Referenced by

  • nothing

merge_requests_approval_rules_merge_requests

6 cols · no RLS · line 24340View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
approval_rule_id bigintNOT NULLmerge_requests_approval_rules.id 1:N · CASCADE
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (merge_request_id) index_mrs_approval_rules_mrs_on_mr_id
  • (project_id) index_mrs_approval_rules_mrs_on_project_id
  • UNIQUE (approval_rule_id, merge_request_id) index_mrs_ars_mrs_on_ar_id_and_mr_id

Referenced by

  • nothing

merge_requests_approval_rules_projects

5 cols · no RLS · line 24358View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
approval_rule_id bigintNOT NULLmerge_requests_approval_rules.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (project_id) index_mrs_approval_rules_projects_on_project_id
  • UNIQUE (approval_rule_id, project_id) index_mrs_ars_projects_on_ar_id_and_project_id

Referenced by

  • nothing

merge_requests_closing_issues

8 cols · no RLS · line 24375View in 3D
  • Nullable foreign key project_idmerge_requests_closing_issues.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
issue_id bigintNOT NULLissues.id 1:N · CASCADE
created_at timestampNOT NULL
updated_at timestampNOT NULL
from_mr_description booleanNOT NULLTRUE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
link_type smallintNOT NULL0

Indexes

  • (merge_request_id, link_type, issue_id, from_mr_description) idx_mr_closing_issues_on_mr_link_issue_from
  • (project_id) index_merge_requests_closing_issues_on_project_id
  • (issue_id, link_type) index_mr_closing_issues_on_issue_id_and_link_type
  • UNIQUE (merge_request_id, issue_id, link_type) WHERE link_type <> 0 index_mr_closing_issues_on_mr_id_issue_id_link_type

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

merge_requests_compliance_violations

9 cols · no RLS · line 24396View in 3D
  • Nullable foreign key target_project_idmerge_requests_compliance_violations.target_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
violating_user_id bigintNOT NULLusers.id 1:N · CASCADE
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
reason smallintNOT NULL
severity_level smallintNOT NULL0
merged_at timestamptznull
target_project_id bigintnullprojects.id 1:N · CASCADECHECK target_project_id IS NOT NULL
title textnull
target_branch textnull

Indexes

  • (target_project_id, id) i_compliance_violations_for_export
  • (target_project_id, merged_at, id) i_compliance_violations_on_project_id_merged_at_and_id
  • (target_project_id, reason, id) i_compliance_violations_on_project_id_reason_and_id
  • (target_project_id, severity_level, id) i_compliance_violations_on_project_id_severity_and_id
  • (target_project_id, title, id) i_compliance_violations_on_project_id_title_and_id
  • (violating_user_id) index_merge_requests_compliance_violations_on_violating_user_id
  • UNIQUE (merge_request_id, violating_user_id, reason) index_merge_requests_compliance_violations_unique_columns

Referenced by

  • nothing

Table checks: target_project_id IS NOT NULL

merge_trains

11 cols · no RLS · line 24427View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
merge_request_id bigintNOT NULLmerge_requests.id 1:1 · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
target_project_id bigintNOT NULLprojects.id 1:N · CASCADE
target_branch textNOT NULL
status smallintNOT NULL0
merged_at timestamptznull
duration integernull
pipeline_id bigintnull

Indexes

  • (target_project_id, target_branch, status) index_for_status_per_branch_per_project
  • UNIQUE (merge_request_id) index_merge_trains_on_merge_request_id
  • (pipeline_id) index_merge_trains_on_pipeline_id
  • (updated_at, id) WHERE status = 4 index_merge_trains_on_updated_at_when_merging
  • (user_id) index_merge_trains_on_user_id

Referenced by

  • nothing

project 56 tables

Tables whose names start with project_.

Entity-relationship diagram: project_audit_events, project_daily_statistics, project_access_tokens, project_alerting_settings, project_aliases, project_authorizations, project_authorizations_for_migration, project_auto_devops, project_build_artifacts_size_refreshes, project_ci_cd_settings, project_ci_feature_usages, project_compliance_framework_settings, project_compliance_standards_adherence, project_compliance_violations, project_compliance_violations_issues, project_control_compliance_statuses, project_custom_attributes, project_data_transfers, project_deploy_tokens, project_error_tracking_settings, project_export_jobs, project_feature_usages, project_features, project_group_links, project_import_data, project_import_export_relation_export_upload_upload_states, project_import_export_relation_export_upload_uploads, project_incident_management_settings, project_metrics_settings, project_mirror_data, project_pages_metadata, project_push_rules, project_relation_export_uploads, project_relation_exports, project_repositories, project_repository_states, project_repository_storage_moves, project_requirement_compliance_statuses, project_saved_replies, project_secrets_manager_maintenance_tasks, project_secrets_managers, project_security_exclusions, project_security_settings, project_security_statistics, project_settings, project_states, project_statistics, project_to_security_attributes, project_topic_upload_states, project_topic_uploads, project_topics, project_type_ci_runner_machines, project_type_ci_runners, project_upload_states, project_uploads, project_wiki_repositoriesproject_audit_eventsid PKbigintcreated_at PKtimestamptzproject_idbigintauthor_idbiginttarget_idbigintevent_nametextdetailstextip_addressinetauthor_nametextentity_pathtexttarget_detailstexttarget_typetextproject_daily_statisticsid PKbigintproject_id FKbigintfetch_countintegerdate PKdateproject_access_tokenspersonal_access_token_id PKbigintproject_id PKbigintproject_alerting_settingsproject_id PKbigintencrypted_tokenvarcharencrypted_token_ivvarcharproject_aliasesid PKbigintproject_id FKbigintnamevarcharcreated_attimestamptzupdated_attimestamptzproject_authorizationsuser_id PKbigintproject_id PKbigintaccess_level PKintegeris_uniquebooleanproject_authorizations_for_migrationuser_id PKbigintproject_id PKbigintaccess_levelsmallintproject_auto_devopsid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzenabledbooleandeploy_strategyintegerproject_build_artifacts_size_refreshesid PKbigintproject_id FKbigintlast_job_artifact_idbigintstatesmallintrefresh_started_attimestamptzcreated_attimestamptzupdated_attimestamptzlast_job_artifact_id_on_refresh_startbigintproject_ci_cd_settingsid PKbigintproject_id FKbigintgroup_runners_enabledbooleanmerge_pipelines_enabledbooleandefault_git_depthintegerforward_deployment_enabledbooleanmerge_trains_enabledbooleanauto_rollback_enabledbooleankeep_latest_artifactbooleanjob_token_scope_enabledbooleanrunner_token_expiration_intervalintegerseparated_cachesbooleanallow_fork_pipelines_to_run_in_parent_projectbooleaninbound_job_token_scope_enabledbooleanforward_deployment_rollback_allowedbooleanmerge_trains_skip_train_allowedbooleanrestrict_pipeline_cancellation_rolesmallintpipeline_variables_minimum_override_rolesmallintpush_repository_for_job_token_allowedbooleanid_token_sub_claim_componentsvarchar[]delete_pipelines_in_secondsintegerallow_composite_identities_to_run_pipelinesbooleandisplay_pipeline_variablesbooleanresource_group_default_process_modesmallintmax_pipelines_per_merge_trainsmallintcross_project_push_for_job_token_allowedbooleanmerge_train_enforcementsmallintskip_branch_pipelines_for_mrsbooleanproject_ci_feature_usagesid PKbigintproject_id FKbigintfeaturesmallintdefault_branchbooleanproject_compliance_framework_settingsproject_id FKbigintframework_id FKbigintid PKbigintcreated_attimestamptzproject_compliance_standards_adherenceid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintnamespace_id FKbigintstatussmallintcheck_namesmallintstandardsmallintproject_compliance_violationsid PKbigintcreated_attimestamptzupdated_attimestamptznamespace_id FKbigintproject_id FKbigintaudit_event_idbigintcompliance_requirements_control_id FKbigintstatussmallintaudit_event_table_namesmallintproject_compliance_violations_issuesid PKbigintproject_compliance_violation_id FKbigintissue_id FKbigintproject_id FKbigintproject_control_compliance_statusesid PKbigintcreated_attimestamptzupdated_attimestamptzcompliance_requirements_control_id FKbigintproject_id FKbigintnamespace_id FKbigintcompliance_requirement_id FKbigintstatussmallintrequirement_status_id FKbigintproject_custom_attributesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintkeyvarcharvaluevarcharproject_data_transfersid PKbigintproject_idbigintnamespace_idbigintrepository_egressbigintartifacts_egressbigintpackages_egressbigintregistry_egressbigintdatedatecreated_attimestamptzproject_deploy_tokensid PKbigintproject_id FKbigintdeploy_token_id FKbigintcreated_attimestamptzproject_error_tracking_settingsproject_id PKbigintenabledbooleanapi_urlvarcharencrypted_tokenvarcharencrypted_token_ivvarcharproject_namevarcharorganization_namevarcharintegratedbooleansentry_project_idbigintproject_export_jobsid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzstatussmallintjidvarchar(100)user_id FKbigintexported_by_adminbooleanproject_feature_usagesproject_id PKbigintjira_dvcs_cloud_last_sync_attimestampjira_dvcs_server_last_sync_attimestampproject_featuresid PKbigintproject_id FKbigintmerge_requests_access_levelintegerissues_access_levelintegerwiki_access_levelintegersnippets_access_levelintegerbuilds_access_levelintegercreated_attimestampupdated_attimestamprepository_access_levelintegerpages_access_levelintegerforking_access_levelintegermetrics_dashboard_access_levelintegerrequirements_access_levelintegeroperations_access_levelintegeranalytics_access_levelintegersecurity_and_compliance_access_levelintegercontainer_registry_access_levelintegerpackage_registry_access_levelintegermonitor_access_levelintegerinfrastructure_access_levelintegerfeature_flags_access_levelintegerenvironments_access_levelintegerreleases_access_levelintegermodel_experiments_access_levelintegermodel_registry_access_levelintegerproject_group_linksid PKbigintproject_id FKbigintgroup_id FKbigintcreated_attimestampupdated_attimestampgroup_accessintegerexpires_atdatemember_role_id FKbigintproject_import_dataid PKbigintproject_id FKbigintdatatextencrypted_credentialstextencrypted_credentials_ivvarcharencrypted_credentials_saltvarcharproject_import_export_relation_export_upload_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzproject_import_export_relation_export_upload_upload_id FKbigintproject_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextproject_import_export_relation_export_upload_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextproject_incident_management_settingsproject_id PKbigintcreate_issuebooleansend_emailbooleanissue_template_keytextpagerduty_activebooleanencrypted_pagerduty_tokenbyteaencrypted_pagerduty_token_ivbyteaauto_close_incidentbooleansla_timerbooleansla_timer_minutesintegerproject_metrics_settingsproject_id PKbigintexternal_dashboard_urlvarchardashboard_timezonesmallintproject_mirror_dataid PKbigintproject_id FKbigintretry_countintegerlast_update_started_attimestamplast_update_scheduled_attimestampnext_execution_timestamptimestampstatusvarcharjidvarcharlast_errortextlast_update_attimestamptzlast_successful_update_attimestamptzcorrelation_id_valuevarchar(128)checksumsjsonbproject_pages_metadataproject_id PKbigintonboarding_completebooleanproject_push_rulesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintmax_file_sizeintegermember_checkbooleanprevent_secretsbooleancommit_committer_name_checkbooleandeny_delete_tagbooleanreject_unsigned_commitsbooleancommit_committer_checkbooleanreject_non_dco_commitsbooleancommit_message_regextextbranch_name_regextextcommit_message_negative_regextextauthor_email_regextextfile_name_regextextproject_relation_export_uploadsid PKbigintproject_relation_export_id FKbigintcreated_attimestamptzupdated_attimestamptzexport_filetextproject_id FKbigintproject_relation_exportsid PKbigintproject_export_job_id FKbigintcreated_attimestamptzupdated_attimestamptzstatussmallintrelationtextjidtextexport_errortextproject_id FKbigintproject_repositoriesid PKbigintshard_idbigintdisk_pathvarcharproject_id FKbigintobject_formatsmallintproject_repository_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzproject_repository_id FKbigintproject_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextproject_repository_storage_movesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintstatesmallintsource_storage_nametextdestination_storage_nametexterror_messagetextproject_requirement_compliance_statusesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintnamespace_id FKbigintcompliance_requirement_id FKbigintcompliance_framework_id FKbigintpass_countintegerfail_countintegerpending_countintegerproject_saved_repliesid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptznametextcontenttextproject_secrets_manager_maintenance_tasksid PKbigintuser_idbigintproject_secrets_manager_id FKbigintlast_processed_attimestamptzactionsmallintretry_countsmallintorganization_id FKbigintproject_idbigintroot_namespace_idbigintparent_group_idbigintproject_secrets_managersid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintstatussmallintnamespace_pathtextproject_pathtextorganization_idbigintroot_namespace_idbigintproject_security_exclusionsid PKbigintproject_idbigintcreated_attimestamptzupdated_attimestamptzscannersmallinttypesmallintactivebooleandescriptiontextvaluetextproject_security_settingsproject_id PKbigintcreated_attimestamptzupdated_attimestamptzauto_fix_container_scanningbooleanauto_fix_dastbooleanauto_fix_dependency_scanningbooleanauto_fix_sastbooleancontinuous_vulnerability_scans_enabledbooleancontainer_scanning_for_registry_enabledbooleansecret_push_protection_enabledbooleanvalidity_checks_enabledbooleanlicense_configuration_sourcesmallintcvs_for_container_scanning_enabledbooleancvs_for_dependency_scanning_enabledbooleanlicense_scanning_for_cyclonedx_enabledbooleanfast_dependency_paths_enabledbooleanproject_security_statisticsproject_id PKbigintvulnerability_countintegerproject_settingsproject_id PKbigintcreated_attimestamptzupdated_attimestamptzpush_rule_id FKbigintshow_default_award_emojisbooleanallow_merge_on_skipped_pipelinebooleansquash_optionsmallinthas_confluencebooleanhas_vulnerabilitiesbooleanprevent_merge_without_jira_issuebooleancve_id_request_enabledbooleanmr_default_target_selfbooleanprevious_default_branchtextwarn_about_potentially_unwanted_charactersbooleanmerge_commit_templatetexthas_shimobooleansquash_commit_templatetextlegacy_open_source_license_availablebooleantarget_platformsvarchar[]enforce_auth_checks_on_uploadsbooleanselective_code_owner_removalsbooleanissue_branch_templatetextshow_diff_preview_in_emailbooleansuggested_reviewers_enabledbooleanonly_allow_merge_if_all_status_checks_passedbooleanmirror_branch_regextextallow_pipeline_trigger_approve_deploymentbooleanemails_enabledbooleanpages_unique_domain_enabledbooleanpages_unique_domaintextrunner_registration_enabledbooleanproduct_analytics_instrumentation_keytextproduct_analytics_data_collector_hosttextcube_api_base_urltextencrypted_cube_api_keybyteaencrypted_cube_api_key_ivbyteaencrypted_product_analytics_configurator_connection_stringbyteaencrypted_product_analytics_configurator_connection_string_ivbyteapages_multiple_versions_enabledbooleanallow_merge_without_pipelinebooleanduo_features_enabledbooleanrequire_reauthentication_to_approvebooleanobservability_alerts_enabledbooleanspp_repository_pipeline_accessbooleanmax_number_of_vulnerabilitiesintegerpages_primary_domaintextextended_prat_expiry_webhooks_executebooleanmerge_request_title_regextextprotect_merge_request_pipelinesbooleanauto_duo_code_review_enabledbooleanmodel_prompt_cache_enabledbooleanweb_based_commit_signing_enabledbooleanduo_context_exclusion_settingsjsonbmerge_request_title_regex_descriptiontextduo_remote_flows_enabledbooleanduo_foundational_flows_enabledbooleanduo_sast_fp_detection_enabledbooleanduo_sast_vr_workflow_enabledbooleanautomatic_rebase_enabledbooleanduo_secret_detection_fp_enabledbooleanreviewer_assignment_strategysmallintpipeline_execution_policy_bot_access_enabledbooleanpipeline_execution_policy_bot_access_file_patternstext[]pipeline_execution_policy_bot_access_group_id FKbigintsecurity_policy_pipeline_must_succeedbooleanmr_default_title_templatetexttool_approval_for_session_enabledbooleandap_session_tracking_enabledbooleanduo_dependency_bump_breaking_changes_enabledbooleanai_audit_events_storage_enabledbooleanduo_dependency_bump_breaking_changes_enabled_by_id FKbigintfeature_flags_minimum_rolesmallintduo_vulnerability_context_analysis_enabledbooleanproject_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzproject_idbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextproject_statisticsid PKbigintproject_id FKbigintnamespace_idbigintcommit_countbigintstorage_sizebigintrepository_sizebigintlfs_objects_sizebigintbuild_artifacts_sizebigintshared_runners_secondsbigintshared_runners_seconds_last_resettimestamppackages_sizebigintwiki_sizebigintsnippets_sizebigintpipeline_artifacts_sizebigintuploads_sizebigintcontainer_registry_sizebigintcreated_attimestamptzupdated_attimestamptzroot_namespace_id FKbigintproject_to_security_attributesid PKbigintproject_idbigintsecurity_attribute_id FKbigintcreated_attimestamptzupdated_attimestamptztraversal_idsbigint[]project_topic_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzproject_topic_upload_id FKbigintorganization_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextproject_topic_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextproject_topicsid PKbigintproject_id FKbiginttopic_id FKbigintcreated_attimestamptzupdated_attimestamptzproject_type_ci_runner_machinesid PKbigintrunner_id FKbigintcreated_attimestamptzupdated_attimestamptzcontacted_attimestamptzcreation_statesmallintexecutor_typesmallintrunner_type PKsmallintconfigjsonbsystem_xidtextplatformtextarchitecturetextrevisiontextip_addresstextversiontextruntime_featuresjsonborganization_idbigintlabelsjsonbproject_type_ci_runnersid PKbigintcreator_idbigintcreated_attimestamptzupdated_attimestamptzcontacted_attimestamptztoken_expires_attimestamptzpublic_projects_minutes_cost_factordouble precisionprivate_projects_minutes_cost_factordouble precisionaccess_levelintegermaximum_timeoutintegerrunner_type PKsmallintregistration_typesmallintcreation_statesmallintactivebooleanrun_untaggedbooleanlockedbooleannametexttoken_encryptedtextdescriptiontextmaintainer_notetextallowed_planstext[]allowed_plan_idsbigint[]organization_idbigintallowed_plan_name_uidssmallint[]token_rotation_deadlinetimestamptzuuiduuidproject_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzproject_upload_id FKbigintproject_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextproject_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextproject_wiki_repositoriesid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzcompliance_management_frameworkscompliance_requirementscompliance_requirements_controlsdeploy_tokensissuesmember_rolesnamespacesorganizationspersonal_access_tokensprojectspush_rulessecurity_attributestopicsuserspersonal_access_token_idproject_idproject_idproject_idproject_idproject_idproject_idproject_idproject_idproject_idframework_idproject_idnamespace_idproject_idproject_idnamespace_idcompliance_requirements_control_idproject_idproject_iddeploy_token_idproject_idproject_iduser_idproject_idproject_idproject_idgroup_idmember_role_idproject_idproject_idproject_import_export_relation_export_upload_upload_idproject_idproject_idproject_idproject_idproject_idproject_idproject_idproject_idnamespace_idcompliance_requirement_idcompliance_framework_idproject_idproject_idproject_idproject_idproject_idpipeline_execution_policy_bot_access_group_idduo_dependency_bump_breaking_changes_enabled_by_idpush_rule_idproject_idroot_namespace_idproject_idsecurity_attribute_idorganization_idproject_topic_upload_idtopic_idproject_idrunner_id, runner_typeproject_idproject_upload_idproject_idproject_compliance_violation_idproject_idissue_idnamespace_idproject_idcompliance_requirement_idrequirement_status_idcompliance_requirements_control_idproject_idproject_export_job_idproject_idproject_repository_idorganization_idproject_secrets_manager_idproject_idproject_relation_export_id

Relationships

project_audit_events

12 cols · no RLS · line 7064View in 3D
  • Polymorphic reference without referential integrity target_type, target_idtarget_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • Isolated tableproject_audit_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('audit_events_id_seq' AS regclass))
created_at PKtimestamptzNOT NULL
project_id bigintNOT NULL
author_id bigintNOT NULL
target_id bigintnull
event_name textnullCHECK char_length(event_name) <= 255
details textnull
ip_address inetnull
author_name textnullCHECK char_length(author_name) <= 255
entity_path textnullCHECK char_length(entity_path) <= 5500
target_details textnullCHECK char_length(target_details) <= 5500
target_type textnullCHECK char_length(target_type) <= 255

Indexes

  • (author_id, created_at, id) idx_project_audit_events_on_author_id_created_at_id
  • (project_id, created_at, id) idx_project_audit_events_on_project_created_at_id
  • (project_id, author_id, created_at, id) idx_project_audit_events_on_project_id_author_created_at_id

Referenced by

  • nothing

Table checks: char_length(author_name) <= 255; char_length(entity_path) <= 5500; char_length(event_name) <= 255; char_length(target_details) <= 5500; char_length(target_type) <= 255

project_daily_statistics

4 cols · no RLS · line 7085View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
fetch_count integerNOT NULL
date PKdateNOT NULL

Indexes

  • (date, id) idx_p_project_daily_statistics_on_date_and_id
  • UNIQUE (project_id, date) idx_p_project_daily_statistics_on_project_id_and_date

Referenced by

  • nothing

project_access_tokens

2 cols · no RLS · line 28264View in 3D
ColumnTypeNullDefaultReferencesNotes
personal_access_token_id PKbigintNOT NULLpersonal_access_tokens.id 1:N · CASCADE
project_id PKbigintNOT NULLprojects.id 1:N · CASCADE

Indexes

  • (project_id) index_project_access_tokens_on_project_id

Referenced by

  • nothing

project_alerting_settings

3 cols · no RLS · line 28269View in 3D
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
encrypted_token varcharNOT NULL
encrypted_token_iv varcharNOT NULL

Indexes

  • none

Referenced by

  • nothing

project_aliases

5 cols · no RLS · line 28275View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
name varcharNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (name) index_project_aliases_on_name
  • (project_id) index_project_aliases_on_project_id

Referenced by

  • nothing

project_authorizations

4 cols · no RLS · line 28292View in 3D
ColumnTypeNullDefaultReferencesNotes
user_id PKbigintNOT NULL
project_id PKbigintNOT NULLprojects.id 1:N · CASCADE
access_level PKintegerNOT NULL
is_unique booleannull

Indexes

  • UNIQUE (project_id, user_id, access_level) index_project_authorizations_on_project_user_access_level
  • UNIQUE (project_id, user_id) WHERE is_unique index_unique_project_authorizations_on_unique_project_user

Referenced by

  • nothing

project_authorizations_for_migration

3 cols · no RLS · line 28299View in 3D
ColumnTypeNullDefaultReferencesNotes
user_id PKbigintNOT NULL
project_id PKbigintNOT NULLprojects.id 1:N · CASCADE
access_level smallintNOT NULL

Indexes

  • (project_id, user_id) index_project_authorizations_for_migration_on_project_user

Referenced by

  • nothing

project_auto_devops

6 cols · no RLS · line 28305View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
enabled booleannull
deploy_strategy integerNOT NULL0

Indexes

  • UNIQUE (project_id) index_project_auto_devops_on_project_id

Referenced by

  • nothing

project_build_artifacts_size_refreshes

8 cols · no RLS · line 28323View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:1 · CASCADE
last_job_artifact_id bigintnull
state smallintNOT NULL1
refresh_started_at timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
last_job_artifact_id_on_refresh_start bigintnull0

Indexes

  • (state, updated_at) idx_build_artifacts_size_refreshes_state_updated_at
  • UNIQUE (project_id) index_project_build_artifacts_size_refreshes_on_project_id

Referenced by

  • nothing

project_ci_cd_settings

28 cols · no RLS · line 28343View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:1 · CASCADE
group_runners_enabled booleanNOT NULLTRUE
merge_pipelines_enabled booleannull
default_git_depth integernull
forward_deployment_enabled booleannull
merge_trains_enabled booleannullFALSE
auto_rollback_enabled booleanNOT NULLFALSE
keep_latest_artifact booleanNOT NULLTRUE
job_token_scope_enabled booleanNOT NULLFALSE
runner_token_expiration_interval integernull
separated_caches booleanNOT NULLTRUE
allow_fork_pipelines_to_run_in_parent_project booleanNOT NULLTRUE
inbound_job_token_scope_enabled booleanNOT NULLTRUE
forward_deployment_rollback_allowed booleanNOT NULLTRUE
merge_trains_skip_train_allowed booleanNOT NULLFALSE
restrict_pipeline_cancellation_role smallintNOT NULL0
pipeline_variables_minimum_override_role smallintNOT NULL3
push_repository_for_job_token_allowed booleanNOT NULLFALSE
id_token_sub_claim_components varchar[]NOT NULLCAST('{project_path,ref_type,ref}' AS varchar[])
delete_pipelines_in_seconds integernull
allow_composite_identities_to_run_pipelines booleanNOT NULLFALSE
display_pipeline_variables booleanNOT NULLFALSE
resource_group_default_process_mode smallintNOT NULL0
max_pipelines_per_merge_train smallintnull
cross_project_push_for_job_token_allowed booleanNOT NULLFALSE
merge_train_enforcement smallintNOT NULL0
skip_branch_pipelines_for_mrs booleanNOT NULLFALSE

Indexes

  • UNIQUE (project_id) index_project_ci_cd_settings_on_project_id
  • (project_id) WHERE delete_pipelines_in_seconds IS NOT NULL index_project_ci_cd_settings_on_project_id_partial

Referenced by

  • nothing

project_ci_feature_usages

4 cols · no RLS · line 28383View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
feature smallintNOT NULL
default_branch booleanNOT NULLFALSE

Indexes

  • UNIQUE (project_id, feature, default_branch) index_project_ci_feature_usages_unique_columns

Referenced by

  • nothing

project_compliance_framework_settings

4 cols · no RLS · line 28399View in 3D
  • Nullable foreign key framework_idproject_compliance_framework_settings.framework_id may be NULL, so the relationship to compliance_management_frameworks is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
project_id bigintNOT NULLprojects.id 1:N · CASCADE
framework_id bigintnullcompliance_management_frameworks.id 1:N · CASCADECHECK framework_id IS NOT NULL
id PKbigintNOT NULL
created_at timestamptznull

Indexes

  • (project_id, created_at) idx_on_project_id_created_at_for_compliance_framework_settings
  • (framework_id) index_project_compliance_framework_settings_on_framework_id
  • UNIQUE (project_id, framework_id) uniq_idx_project_compliance_framework_on_project_framework

Referenced by

  • nothing

Table checks: framework_id IS NOT NULL

project_compliance_standards_adherence

8 cols · no RLS · line 28416View in 3D
  • Nullable foreign key namespace_idproject_compliance_standards_adherence.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · SET NULL
status smallintNOT NULL
check_name smallintNOT NULL
standard smallintNOT NULL

Indexes

  • (namespace_id, project_id, id) i_compliance_standards_adherence_on_namespace_id_and_proj_id
  • (project_id) index_project_compliance_standards_adherence_on_project_id
  • UNIQUE (project_id, check_name, standard) u_project_compliance_standards_adherence_for_reporting

Referenced by

  • nothing

project_compliance_violations

9 cols · no RLS · line 28436View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
audit_event_id bigintNOT NULL
compliance_requirements_control_id bigintNOT NULLcompliance_requirements_controls.id 1:N · CASCADE
status smallintNOT NULL
audit_event_table_name smallintNOT NULL

Indexes

  • (namespace_id, created_at, id) i_project_compliance_violations_on_namespace_id_created_at_id
  • (compliance_requirements_control_id) idx_project_compliance_violations_on_control_id
  • (project_id) idx_project_compliance_violations_on_project_id

Referenced by

project_compliance_violations_issues

4 cols · no RLS · line 28457View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_compliance_violation_id bigintNOT NULLproject_compliance_violations.id 1:N · CASCADE
issue_id bigintNOT NULLissues.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE

Indexes

  • UNIQUE (project_compliance_violation_id, issue_id) idx_proj_comp_viol_issues_on_viol_id_issue_id
  • (issue_id) index_project_compliance_violations_issues_on_issue_id
  • (project_id) index_project_compliance_violations_issues_on_project_id

Referenced by

  • nothing

project_control_compliance_statuses

9 cols · no RLS · line 28473View in 3D
  • Nullable foreign key requirement_status_idproject_control_compliance_statuses.requirement_status_id may be NULL, so the relationship to project_requirement_compliance_statuses is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
compliance_requirements_control_id bigintNOT NULLcompliance_requirements_controls.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
compliance_requirement_id bigintNOT NULLcompliance_requirements.id 1:N · CASCADE
status smallintNOT NULL
requirement_status_id bigintnullproject_requirement_compliance_statuses.id 1:N · SET NULL

Indexes

  • (requirement_status_id) idx_project_control_compliance_status_on_requirement_status_id
  • (namespace_id) idx_project_control_statuses_on_namespace_id
  • (project_id) idx_project_control_statuses_on_project_id
  • (compliance_requirement_id) idx_project_control_statuses_on_requirement_id
  • UNIQUE (compliance_requirements_control_id, project_id) uniq_compliance_statuses_control_project_id

Referenced by

  • nothing

project_custom_attributes

6 cols · no RLS · line 28494View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
key varcharNOT NULL
value varcharNOT NULL

Indexes

  • (key, value) index_project_custom_attributes_on_key_and_value
  • UNIQUE (project_id, key) index_project_custom_attributes_on_project_id_and_key

Referenced by

  • nothing

project_data_transfers

9 cols · no RLS · line 28521View in 3D
  • Isolated tableproject_data_transfers references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
namespace_id bigintNOT NULL
repository_egress bigintNOT NULL0
artifacts_egress bigintNOT NULL0
packages_egress bigintNOT NULL0
registry_egress bigintNOT NULL0
date dateNOT NULLCHECK date = date_trunc(CAST('month' AS text), CAST(date AS timestamptz))
created_at timestamptzNOT NULL

Indexes

  • (namespace_id) index_project_data_transfers_on_namespace_id
  • UNIQUE (project_id, namespace_id, date) index_project_data_transfers_on_project_and_namespace_and_date

Referenced by

  • nothing

Table checks: date = date_trunc(CAST('month' AS text), CAST(date AS timestamptz))

project_deploy_tokens

4 cols · no RLS · line 28543View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
deploy_token_id bigintNOT NULLdeploy_tokens.id 1:N · CASCADE
created_at timestamptzNOT NULL

Indexes

  • (deploy_token_id) index_project_deploy_tokens_on_deploy_token_id
  • UNIQUE (project_id, deploy_token_id) index_project_deploy_tokens_on_project_id_and_deploy_token_id

Referenced by

  • nothing

project_error_tracking_settings

9 cols · no RLS · line 28568View in 3D
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
enabled booleanNOT NULLFALSE
api_url varcharnull
encrypted_token varcharnull
encrypted_token_iv varcharnull
project_name varcharnull
organization_name varcharnull
integrated booleanNOT NULLTRUE
sentry_project_id bigintnull

Indexes

  • none

Referenced by

  • nothing

project_export_jobs

8 cols · no RLS · line 28580View in 3D
  • Nullable foreign key user_idproject_export_jobs.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
jid varchar(100)NOT NULL
user_id bigintnullusers.id 1:N · SET NULL
exported_by_admin booleannullFALSE

Indexes

  • UNIQUE (jid, project_id) index_project_export_jobs_on_jid_and_project_id
  • (project_id, jid) index_project_export_jobs_on_project_id_and_jid
  • (project_id, status) index_project_export_jobs_on_project_id_and_status
  • (status) index_project_export_jobs_on_status
  • (updated_at, id) index_project_export_jobs_on_updated_at_and_id
  • (user_id) index_project_export_jobs_on_user_id

Referenced by

project_feature_usages

3 cols · no RLS · line 28600View in 3D
  • TIMESTAMP without time zone jira_dvcs_cloud_last_sync_atjira_dvcs_cloud_last_sync_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone jira_dvcs_server_last_sync_atjira_dvcs_server_last_sync_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
jira_dvcs_cloud_last_sync_at timestampnull
jira_dvcs_server_last_sync_at timestampnull

Indexes

  • (jira_dvcs_cloud_last_sync_at, project_id) WHERE jira_dvcs_cloud_last_sync_at IS NOT NULL idx_proj_feat_usg_on_jira_dvcs_cloud_last_sync_at_and_proj_id
  • (jira_dvcs_server_last_sync_at, project_id) WHERE jira_dvcs_server_last_sync_at IS NOT NULL idx_proj_feat_usg_on_jira_dvcs_server_last_sync_at_and_proj_id
  • (project_id) index_project_feature_usages_on_project_id

Referenced by

  • nothing

project_features

26 cols · no RLS · line 28606View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:1 · CASCADE
merge_requests_access_level integernull
issues_access_level integernull
wiki_access_level integernull
snippets_access_level integerNOT NULL20
builds_access_level integernull
created_at timestampnull
updated_at timestampnull
repository_access_level integerNOT NULL20
pages_access_level integerNOT NULL
forking_access_level integernull
metrics_dashboard_access_level integernull
requirements_access_level integerNOT NULL20
operations_access_level integerNOT NULL20
analytics_access_level integerNOT NULL20
security_and_compliance_access_level integerNOT NULL10
container_registry_access_level integerNOT NULL0
package_registry_access_level integerNOT NULL0
monitor_access_level integerNOT NULL20
infrastructure_access_level integerNOT NULL20
feature_flags_access_level integerNOT NULL20
environments_access_level integerNOT NULL20
releases_access_level integerNOT NULL20
model_experiments_access_level integerNOT NULL
model_registry_access_level integerNOT NULL

Indexes

  • UNIQUE (project_id) index_project_features_on_project_id
  • (project_id) WHERE builds_access_level = 20 index_project_features_on_project_id_bal_20
  • UNIQUE (project_id) index_project_features_on_project_id_include_container_registry
  • (project_id) WHERE package_registry_access_level = 30 index_project_features_on_project_id_on_public_package_registry
  • (project_id) WHERE repository_access_level = 20 index_project_features_on_project_id_ral_20

Referenced by

  • nothing

project_import_data

6 cols · no RLS · line 28664View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
data textnull
encrypted_credentials textnull
encrypted_credentials_iv varcharnull
encrypted_credentials_salt varcharnull

Indexes

  • (project_id) index_project_import_data_on_project_id

Referenced by

  • nothing

project_import_export_relation_export_upload_upload_states

10 cols · no RLS · line 28682View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
project_import_export_relation_export_upload_upload_id bigintNOT NULLproject_import_export_relation_export_upload_uploads.id 1:1 · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_piere_upload_upload_states_failed_verification
  • (project_import_export_relation_export_upload_upload_id) WHERE verification_state = 0 OR verification_state = 3 idx_piere_upload_upload_states_needs_verification_id
  • (project_id) idx_piere_upload_upload_states_on_project_id
  • UNIQUE (project_import_export_relation_export_upload_upload_id) idx_piere_upload_upload_states_on_upload_upload_id
  • (project_import_export_relation_export_upload_upload_id, verification_started_at) WHERE verification_state = 1 idx_piere_upload_upload_states_on_verification_started
  • (verification_state) idx_piere_upload_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_piere_upload_upload_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

project_import_export_relation_export_upload_uploads

16 cols · no RLS · line 28705View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnull
namespace_id bigintnull
project_id bigintnullCHECK project_id IS NOT NULL
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • UNIQUE (id) idx_project_import_export_relation_export_upload_uploads_on_id
  • (model_id, model_type, uploader, created_at) project_import_export_relatio_model_id_model_type_uploader__idx
  • (uploaded_by_user_id) project_import_export_relation_export_u_uploaded_by_user_id_idx
  • (organization_id) project_import_export_relation_export_uploa_organization_id_idx
  • (uploader, path) project_import_export_relation_export_upload__uploader_path_idx
  • (namespace_id) project_import_export_relation_export_upload_u_namespace_id_idx
  • (project_id) project_import_export_relation_export_upload_upl_project_id_idx
  • (checksum) project_import_export_relation_export_upload_uploa_checksum_idx
  • (store) project_import_export_relation_export_upload_uploads_store_idx

Referenced by

Table checks: char_length(path) <= 511; project_id IS NOT NULL; char_length(checksum) <= 64

project_incident_management_settings

10 cols · no RLS · line 28727View in 3D
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
create_issue booleanNOT NULLFALSE
send_email booleanNOT NULLFALSE
issue_template_key textnull
pagerduty_active booleanNOT NULLFALSE
encrypted_pagerduty_token byteanullCHECK octet_length(encrypted_pagerduty_token) <= 255
encrypted_pagerduty_token_iv byteanullCHECK octet_length(encrypted_pagerduty_token_iv) <= 12
auto_close_incident booleanNOT NULLTRUE
sla_timer booleannullFALSE
sla_timer_minutes integernull

Indexes

  • (project_id) WHERE sla_timer = TRUE index_project_incident_management_settings_on_p_id_sla_timer

Referenced by

  • nothing

Table checks: octet_length(encrypted_pagerduty_token_iv) <= 12; octet_length(encrypted_pagerduty_token) <= 255

project_metrics_settings

3 cols · no RLS · line 28742View in 3D
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
external_dashboard_url varcharnull
dashboard_timezone smallintNOT NULL0

Indexes

  • none

Referenced by

  • nothing

project_mirror_data

13 cols · no RLS · line 28748View in 3D
  • Enum-like column with no CHECK statusstatus is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • TIMESTAMP without time zone last_update_started_atlast_update_started_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone last_update_scheduled_atlast_update_scheduled_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone next_execution_timestampnext_execution_timestamp stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:1 · CASCADE
retry_count integerNOT NULL0
last_update_started_at timestampnull
last_update_scheduled_at timestampnull
next_execution_timestamp timestampnull
status varcharnull
jid varcharnull
last_error textnull
last_update_at timestamptznull
last_successful_update_at timestamptznull
correlation_id_value varchar(128)null
checksums jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (next_execution_timestamp, retry_count) WHERE CAST(status AS text) <> ALL(CAST('{scheduled,started}' AS text[])) index_mirror_data_non_scheduled_or_started
  • (last_successful_update_at) index_project_mirror_data_on_last_successful_update_at
  • (last_update_at, retry_count) index_project_mirror_data_on_last_update_at_and_retry_count
  • UNIQUE (project_id) index_project_mirror_data_on_project_id
  • (status) index_project_mirror_data_on_status

Referenced by

  • nothing

project_pages_metadata

2 cols · no RLS · line 28773View in 3D
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
onboarding_complete booleanNOT NULLFALSE

Indexes

  • none

Referenced by

  • nothing

project_push_rules

17 cols · no RLS · line 28778View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:1 · CASCADE
max_file_size integerNOT NULL0
member_check booleanNOT NULLFALSE
prevent_secrets booleanNOT NULLFALSE
commit_committer_name_check booleanNOT NULLFALSE
deny_delete_tag booleannull
reject_unsigned_commits booleannull
commit_committer_check booleannull
reject_non_dco_commits booleannull
commit_message_regex textnullCHECK char_length(commit_message_regex) <= 511
branch_name_regex textnullCHECK char_length(branch_name_regex) <= 511
commit_message_negative_regex textnullCHECK char_length(commit_message_negative_regex) <= 2047
author_email_regex textnullCHECK char_length(author_email_regex) <= 511
file_name_regex textnullCHECK char_length(file_name_regex) <= 511

Indexes

  • UNIQUE (project_id) index_project_push_rules_on_project_id

Referenced by

  • nothing

Table checks: char_length(author_email_regex) <= 511; char_length(commit_message_regex) <= 511; char_length(commit_message_negative_regex) <= 2047; char_length(file_name_regex) <= 511; char_length(branch_name_regex) <= 511

project_relation_export_uploads

6 cols · no RLS · line 28812View in 3D
  • Nullable foreign key project_idproject_relation_export_uploads.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_relation_export_id bigintNOT NULLproject_relation_exports.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
export_file textNOT NULLCHECK char_length(export_file) <= 255
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_relation_export_id) index_project_relation_export_upload_id
  • (project_id) index_project_relation_export_uploads_on_project_id

Referenced by

  • nothing

Table checks: char_length(export_file) <= 255; project_id IS NOT NULL

project_relation_exports

9 cols · no RLS · line 28832View in 3D
  • Nullable foreign key project_idproject_relation_exports.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_export_job_id bigintNOT NULLproject_export_jobs.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
relation textNOT NULLCHECK char_length(relation) <= 255
jid textnullCHECK char_length(jid) <= 255
export_error textnullCHECK char_length(export_error) <= 300
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (project_export_job_id, relation) index_project_export_job_relation
  • (project_id) index_project_relation_exports_on_project_id

Referenced by

Table checks: char_length(jid) <= 255; char_length(relation) <= 255; char_length(export_error) <= 300; project_id IS NOT NULL

project_repositories

5 cols · no RLS · line 28857View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
shard_id bigintnull
disk_path varcharNOT NULL
project_id bigintNOT NULLprojects.id 1:1 · CASCADE
object_format smallintNOT NULL0

Indexes

  • UNIQUE (disk_path) index_project_repositories_on_disk_path
  • UNIQUE (project_id) index_project_repositories_on_project_id
  • (shard_id, project_id) index_project_repositories_on_shard_id_and_project_id

Referenced by

project_repository_states

10 cols · no RLS · line 28874View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
project_repository_id bigintNOT NULLproject_repositories.id 1:1 · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_project_repository_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_project_repository_states_needs_verification
  • (project_id) index_project_repository_states_on_project_id
  • (verification_state) index_project_repository_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_project_repository_states_pending_verification
  • UNIQUE (project_repository_id) unique_index_project_repository_states_on_project_repository_id

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

project_repository_storage_moves

8 cols · no RLS · line 28897View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
state smallintNOT NULL1
source_storage_name textNOT NULLCHECK char_length(source_storage_name) <= 255
destination_storage_name textNOT NULLCHECK char_length(destination_storage_name) <= 255
error_message textnullCHECK char_length(error_message) <= 256

Indexes

  • (project_id) index_project_repository_storage_moves_on_project_id

Referenced by

  • nothing

Table checks: char_length(error_message) <= 256; char_length(destination_storage_name) <= 255; char_length(source_storage_name) <= 255

project_requirement_compliance_statuses

10 cols · no RLS · line 28920View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · RESTRICT
namespace_id bigintNOT NULLnamespaces.id 1:N · RESTRICT
compliance_requirement_id bigintNOT NULLcompliance_requirements.id 1:N · CASCADE
compliance_framework_id bigintNOT NULLcompliance_management_frameworks.id 1:N · CASCADE
pass_count integerNOT NULL0
fail_count integerNOT NULL0
pending_count integerNOT NULL0

Indexes

  • (namespace_id, compliance_framework_id, id) i_project_requirement_statuses_on_namespace_id_framework_id
  • (namespace_id, project_id, id) i_project_requirement_statuses_on_namespace_id_project_id
  • (namespace_id, compliance_requirement_id, id) i_project_requirement_statuses_on_namespace_id_requirement_id
  • (namespace_id, updated_at, id) i_project_requirement_statuses_on_namespace_id_updated_at_id
  • (compliance_framework_id) idx_project_requirement_statuses_on_framework_id
  • (project_id) index_project_requirement_compliance_statuses_on_project_id
  • UNIQUE (compliance_requirement_id, project_id) uniq_compliance_statuses_requirement_project_id

Referenced by

project_saved_replies

6 cols · no RLS · line 28950View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
content textNOT NULLCHECK char_length(content) <= 10000

Indexes

  • (project_id) index_project_saved_replies_on_project_id

Referenced by

  • nothing

Table checks: char_length(content) <= 10000; char_length(name) <= 255

project_secrets_manager_maintenance_tasks

10 cols · no RLS · line 28970View in 3D
  • Nullable foreign key organization_idproject_secrets_manager_maintenance_tasks.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_secrets_manager_idproject_secrets_manager_maintenance_tasks.project_secrets_manager_id may be NULL, so the relationship to project_secrets_managers is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK organization_id, project_secrets_manager_idproject_secrets_manager_maintenance_tasks has several nullable FKs (organization_id, project_secrets_manager_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintnull
project_secrets_manager_id bigintnullproject_secrets_managers.id 1:N · CASCADE
last_processed_at timestamptznull
action smallintNOT NULL
retry_count smallintNOT NULL0
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL
project_id bigintnullCHECK project_id IS NOT NULL
root_namespace_id bigintnullCHECK root_namespace_id IS NOT NULL
parent_group_id bigintnull

Indexes

  • (organization_id) idx_psm_maintenance_tasks_on_organization_id
  • (last_processed_at, retry_count) idx_psm_maintenance_tasks_on_processed_at_retry_count
  • (root_namespace_id) idx_psm_maintenance_tasks_on_root_namespace_id
  • UNIQUE (project_id) uniq_psm_maintenance_tasks_on_project_id
  • UNIQUE (project_secrets_manager_id, action) uniq_psm_maintenance_tasks_on_psm_id_and_action

Referenced by

  • nothing

Table checks: organization_id IS NOT NULL; project_id IS NOT NULL; root_namespace_id IS NOT NULL

project_secrets_managers

9 cols · no RLS · line 28995View in 3D
  • Nullable foreign key project_idproject_secrets_managers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintnullprojects.id 1:1 · CASCADECHECK project_id IS NOT NULL
status smallintNOT NULL0
namespace_path textnullCHECK char_length(namespace_path) <= 64
project_path textnullCHECK char_length(project_path) <= 64
organization_id bigintnullCHECK organization_id IS NOT NULL
root_namespace_id bigintnullCHECK root_namespace_id IS NOT NULL

Indexes

  • UNIQUE (project_id) index_project_secrets_managers_on_project_id

Referenced by

Table checks: char_length(project_path) <= 64; project_id IS NOT NULL; organization_id IS NOT NULL; char_length(namespace_path) <= 64; root_namespace_id IS NOT NULL

project_security_exclusions

9 cols · no RLS · line 29021View in 3D
  • Isolated tableproject_security_exclusions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
scanner smallintNOT NULL
type smallintNOT NULL
active booleanNOT NULLTRUE
description textnullCHECK char_length(description) <= 255
value textNOT NULLCHECK char_length(value) <= 255

Indexes

  • (project_id) index_project_security_exclusions_on_project_id

Referenced by

  • nothing

Table checks: char_length(description) <= 255; char_length(value) <= 255

project_security_settings

16 cols · no RLS · line 29044View in 3D
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
auto_fix_container_scanning booleanNOT NULLTRUE
auto_fix_dast booleanNOT NULLTRUE
auto_fix_dependency_scanning booleanNOT NULLTRUE
auto_fix_sast booleanNOT NULLTRUE
continuous_vulnerability_scans_enabled booleanNOT NULLFALSE
container_scanning_for_registry_enabled booleanNOT NULLFALSE
secret_push_protection_enabled booleannullFALSECHECK secret_push_protection_enabled IS NOT NULL
validity_checks_enabled booleanNOT NULLFALSE
license_configuration_source smallintNOT NULL0
cvs_for_container_scanning_enabled booleanNOT NULLTRUE
cvs_for_dependency_scanning_enabled booleanNOT NULLTRUE
license_scanning_for_cyclonedx_enabled booleanNOT NULLTRUE
fast_dependency_paths_enabled booleanNOT NULLFALSE

Indexes

  • none

Referenced by

  • nothing

Table checks: secret_push_protection_enabled IS NOT NULL

project_security_statistics

2 cols · no RLS · line 29073View in 3D
  • Isolated tableproject_security_statistics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
vulnerability_count integerNOT NULL0

Indexes

  • none

Referenced by

  • nothing

project_settings

73 cols · no RLS · line 29078View in 3D
  • Nullable foreign key pipeline_execution_policy_bot_access_group_idproject_settings.pipeline_execution_policy_bot_access_group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key duo_dependency_bump_breaking_changes_enabled_by_idproject_settings.duo_dependency_bump_breaking_changes_enabled_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key push_rule_idproject_settings.push_rule_id may be NULL, so the relationship to push_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK pipeline_execution_policy_bot_access_group_id, duo_dependency_bump_breaking_changes_enabled_by_id, push_rule_idproject_settings has several nullable FKs (pipeline_execution_policy_bot_access_group_id, duo_dependency_bump_breaking_changes_enabled_by_id, push_rule_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • Wide table (73 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
push_rule_id bigintnullpush_rules.id 1:1 · SET NULL
show_default_award_emojis booleannullTRUECHECK show_default_award_emojis IS NOT NULL
allow_merge_on_skipped_pipeline booleannull
squash_option smallintnull3
has_confluence booleanNOT NULLFALSE
has_vulnerabilities booleanNOT NULLFALSE
prevent_merge_without_jira_issue booleanNOT NULLFALSE
cve_id_request_enabled booleanNOT NULLTRUE
mr_default_target_self booleanNOT NULLFALSE
previous_default_branch textnullCHECK char_length(previous_default_branch) <= 4096
warn_about_potentially_unwanted_characters booleanNOT NULLTRUE
merge_commit_template textnullCHECK char_length(merge_commit_template) <= 500
has_shimo booleanNOT NULLFALSE
squash_commit_template textnullCHECK char_length(squash_commit_template) <= 500
legacy_open_source_license_available booleanNOT NULLTRUE
target_platforms varchar[]NOT NULLCAST('{}' AS varchar[])
enforce_auth_checks_on_uploads booleanNOT NULLTRUE
selective_code_owner_removals booleanNOT NULLFALSE
issue_branch_template textnullCHECK char_length(issue_branch_template) <= 255
show_diff_preview_in_email booleanNOT NULLTRUE
suggested_reviewers_enabled booleanNOT NULLFALSE
only_allow_merge_if_all_status_checks_passed booleanNOT NULLFALSE
mirror_branch_regex textnullCHECK char_length(mirror_branch_regex) <= 255
allow_pipeline_trigger_approve_deployment booleanNOT NULLFALSE
emails_enabled booleanNOT NULLTRUE
pages_unique_domain_enabled booleanNOT NULLFALSE
pages_unique_domain textnullCHECK char_length(pages_unique_domain) <= 63
runner_registration_enabled booleannullTRUE
product_analytics_instrumentation_key textnullCHECK char_length(product_analytics_instrumentation_key) <= 255
product_analytics_data_collector_host textnullCHECK char_length(product_analytics_data_collector_host) <= 255
cube_api_base_url textnullCHECK char_length(cube_api_base_url) <= 512
encrypted_cube_api_key byteanull
encrypted_cube_api_key_iv byteanull
encrypted_product_analytics_configurator_connection_string byteanull
encrypted_product_analytics_configurator_connection_string_iv byteanull
pages_multiple_versions_enabled booleanNOT NULLFALSE
allow_merge_without_pipeline booleanNOT NULLFALSE
duo_features_enabled booleanNOT NULLTRUE
require_reauthentication_to_approve booleannull
observability_alerts_enabled booleanNOT NULLTRUE
spp_repository_pipeline_access booleannullTRUE
max_number_of_vulnerabilities integernull
pages_primary_domain textnullCHECK char_length(pages_primary_domain) <= 255
extended_prat_expiry_webhooks_execute booleanNOT NULLFALSE
merge_request_title_regex textnullCHECK char_length(merge_request_title_regex) <= 255
protect_merge_request_pipelines booleanNOT NULLTRUE
auto_duo_code_review_enabled booleannull
model_prompt_cache_enabled booleannull
web_based_commit_signing_enabled booleanNOT NULLFALSE
duo_context_exclusion_settings jsonbNOT NULLCAST('{}' AS jsonb)
merge_request_title_regex_description textnullCHECK char_length(merge_request_title_regex_description) <= 255
duo_remote_flows_enabled booleannull
duo_foundational_flows_enabled booleannull
duo_sast_fp_detection_enabled booleanNOT NULLFALSE
duo_sast_vr_workflow_enabled booleanNOT NULLFALSE
automatic_rebase_enabled booleanNOT NULLFALSE
duo_secret_detection_fp_enabled booleanNOT NULLFALSE
reviewer_assignment_strategy smallintNOT NULL0
pipeline_execution_policy_bot_access_enabled booleanNOT NULLFALSE
pipeline_execution_policy_bot_access_file_patterns text[]nullCAST('{}' AS text[])CHECK cardinality(pipeline_execution_policy_bot_access_file_patterns) <= 20
pipeline_execution_policy_bot_access_group_id bigintnullnamespaces.id 1:N · SET NULL
security_policy_pipeline_must_succeed booleanNOT NULLFALSE
mr_default_title_template textnullCHECK char_length(mr_default_title_template) <= 100
tool_approval_for_session_enabled booleannull
dap_session_tracking_enabled booleanNOT NULLFALSE
duo_dependency_bump_breaking_changes_enabled booleanNOT NULLFALSE
ai_audit_events_storage_enabled booleanNOT NULLFALSE
duo_dependency_bump_breaking_changes_enabled_by_id bigintnullusers.id 1:N · SET NULL
feature_flags_minimum_role smallintNOT NULL2
duo_vulnerability_context_analysis_enabled booleanNOT NULLFALSE

Indexes

  • (duo_dependency_bump_breaking_changes_enabled_by_id) idx_project_settings_on_duo_dep_bump_bc_enabled_by_id
  • (pipeline_execution_policy_bot_access_group_id) idx_project_settings_on_pep_bot_access_group_id
  • (project_id) WHERE legacy_open_source_license_available = TRUE index_project_settings_on_legacy_os_license_project_id
  • (project_id) WHERE …(has_vulnerabilities) index_project_settings_on_project_id_partially
  • UNIQUE (push_rule_id) index_project_settings_on_push_rule_id
  • UNIQUE (pages_unique_domain) WHERE pages_unique_domain IS NOT NULL unique_index_for_project_pages_unique_domain

Referenced by

  • nothing

Table checks: char_length(pages_unique_domain) <= 63; char_length(merge_request_title_regex_description) <= 255; char_length(previous_default_branch) <= 4096; char_length(issue_branch_template) <= 255; char_length(product_analytics_data_collector_host) <= 255; char_length(mirror_branch_regex) <= 255; char_length(pages_primary_domain) <= 255; char_length(product_analytics_instrumentation_key) <= 255; char_length(squash_commit_template) <= 500; show_default_award_emojis IS NOT NULL; char_length(mr_default_title_template) <= 100; char_length(merge_commit_template) <= 500; char_length(merge_request_title_regex) <= 255; char_length(cube_api_base_url) <= 512; cardinality(pipeline_execution_policy_bot_access_file_patterns) <= 20

project_states

9 cols · no RLS · line 29180View in 3D
  • Isolated tableproject_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
project_id bigintNOT NULL
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_project_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_project_states_needs_verification
  • UNIQUE (project_id) index_project_states_on_project_id
  • (verification_state) index_project_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_project_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

project_statistics

19 cols · no RLS · line 29202View in 3D
  • Nullable foreign key root_namespace_idproject_statistics.root_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • TIMESTAMP without time zone shared_runners_seconds_last_resetshared_runners_seconds_last_reset stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:1 · CASCADE
namespace_id bigintNOT NULL
commit_count bigintNOT NULL0
storage_size bigintNOT NULL0
repository_size bigintNOT NULL0
lfs_objects_size bigintNOT NULL0
build_artifacts_size bigintNOT NULL0
shared_runners_seconds bigintNOT NULL0
shared_runners_seconds_last_reset timestampnull
packages_size bigintNOT NULL0
wiki_size bigintnull
snippets_size bigintnull
pipeline_artifacts_size bigintNOT NULL0
uploads_size bigintNOT NULL0
container_registry_size bigintNOT NULL0
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
root_namespace_id bigintnullnamespaces.id 1:N · SET NULL

Indexes

  • (namespace_id) index_project_statistics_on_namespace_id
  • (packages_size, project_id) index_project_statistics_on_packages_size_and_project_id
  • UNIQUE (project_id) index_project_statistics_on_project_id
  • (repository_size, project_id) index_project_statistics_on_repository_size_and_project_id
  • (root_namespace_id) index_project_statistics_on_root_namespace_id
  • (storage_size, project_id) index_project_statistics_on_storage_size_and_project_id
  • (wiki_size, project_id) index_project_statistics_on_wiki_size_and_project_id
  • (project_id) WHERE container_registry_size = 0 tmp_index_project_statistics_cont_registry_size

Referenced by

  • nothing

project_to_security_attributes

6 cols · no RLS · line 29233View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
security_attribute_id bigintNOT NULLsecurity_attributes.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
traversal_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • UNIQUE (project_id, security_attribute_id) index_project_security_attributes_project_id_unique
  • (traversal_ids) index_project_security_attributes_traversal_ids
  • (project_id, id) index_project_to_security_attributes_on_project_id_and_id
  • (security_attribute_id) index_project_to_security_attributes_on_security_attribute_id

Referenced by

  • nothing

project_topic_upload_states

10 cols · no RLS · line 29251View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
project_topic_upload_id bigintNOT NULLproject_topic_uploads.id 1:1 · CASCADE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_project_topic_upload_states_failed_verification
  • (project_topic_upload_id) WHERE verification_state = 0 OR verification_state = 3 index_project_topic_upload_states_needs_verification_id
  • (organization_id) index_project_topic_upload_states_on_organization_id
  • UNIQUE (project_topic_upload_id) index_project_topic_upload_states_on_project_topic_upload_id
  • (project_topic_upload_id, verification_started_at) WHERE verification_state = 1 index_project_topic_upload_states_on_verification_started
  • (verification_state) index_project_topic_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_project_topic_upload_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

project_topic_uploads

16 cols · no RLS · line 29274View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnullCHECK organization_id IS NOT NULL
namespace_id bigintnull
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • UNIQUE (id) idx_project_topic_uploads_on_id
  • (checksum) project_topic_uploads_checksum_idx
  • (model_id, model_type, uploader, created_at) project_topic_uploads_model_id_model_type_uploader_created__idx
  • (namespace_id) project_topic_uploads_namespace_id_idx
  • (organization_id) project_topic_uploads_organization_id_idx
  • (project_id) project_topic_uploads_project_id_idx
  • (store) project_topic_uploads_store_idx
  • (uploaded_by_user_id) project_topic_uploads_uploaded_by_user_id_idx
  • (uploader, path) project_topic_uploads_uploader_path_idx

Referenced by

Table checks: char_length(path) <= 511; char_length(checksum) <= 64; organization_id IS NOT NULL

project_topics

5 cols · no RLS · line 29296View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
topic_id bigintNOT NULLtopics.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (project_id, topic_id) index_project_topics_on_project_id_and_topic_id
  • (topic_id) index_project_topics_on_topic_id

Referenced by

  • nothing

project_type_ci_runner_machines

18 cols · no RLS · line 29313View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
runner_id bigintNOT NULLproject_type_ci_runners.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
contacted_at timestamptznull
creation_state smallintNOT NULL0
executor_type smallintnull
runner_type PKsmallintNOT NULLproject_type_ci_runners.id 1:N · CASCADE
config jsonbNOT NULLCAST('{}' AS jsonb)
system_xid textNOT NULLCHECK char_length(system_xid) <= 64
platform textnullCHECK char_length(platform) <= 255
architecture textnullCHECK char_length(architecture) <= 255
revision textnullCHECK char_length(revision) <= 255
ip_address textnullCHECK char_length(ip_address) <= 1024
version textnullCHECK char_length(version) <= 2048
runtime_features jsonbNOT NULLCAST('{}' AS jsonb)
organization_id bigintnullCHECK organization_id IS NOT NULL
labels jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (contacted_at, id) index_proj_type_ci_runner_machines_on_contacted_at_desc_id_desc
  • UNIQUE (runner_id, runner_type, system_xid) index_proj_type_ci_runner_machines_on_runner_id_type_system_xid
  • (created_at, id) index_project_type_ci_runner_machines_on_created_at_and_id_desc
  • (executor_type) index_project_type_ci_runner_machines_on_executor_type
  • (substring(version, CAST('^\d+\.' AS text)), version, runner_id) index_project_type_ci_runner_machines_on_major_version
  • (substring(version, CAST('^\d+\.\d+\.' AS text)), version, runner_id) index_project_type_ci_runner_machines_on_minor_version
  • (organization_id) index_project_type_ci_runner_machines_on_organization_id
  • (substring(version, CAST('^\d+\.\d+\.\d+' AS text)), version, runner_id) index_project_type_ci_runner_machines_on_patch_version
  • (version) index_project_type_ci_runner_machines_on_version

Referenced by

  • nothing

Table checks: char_length(system_xid) <= 64; char_length(revision) <= 255; char_length(version) <= 2048; char_length(ip_address) <= 1024; char_length(platform) <= 255; char_length(architecture) <= 255; organization_id IS NOT NULL

project_type_ci_runners

26 cols · no RLS · line 29341View in 3D
  • Monetary value stored as float public_projects_minutes_cost_factorpublic_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.
  • Monetary value stored as float private_projects_minutes_cost_factorprivate_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
creator_id bigintnull
created_at timestamptznull
updated_at timestamptznull
contacted_at timestamptznull
token_expires_at timestamptznull
public_projects_minutes_cost_factor double precisionNOT NULL1.0
private_projects_minutes_cost_factor double precisionNOT NULL1.0
access_level integerNOT NULL0
maximum_timeout integernull
runner_type PKsmallintNOT NULL
registration_type smallintNOT NULL0
creation_state smallintNOT NULL0
active booleanNOT NULLTRUE
run_untagged booleanNOT NULLTRUE
locked booleanNOT NULLFALSE
name textnullCHECK char_length(name) <= 256
token_encrypted textnullCHECK char_length(token_encrypted) <= 512
description textnullCHECK char_length(description) <= 1024
maintainer_note textnullCHECK char_length(maintainer_note) <= 1024
allowed_plans text[]NOT NULLCAST('{}' AS text[])
allowed_plan_ids bigint[]NOT NULLCAST('{}' AS bigint[])
organization_id bigintnullCHECK organization_id IS NOT NULL
allowed_plan_name_uids smallint[]NOT NULLCAST('{}' AS smallint[])
token_rotation_deadline timestamptznull
uuid uuidnull

Indexes

  • (active, id) idx_project_type_ci_runners_on_active_and_id
  • (contacted_at, id) idx_project_type_ci_runners_on_contacted_at_and_id_desc
  • (contacted_at, id) idx_project_type_ci_runners_on_contacted_at_desc_and_id_desc
  • (contacted_at, id) WHERE active = FALSE idx_project_type_ci_runners_on_contacted_at_id_where_inactive
  • (created_at, id) WHERE active = FALSE idx_project_type_ci_runners_on_created_at_and_id_where_inactive
  • (created_at, id) idx_project_type_ci_runners_on_created_at_desc_and_id_desc
  • UNIQUE (token_encrypted, runner_type) idx_project_type_ci_runners_on_token_encrypted_and_runner_type
  • (token_expires_at, id) idx_project_type_ci_runners_on_token_expires_at_and_id_desc
  • (token_expires_at, id) idx_project_type_ci_runners_on_token_expires_at_desc_id_desc
  • UNIQUE (uuid, runner_type) index_e1f449cf0b
  • (created_at, id) index_project_type_ci_runners_on_created_at_and_id_desc
  • (creator_id) WHERE creator_id IS NOT NULL index_project_type_ci_runners_on_creator_id_where_not_null
  • (description) index_project_type_ci_runners_on_description_trigram
  • (locked) index_project_type_ci_runners_on_locked
  • (organization_id) index_project_type_ci_runners_on_organization_id

Referenced by

Table checks: char_length(token_encrypted) <= 512; char_length(name) <= 256; char_length(maintainer_note) <= 1024; char_length(description) <= 1024; organization_id IS NOT NULL

project_upload_states

10 cols · no RLS · line 29375View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
project_upload_id bigintNOT NULLproject_uploads.id 1:1 · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_project_upload_states_failed_verification
  • (project_upload_id) WHERE verification_state = 0 OR verification_state = 3 index_project_upload_states_needs_verification_id
  • (project_id) index_project_upload_states_on_project_id
  • UNIQUE (project_upload_id) index_project_upload_states_on_project_upload_id
  • (project_upload_id, verification_started_at) WHERE verification_state = 1 index_project_upload_states_on_verification_started
  • (verification_state) index_project_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_project_upload_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

project_uploads

16 cols · no RLS · line 29398View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnull
namespace_id bigintnull
project_id bigintnullCHECK project_id IS NOT NULL
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • UNIQUE (id) index_project_uploads_on_id
  • (project_id, id) index_project_uploads_on_project_id_and_id
  • (checksum) project_uploads_checksum_idx
  • (model_id, model_type, uploader, created_at) project_uploads_model_id_model_type_uploader_created_at_idx
  • (namespace_id) project_uploads_namespace_id_idx
  • (organization_id) project_uploads_organization_id_idx
  • (project_id) project_uploads_project_id_idx
  • (store) project_uploads_store_idx
  • (uploaded_by_user_id) project_uploads_uploaded_by_user_id_idx
  • (uploader, path) project_uploads_uploader_path_idx

Referenced by

Table checks: char_length(path) <= 511; char_length(checksum) <= 64; project_id IS NOT NULL

project_wiki_repositories

4 cols · no RLS · line 29420View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (project_id) index_project_wiki_repositories_on_project_id

Referenced by

  • nothing

security 26 tables

Tables whose names start with security_.

Entity-relationship diagram: security_findings, security_attributes, security_categories, security_finding_enrichments, security_finding_token_statuses, security_inventory_filters, security_orchestration_policy_configurations, security_orchestration_policy_rule_schedules, security_pipeline_execution_policy_config_links, security_pipeline_execution_project_schedules, security_policies, security_policy_dismissals, security_policy_project_links, security_policy_requirements, security_policy_schedule_pipelines, security_policy_settings, security_project_tracked_contexts, security_scan_execution_project_schedules, security_scan_profile_configurations, security_scan_profile_project_statuses, security_scan_profile_triggers, security_scan_profiles, security_scan_profiles_projects, security_scans, security_scheduled_pipeline_execution_policy_test_runs, security_trainingssecurity_findingsid PKbigintscan_id FKbigintscanner_id FKbigintseveritysmallintdeduplicatedbooleanuuiduuidoverridden_uuiduuidpartition_number PKintegerfinding_datajsonbproject_idbigintscanner_reported_severitysmallintcontext_unaware_uuiduuidsecurity_attributesid PKbigintnamespace_idbigintsecurity_category_id FKbigintcreated_attimestamptzupdated_attimestamptzeditable_statesmallintnametextdescriptiontextcolortexttemplate_typesmallintdeleted_attimestamptzsecurity_categoriesid PKbigintnamespace_idbigintcreated_attimestamptzupdated_attimestamptzeditable_statesmallinttemplate_typesmallintmultiple_selectionbooleannametextdescriptiontextdeleted_attimestamptzsecurity_finding_enrichmentsid PKbigintfinding_uuiduuidproject_idbigintcve_enrichment_idbigintcreated_attimestamptzupdated_attimestamptzcvetextepss_scoredouble precisionis_known_exploitbooleanvulnerability_id FKbigintsecurity_finding_token_statusessecurity_finding_id PKbigintproject_idbigintcreated_attimestamptzupdated_attimestamptzstatussmallintraw_source_code_extracttextlast_verified_attimestamptzsecurity_inventory_filtersid PKbigintarchivedbooleansastsmallintsast_advancedsmallintsast_iacsmallintdastsmallintdependency_scanningsmallintcoverage_fuzzingsmallintapi_fuzzingsmallintcluster_image_scanningsmallintsecret_detection_secret_push_protectionsmallintcontainer_scanning_for_registrysmallintsecret_detection_pipeline_basedsmallintcontainer_scanning_pipeline_basedsmallintsecret_detectionsmallintcontainer_scanningsmallinttotalintegercriticalintegerhighintegermediumintegerlowintegerinfointegerunknownintegerproject_idbiginttraversal_idsbigint[]project_nametexthas_scannersbooleanhas_failed_or_warningbooleanhas_stalebooleansecurity_orchestration_policy_configurationsid PKbigintproject_id FKbigintsecurity_policy_management_project_id FKbigintcreated_attimestamptzupdated_attimestamptzconfigured_attimestamptznamespace_id FKbigintexperimentsjsonbsecurity_orchestration_policy_rule_schedulesid PKbigintcreated_attimestamptzupdated_attimestamptznext_run_attimestamptzsecurity_orchestration_policy_configuration_id FKbigintuser_id FKbigintpolicy_indexintegercrontextrule_indexintegerproject_id FKbigintnamespace_id FKbigintpolicy_typesmallintsecurity_pipeline_execution_policy_config_linksid PKbigintproject_id FKbigintsecurity_policy_id FKbigintsecurity_pipeline_execution_project_schedulesid PKbigintcreated_attimestamptzupdated_attimestamptznext_run_attimestamptzsecurity_policy_id FKbigintproject_id FKbiginttime_window_secondsintegercrontextcron_timezonetextsnoozed_untiltimestamptznext_run_applied_delayintegersecurity_policiesid PKbigintsecurity_orchestration_policy_configuration_id FKbigintcreated_attimestamptzupdated_attimestamptzpolicy_indexsmallinttypesmallintenabledbooleannametextdescriptiontextchecksumtextscopejsonbsecurity_policy_management_project_id FKbigintcontentjsonbmetadatajsonbsecurity_policy_dismissalsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintmerge_request_id FKbigintsecurity_policy_id FKbigintuser_id FKbigintsecurity_findings_uuidstext[]dismissal_typessmallint[]commenttextstatussmallintlicensesjsonblicense_occurrence_uuidstext[]security_policy_project_linksid PKbigintproject_id FKbigintsecurity_policy_id FKbigintsecurity_policy_requirementsid PKbigintcompliance_framework_security_policy_id FKbigintcompliance_requirement_id FKbigintnamespace_id FKbigintsecurity_policy_schedule_pipelinesid PKbigintsecurity_policy_id FKbigintpipeline_idbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzsecurity_policy_settingsid PKbigintcsp_namespace_id FKbigintorganization_id FKbigintcsp_namespace_locked_untiltimestamptzsecurity_project_tracked_contextsid PKbigintproject_idbigintcreated_attimestamptzupdated_attimestamptzcontext_typesmallintstatesmallintis_defaultbooleancontext_nametexttraversal_idsbigint[]uuid_versionsmallintsecurity_scan_execution_project_schedulesid PKbigintcreated_attimestamptzupdated_attimestamptzpolicy_rule_schedule_id FKbigintproject_id FKbigintsecurity_policy_id FKbigintnext_run_attimestamptznext_run_applied_delayintegersecurity_scan_profile_configurationsid PKbigintcreated_attimestamptzupdated_attimestamptzsecurity_scan_profile_id FKbigintnamespace_idbigintconfiguration_versionsmallintconfigurationjsonbsecurity_scan_profile_project_statusesid PKbigintproject_idbigintsecurity_scan_profile_id FKbigintbuild_idbigintlast_scan_attimestamptzcreated_attimestamptzupdated_attimestamptzstatussmallintconsecutive_failure_countsmallintconsecutive_success_countsmallintsecurity_scan_profile_triggersid PKbigintcreated_attimestamptzupdated_attimestamptzsecurity_scan_profile_id FKbigintnamespace_idbiginttrigger_typesmallintsecurity_scan_profile_configuration_id FKbigintsecurity_scan_profilesid PKbigintnamespace_idbigintcreated_attimestamptzupdated_attimestamptzscan_typesmallintgitlab_recommendedbooleannametextdescriptiontextconfigurationjsonbdeleted_attimestamptzsecurity_scan_profiles_projectsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintsecurity_scan_profile_id FKbigintsecurity_scansid PKbigintcreated_attimestamptzupdated_attimestamptzbuild_idbigintscan_typesmallintinfojsonbproject_idbigintpipeline_idbigintlatestbooleanstatussmallintfindings_partition_numberintegerscanner_external_idtextsecurity_scheduled_pipeline_execution_policy_test_runsid PKbigintsecurity_policy_id FKbigintproject_id FKbigintpipeline_idbiginterror_messagetextstatesmallintcreated_attimestamptzupdated_attimestamptzsecurity_trainingsid PKbigintproject_id FKbigintprovider_idbigintis_primarybooleancreated_attimestamptzupdated_attimestamptztraining_provider_idbigintcompliance_framework_security_policiescompliance_requirementsmerge_requestsnamespacesorganizationsprojectsusersvulnerabilitiesvulnerability_scannerssecurity_category_idvulnerability_idscanner_idscan_idnamespace_idproject_idsecurity_policy_management_project_idnamespace_idcompliance_requirement_idcompliance_framework_security_policy_idorganization_idcsp_namespace_idsecurity_scan_profile_idsecurity_scan_profile_idsecurity_scan_profile_idproject_idnamespace_idproject_idsecurity_orchestration_policy_configuration_iduser_idsecurity_policy_management_project_idsecurity_orchestration_policy_configuration_idsecurity_scan_profile_configuration_idsecurity_scan_profile_idsecurity_policy_idproject_idproject_idsecurity_policy_idproject_idmerge_request_idsecurity_policy_iduser_idproject_idsecurity_policy_idproject_idsecurity_policy_idproject_idpolicy_rule_schedule_idsecurity_policy_idsecurity_policy_idproject_id

Relationships

security_findings

12 cols · no RLS · line 7101View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
scan_id bigintNOT NULLsecurity_scans.id 1:N · CASCADE
scanner_id bigintNOT NULLvulnerability_scanners.id 1:N · CASCADE
severity smallintNOT NULL
deduplicated booleanNOT NULLFALSE
uuid uuidnullCHECK uuid IS NOT NULL
overridden_uuid uuidnull
partition_number PKintegerNOT NULL1
finding_data jsonbNOT NULLCAST('{}' AS jsonb)
project_id bigintnullCHECK project_id IS NOT NULL
scanner_reported_severity smallintnull
context_unaware_uuid uuidnull

Indexes

  • (scan_id, severity, id) index_security_findings_on_scan_id_and_severity_and_id
  • (scan_id, deduplicated) security_findings_scan_id_deduplicated_idx
  • (scan_id, id) security_findings_scan_id_id_idx
  • (scanner_id) security_findings_scanner_id_idx
  • (severity) security_findings_severity_idx
  • UNIQUE (uuid, scan_id, partition_number) security_findings_uuid_scan_id_partition_number_idx

Referenced by

  • nothing

Table checks: uuid IS NOT NULL; project_id IS NOT NULL

security_attributes

11 cols · no RLS · line 30722View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULL
security_category_id bigintNOT NULLsecurity_categories.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
editable_state smallintNOT NULL0
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 255
color textNOT NULLCHECK char_length(color) <= 7
template_type smallintnull
deleted_at timestamptznull

Indexes

  • UNIQUE (security_category_id, name) WHERE deleted_at IS NULL index_security_attributes_on_category_name_not_deleted
  • (namespace_id) index_security_attributes_on_namespace_id
  • (namespace_id) WHERE deleted_at IS NULL index_security_attributes_on_namespace_id_where_not_deleted
  • (security_category_id) index_security_attributes_on_security_category_id

Referenced by

Table checks: char_length(color) <= 7; char_length(description) <= 255; char_length(name) <= 255

security_categories

10 cols · no RLS · line 30748View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
editable_state smallintNOT NULL0
template_type smallintnull
multiple_selection booleanNOT NULLFALSE
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 255
deleted_at timestamptznull

Indexes

  • (namespace_id) index_security_categories_on_namespace_id
  • UNIQUE (namespace_id, name) WHERE deleted_at IS NULL index_security_categories_on_namespace_name_not_deleted

Referenced by

Table checks: char_length(name) <= 255; char_length(description) <= 255

security_finding_enrichments

10 cols · no RLS · line 30772View in 3D
  • Nullable foreign key vulnerability_idsecurity_finding_enrichments.vulnerability_id may be NULL, so the relationship to vulnerabilities is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
finding_uuid uuidNOT NULL
project_id bigintNOT NULL
cve_enrichment_id bigintnull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
cve textNOT NULLCHECK char_length(cve) <= 24
epss_score double precisionnull
is_known_exploit booleannull
vulnerability_id bigintnullvulnerabilities.id 1:N · SET NULL

Indexes

  • (created_at, id) index_sec_finding_enrichments_on_created_at_and_id
  • UNIQUE (finding_uuid, cve) index_sec_finding_enrichments_on_finding_and_cve
  • (project_id) index_sec_finding_enrichments_on_project_id
  • (vulnerability_id) index_sec_finding_enrichments_on_vulnerability_id
  • (cve_enrichment_id, id) index_security_finding_enrichments_on_cve_enrichment_id_and_id

Referenced by

  • nothing

Table checks: char_length(cve) <= 24

security_finding_token_statuses

7 cols · no RLS · line 30795View in 3D
  • Isolated tablesecurity_finding_token_statuses references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
security_finding_id PKbigintNOT NULL
project_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
raw_source_code_extract textnullCHECK char_length(raw_source_code_extract) <= 2048
last_verified_at timestamptznull

Indexes

  • (created_at) idx_security_finding_token_on_created_at
  • (project_id) idx_security_finding_token_on_project_id

Referenced by

  • nothing

Table checks: char_length(raw_source_code_extract) <= 2048

security_inventory_filters

29 cols · no RLS · line 30815View in 3D
  • Isolated tablesecurity_inventory_filters references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
archived booleanNOT NULLFALSE
sast smallintNOT NULL0
sast_advanced smallintNOT NULL0
sast_iac smallintNOT NULL0
dast smallintNOT NULL0
dependency_scanning smallintNOT NULL0
coverage_fuzzing smallintNOT NULL0
api_fuzzing smallintNOT NULL0
cluster_image_scanning smallintNOT NULL0
secret_detection_secret_push_protection smallintNOT NULL0
container_scanning_for_registry smallintNOT NULL0
secret_detection_pipeline_based smallintNOT NULL0
container_scanning_pipeline_based smallintNOT NULL0
secret_detection smallintNOT NULL0
container_scanning smallintNOT NULL0
total integerNOT NULL0
critical integerNOT NULL0
high integerNOT NULL0
medium integerNOT NULL0
low integerNOT NULL0
info integerNOT NULL0
unknown integerNOT NULL0
project_id bigintNOT NULL
traversal_ids bigint[]NOT NULLCAST('{}' AS bigint[])
project_name textNOT NULLCHECK char_length(project_name) <= 255
has_scanners booleanNOT NULLFALSE
has_failed_or_warning booleanNOT NULLFALSE
has_stale booleanNOT NULLFALSE

Indexes

  • (traversal_ids, project_id) WHERE NOT archived idx_sec_inv_filters_traversal_proj_covering
  • (traversal_ids, project_id, id) WHERE NOT archived AND (critical > 0 OR high > 0) idx_sec_inv_filters_traversals_unarchived_proj_severities_sort
  • UNIQUE (project_id) index_security_inventory_filters_on_project_id
  • (traversal_ids) index_security_inventory_filters_on_traversal_ids

Referenced by

  • nothing

Table checks: char_length(project_name) <= 255

security_orchestration_policy_configurations

8 cols · no RLS · line 30857View in 3D

{"owner":"group::container security","description":"Configuration used to store relationship between project and security policy repository"}

  • Nullable foreign key namespace_idsecurity_orchestration_policy_configurations.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idsecurity_orchestration_policy_configurations.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
security_policy_management_project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
configured_at timestamptznull
namespace_id bigintnullnamespaces.id 1:N · CASCADE
experiments jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (security_policy_management_project_id, project_id) index_sop_configurations_project_id_policy_project_id
  • UNIQUE (namespace_id) WHERE namespace_id IS NOT NULL partial_index_sop_configs_on_namespace_id
  • UNIQUE (project_id) WHERE project_id IS NOT NULL partial_index_sop_configs_on_project_id

Referenced by

Table checks: project_id IS NULL <> namespace_id IS NULL

security_orchestration_policy_rule_schedules

12 cols · no RLS · line 30880View in 3D

{"owner":"group::container security","description":"Schedules used to store relationship between project and security policy repository"}

  • Nullable foreign key namespace_idsecurity_orchestration_policy_rule_schedules.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idsecurity_orchestration_policy_rule_schedules.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idsecurity_orchestration_policy_rule_schedules.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK namespace_id, project_id, user_idsecurity_orchestration_policy_rule_schedules has several nullable FKs (namespace_id, project_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
next_run_at timestamptznull
security_orchestration_policy_configuration_id bigintNOT NULLsecurity_orchestration_policy_configurations.id 1:N · CASCADE
user_id bigintnullusers.id 1:N · CASCADE
policy_index integerNOT NULL
cron textNOT NULLCHECK char_length(cron) <= 255
rule_index integerNOT NULL0
project_id bigintnullprojects.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
policy_type smallintNOT NULL0

Indexes

  • (namespace_id) index_security_orchestration_policy_rule_schedules_on_namespace
  • (project_id) index_security_orchestration_policy_rule_schedules_on_project_i
  • (security_orchestration_policy_configuration_id) index_sop_schedules_on_sop_configuration_id
  • (user_id) index_sop_schedules_on_user_id

Referenced by

Table checks: char_length(cron) <= 255; num_nonnulls(namespace_id, project_id) = 1

security_pipeline_execution_project_schedules

11 cols · no RLS · line 30923View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
next_run_at timestamptzNOT NULL
security_policy_id bigintNOT NULLsecurity_policies.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
time_window_seconds integerNOT NULLCHECK time_window_seconds > 0
cron textNOT NULLCHECK char_length(cron) <= 128
cron_timezone textNOT NULLCHECK char_length(cron_timezone) <= 255
snoozed_until timestamptznull
next_run_applied_delay integernull

Indexes

  • (project_id) idx_pipeline_execution_schedules_on_project_id
  • (security_policy_id, id) idx_pipeline_execution_schedules_security_policy_id_and_id
  • (next_run_at, id) idx_security_pipeline_execution_project_schedules_next_run_at

Referenced by

  • nothing

Table checks: char_length(cron_timezone) <= 255; char_length(cron) <= 128; time_window_seconds > 0

security_policies

14 cols · no RLS · line 30949View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
security_orchestration_policy_configuration_id bigintNOT NULLsecurity_orchestration_policy_configurations.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
policy_index smallintNOT NULL
type smallintNOT NULL
enabled booleanNOT NULLTRUE
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 1000000
checksum textNOT NULLCHECK char_length(checksum) <= 255
scope jsonbNOT NULLCAST('{}' AS jsonb)
security_policy_management_project_id bigintNOT NULLprojects.id 1:N · CASCADE
content jsonbNOT NULLCAST('{}' AS jsonb)
metadata jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (security_orchestration_policy_configuration_id, policy_index) idx_security_policies_config_id_policy_index
  • (security_policy_management_project_id) index_security_policies_on_policy_management_project_id
  • UNIQUE (security_orchestration_policy_configuration_id, type, policy_index) index_security_policies_on_unique_config_type_policy_index

Referenced by

Table checks: char_length(name) <= 255; char_length(checksum) <= 255; char_length(description) <= 1000000

security_policy_dismissals

13 cols · no RLS · line 30978View in 3D
  • Nullable foreign key security_policy_idsecurity_policy_dismissals.security_policy_id may be NULL, so the relationship to security_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idsecurity_policy_dismissals.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK security_policy_id, user_idsecurity_policy_dismissals has several nullable FKs (security_policy_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
security_policy_id bigintnullsecurity_policies.id 1:N · SET NULL
user_id bigintnullusers.id 1:N · SET NULL
security_findings_uuids text[]nullCAST('{}' AS text[])CHECK security_findings_uuids IS NOT NULL
dismissal_types smallint[]NOT NULLCAST('{}' AS smallint[])
comment textnullCHECK char_length(comment) <= 255
status smallintNOT NULL0
licenses jsonbNOT NULLCAST('{}' AS jsonb)
license_occurrence_uuids text[]NOT NULLCAST('{}' AS text[])CHECK cardinality(license_occurrence_uuids) <= 1000

Indexes

  • UNIQUE (merge_request_id, security_policy_id) i_policy_dismissals_on_merge_request_id_and_security_policy_id
  • (license_occurrence_uuids) WHERE status = 1 idx_security_policy_dismissals_license_occurrence_uuids
  • (security_findings_uuids) idx_security_policy_dismissals_project_findings_uuids
  • (dismissal_types) index_security_policy_dismissals_on_dismissal_types
  • (project_id) index_security_policy_dismissals_on_project_id
  • (security_policy_id) index_security_policy_dismissals_on_security_policy_id
  • (user_id) index_security_policy_dismissals_on_user_id

Referenced by

  • nothing

Table checks: char_length(comment) <= 255; security_findings_uuids IS NOT NULL; cardinality(license_occurrence_uuids) <= 1000

security_policy_requirements

4 cols · no RLS · line 31020View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
compliance_framework_security_policy_id bigintNOT NULLcompliance_framework_security_policies.id 1:N · CASCADE
compliance_requirement_id bigintNOT NULLcompliance_requirements.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • (compliance_requirement_id) index_security_policy_requirements_on_compliance_requirement_id
  • (namespace_id) index_security_policy_requirements_on_namespace_id
  • UNIQUE (compliance_framework_security_policy_id, compliance_requirement_id) uniq_idx_security_policy_requirements_on_requirement_and_policy

Referenced by

  • nothing

security_policy_schedule_pipelines

6 cols · no RLS · line 31036View in 3D
  • Junction table allows duplicate links project_id, security_policy_idsecurity_policy_schedule_pipelines looks like a many-to-many link table but has no unique constraint across (project_id, security_policy_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
security_policy_id bigintNOT NULLsecurity_policies.id 1:N · CASCADE
pipeline_id bigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (security_policy_id, project_id, id) idx_sec_pol_sched_pipes_on_policy_project_id_desc
  • (project_id) idx_sec_pol_sched_pipes_on_project_id
  • UNIQUE (pipeline_id) idx_security_policy_schedule_pipelines_on_pipeline_id

Referenced by

  • nothing

security_policy_settings

4 cols · no RLS · line 31054View in 3D
  • Nullable foreign key csp_namespace_idsecurity_policy_settings.csp_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
csp_namespace_id bigintnullnamespaces.id 1:N · SET NULL
organization_id bigintNOT NULLorganizations.id 1:1 · CASCADE
csp_namespace_locked_until timestamptznull

Indexes

  • (csp_namespace_id) index_security_policy_settings_on_csp_namespace_id
  • UNIQUE (organization_id) index_security_policy_settings_on_organization_id

Referenced by

  • nothing

security_project_tracked_contexts

10 cols · no RLS · line 31070View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
context_type smallintNOT NULL1
state smallintNOT NULL1
is_default booleanNOT NULL
context_name textNOT NULLCHECK char_length(context_name) <= 1024
traversal_ids bigint[]NOT NULLCAST('{}' AS bigint[])
uuid_version smallintNOT NULL1

Indexes

  • UNIQUE (project_id, context_name, context_type) index_security_project_tracked_contexts_on_project_context
  • (traversal_ids, id) index_security_project_tracked_contexts_on_traversal_ids_id

Referenced by

Table checks: char_length(context_name) <= 1024

security_scan_execution_project_schedules

8 cols · no RLS · line 31093View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
policy_rule_schedule_id bigintNOT NULLsecurity_orchestration_policy_rule_schedules.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
security_policy_id bigintNOT NULLsecurity_policies.id 1:N · CASCADE
next_run_at timestamptzNOT NULL
next_run_applied_delay integerNOT NULL0

Indexes

  • (next_run_at, id) idx_security_sep_schedules_on_next_run_at_and_id
  • UNIQUE (policy_rule_schedule_id, project_id) idx_security_sep_schedules_on_rule_schedule_id_and_project_id
  • (security_policy_id, project_id) idx_security_sep_schedules_on_security_policy_id_and_project_id
  • (project_id) index_security_scan_execution_project_schedules_on_project_id

Referenced by

  • nothing

security_scan_profile_configurations

7 cols · no RLS · line 31113View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
security_scan_profile_id bigintNOT NULLsecurity_scan_profiles.id 1:N · CASCADE
namespace_id bigintNOT NULL
configuration_version smallintNOT NULL1
configuration jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (security_scan_profile_id) idx_sspc_on_security_scan_profile_id
  • (namespace_id) index_security_scan_profile_configurations_on_namespace_id

Referenced by

security_scan_profile_project_statuses

10 cols · no RLS · line 31132View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
security_scan_profile_id bigintNOT NULLsecurity_scan_profiles.id 1:N · CASCADE
build_id bigintnull
last_scan_at timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
consecutive_failure_count smallintNOT NULL0
consecutive_success_count smallintNOT NULL0

Indexes

  • (build_id) idx_security_scan_profile_proj_statuses_on_build_id
  • (security_scan_profile_id) idx_security_scan_profile_proj_statuses_on_profile_id
  • UNIQUE (project_id, security_scan_profile_id) idx_security_scan_profile_proj_statuses_on_project_and_profile

Referenced by

  • nothing

security_scan_profile_triggers

7 cols · no RLS · line 31154View in 3D
  • Nullable foreign key security_scan_profile_configuration_idsecurity_scan_profile_triggers.security_scan_profile_configuration_id may be NULL, so the relationship to security_scan_profile_configurations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
security_scan_profile_id bigintNOT NULLsecurity_scan_profiles.id 1:N · CASCADE
namespace_id bigintNOT NULL
trigger_type smallintNOT NULL
security_scan_profile_configuration_id bigintnullsecurity_scan_profile_configurations.id 1:N · SET NULL

Indexes

  • (security_scan_profile_configuration_id) index_scan_profile_triggers_on_configuration_id
  • (namespace_id) index_security_scan_profile_triggers_on_namespace_id
  • UNIQUE (security_scan_profile_id, trigger_type) index_security_scan_profile_triggers_on_profile_trigger_unique

Referenced by

  • nothing

security_scan_profiles

10 cols · no RLS · line 31173View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
scan_type smallintNOT NULL
gitlab_recommended booleanNOT NULLFALSE
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 2047
configuration jsonbNOT NULLCAST('{}' AS jsonb)
deleted_at timestamptznull

Indexes

  • (namespace_id) index_security_scan_profiles_on_namespace_id
  • UNIQUE (namespace_id, scan_type, lower(name)) WHERE deleted_at IS NULL index_security_scan_profiles_unique_name_not_deleted

Referenced by

Table checks: char_length(description) <= 2047; char_length(name) <= 255

security_scan_profiles_projects

5 cols · no RLS · line 31197View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
security_scan_profile_id bigintNOT NULLsecurity_scan_profiles.id 1:N · CASCADE

Indexes

  • (security_scan_profile_id) idx_security_scan_profiles_projects_on_security_scan_profile_id
  • UNIQUE (project_id, security_scan_profile_id) index_security_scan_profiles_projects_on_unique_project_profile

Referenced by

  • nothing

security_scans

12 cols · no RLS · line 31214View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
build_id bigintNOT NULL
scan_type smallintNOT NULL
info jsonbNOT NULLCAST('{}' AS jsonb)
project_id bigintnullCHECK project_id IS NOT NULL
pipeline_id bigintnull
latest booleanNOT NULLTRUE
status smallintNOT NULL0
findings_partition_number integerNOT NULL1
scanner_external_id textnullCHECK char_length(scanner_external_id) <= 255

Indexes

  • UNIQUE (build_id, scan_type, scanner_external_id) idx_security_scans_on_build_scan_type_and_scanner
  • (scan_type) idx_security_scans_on_scan_type
  • (scan_type, project_id, pipeline_id) WHERE status = 1 index_for_security_scans_scan_type
  • (created_at, id) WHERE status <> 6 index_security_scans_for_non_purged_records
  • (created_at) index_security_scans_on_created_at
  • (date(timezone(CAST('UTC' AS text), created_at)), id) index_security_scans_on_date_created_at_and_id
  • (pipeline_id, jsonb_array_length(COALESCE(info -> CAST('errors' AS text), CAST('[]' AS jsonb)))) index_security_scans_on_length_of_errors
  • (pipeline_id, jsonb_array_length(COALESCE(info -> CAST('warnings' AS text), CAST('[]' AS jsonb)))) index_security_scans_on_length_of_warnings
  • (pipeline_id, scan_type) index_security_scans_on_pipeline_id_and_scan_type
  • (project_id) index_security_scans_on_project_id

Referenced by

Table checks: project_id IS NOT NULL; char_length(scanner_external_id) <= 255

security_scheduled_pipeline_execution_policy_test_runs

8 cols · no RLS · line 31240View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
security_policy_id bigintNOT NULLsecurity_policies.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
pipeline_id bigintnull
error_message textnullCHECK char_length(error_message) <= 255
state smallintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (state, created_at) WHERE state = ANY(ARRAY[0, 3]) idx_spep_test_runs_on_state_and_created_at_for_stale
  • UNIQUE (pipeline_id) WHERE pipeline_id IS NOT NULL idx_spep_test_runs_pipeline_id_unique
  • (security_policy_id) idx_spep_test_runs_policy_id
  • (project_id) idx_spep_test_runs_project_id

Referenced by

  • nothing

Table checks: char_length(error_message) <= 255

security_trainings

7 cols · no RLS · line 31261View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
provider_id bigintnull
is_primary booleanNOT NULLFALSE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
training_provider_id bigintNOT NULL0

Indexes

  • (project_id) index_security_trainings_on_project_id
  • (provider_id) index_security_trainings_on_provider_id
  • UNIQUE (project_id) WHERE …(is_primary) index_security_trainings_on_unique_project_id

Referenced by

  • nothing

user 27 tables

Tables whose names start with user_.

Entity-relationship diagram: user_audit_events, user_achievements, user_admin_roles, user_agent_details, user_broadcast_message_dismissals, user_callouts, user_credit_card_validations, user_custom_attributes, user_details, user_follow_users, user_group_callouts, user_group_member_roles, user_highest_roles, user_member_roles, user_namespace_callouts, user_permission_export_upload_upload_states, user_permission_export_upload_uploads, user_permission_export_uploads, user_phone_number_validations, user_preferences, user_project_callouts, user_project_member_roles, user_saved_views, user_statuses, user_synced_attributes_metadata, user_upload_states, user_uploadsuser_audit_eventsid PKbigintcreated_at PKtimestamptzuser_idbigintauthor_idbiginttarget_idbigintevent_nametextdetailstextip_addressinetauthor_nametextentity_pathtexttarget_detailstexttarget_typetextuser_achievementsid PKbigintachievement_id FKbigintuser_id FKbigintawarded_by_user_id FKbigintrevoked_by_user_id FKbigintcreated_attimestamptzupdated_attimestamptzrevoked_attimestamptzpriorityintegernamespace_id FKbigintshow_on_profilebooleanaward_messagetextaward_message_htmltextcached_markdown_versionintegeruser_admin_rolesuser_id PKbigintadmin_role_id FKbigintcreated_attimestamptzupdated_attimestamptzldapbooleanuser_agent_detailsid PKbigintuser_agentvarcharip_addressvarcharsubject_idbigintsubject_typevarcharsubmittedbooleancreated_attimestampupdated_attimestamporganization_id FKbigintuser_broadcast_message_dismissalsid PKbigintuser_id FKbigintbroadcast_message_id FKbigintexpires_attimestamptzcreated_attimestamptzupdated_attimestamptzuser_calloutsid PKbigintfeature_nameintegeruser_id FKbigintdismissed_attimestamptzuser_credit_card_validationsuser_id PKbigintcredit_card_validated_attimestamptzlast_digits_hashtextholder_name_hashtextexpiration_date_hashtextnetwork_hashtextzuora_payment_method_xidtextstripe_setup_intent_xidtextstripe_payment_method_xidtextstripe_card_fingerprinttextuser_custom_attributesid PKbigintcreated_attimestampupdated_attimestampuser_id FKbigintkeyvarcharvaluevarcharuser_detailsuser_id PKbigintjob_titlevarchar(200)biovarchar(255)webauthn_xidtextprovisioned_by_group_idbigintpronounstextpronunciationtextphonetextlinkedintexttwittertextwebsite_urltextlocationtextpassword_last_changed_attimestamptzdiscordtextenterprise_group_idbigintenterprise_group_associated_attimestamptzemail_reset_offered_attimestamptzmastodontextproject_authorizations_recalculated_attimestamptzonboarding_statusjsonbblueskytextbot_namespace_id FKbigintorcidtextgithubtextemail_otptextemail_otp_last_sent_totextemail_otp_last_sent_attimestamptzemail_otp_required_aftertimestamptzcompanytextprovisioned_by_project_idbigintuser_follow_usersfollower_id PKbigintfollowee_id PKbigintuser_group_calloutsid PKbigintuser_id FKbigintgroup_id FKbigintfeature_namesmallintdismissed_attimestamptzuser_group_member_rolesid PKbigintuser_id FKbigintgroup_id FKbigintshared_with_group_id FKbigintmember_role_id FKbigintcreated_attimestamptzupdated_attimestamptzuser_highest_rolesuser_id PKbigintupdated_attimestamptzhighest_access_levelintegeruser_member_rolesid PKbigintuser_id FKbigintmember_role_id FKbigintcreated_attimestamptzupdated_attimestamptzldapbooleanuser_namespace_calloutsid PKbigintuser_id FKbigintnamespace_id FKbigintdismissed_attimestamptzfeature_namesmallintuser_permission_export_upload_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzuser_permission_export_upload_upload_id FKbigintuploaded_by_user_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextuser_permission_export_upload_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextuser_permission_export_uploadsid PKbigintcreated_attimestamptzupdated_attimestamptzuser_id FKbigintfile_storeintegerstatussmallintfiletextuser_phone_number_validationsuser_id PKbigintvalidated_attimestamptzcreated_attimestamptzupdated_attimestamptzinternational_dial_codesmallintverification_attemptssmallintrisk_scoresmallintcountrytextphone_numbertexttelesign_reference_xidtextsms_sent_attimestamptzsms_send_countsmallintuser_preferencesid PKbigintuser_id FKbigintissue_notes_filtersmallintmerge_request_notes_filtersmallintcreated_attimestamptzupdated_attimestamptzepics_sortvarcharroadmap_epics_stateintegerepic_notes_filtersmallintissues_sortvarcharmerge_requests_sortvarcharroadmaps_sortvarcharfirst_day_of_weekintegertimezonevarchartime_display_relativebooleanprojects_sortvarchar(64)show_whitespace_in_diffsbooleansourcegraph_enabledbooleansetup_for_companybooleanrender_whitespace_in_codebooleantab_widthsmallintview_diffs_file_by_filebooleangitpod_enabledbooleanmarkdown_surround_selectionbooleandiffs_deletion_colortextdiffs_addition_colortextmarkdown_automatic_listsbooleanuse_new_navigationbooleanachievements_enabledbooleanpinned_nav_itemsjsonbpass_user_identities_to_ci_jwtbooleanenabled_followingbooleanvisibility_pipeline_id_typesmallintproject_shortcut_buttonsbooleanenabled_zoektbooleankeyboard_shortcuts_enabledbooleantime_display_formatsmallintearly_access_program_participantbooleanearly_access_program_trackingbooleanextensions_marketplace_opt_in_statussmallintorganization_groups_projects_sorttextorganization_groups_projects_displaysmallintdpop_enabledbooleanuse_work_items_viewbooleantext_editor_typesmallintmerge_request_dashboard_list_typesmallintextensions_marketplace_opt_in_urltextdark_color_scheme_idsmallintwork_items_display_settingsjsonbdefault_duo_add_on_assignment_id FKbigintmarkdown_maintain_indentationbooleanmerge_request_dashboard_show_draftsbooleanduo_default_namespace_id FKbigintpolicy_advanced_editorbooleanearly_access_studio_participantbooleanwiki_use_auto_commit_messagebooleanorbit_settingsjsonbknowledge_graph_governing_namespace_id FKbigintuser_project_calloutsid PKbigintuser_id FKbigintproject_id FKbigintfeature_namesmallintdismissed_attimestamptzuser_project_member_rolesid PKbigintcreated_attimestamptzupdated_attimestamptzuser_id FKbigintproject_id FKbigintshared_with_group_id FKbigintmember_role_id FKbigintuser_saved_viewsid PKbigintuser_id FKbigintsaved_view_id FKbigintnamespace_id FKbigintrelative_positionintegeruser_statusesuser_id PKbigintcached_markdown_versionintegeremojivarcharmessagevarchar(100)message_htmlvarcharavailabilitysmallintclear_status_attimestamptzuser_synced_attributes_metadataid PKbigintname_syncedbooleanemail_syncedbooleanlocation_syncedbooleanuser_id FKbigintprovidervarcharorganization_syncedbooleanjob_title_syncedbooleanuser_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzuser_upload_id FKbigintorganization_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextuser_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextachievementsadmin_rolesbroadcast_messagesmember_rolesnamespacesorganizationsprojectssaved_viewssubscription_user_add_on_assignmentsusersnamespace_iduser_idawarded_by_user_idrevoked_by_user_idachievement_iduser_idadmin_role_idorganization_iduser_idbroadcast_message_iduser_iduser_iduser_idbot_namespace_iduser_idfollowee_idfollower_idgroup_iduser_idmember_role_iduser_idgroup_idshared_with_group_iduser_iduser_idmember_role_idnamespace_iduser_iduser_permission_export_upload_upload_iduploaded_by_user_iduser_iduser_iddefault_duo_add_on_assignment_idduo_default_namespace_idknowledge_graph_governing_namespace_iduser_idproject_iduser_idproject_idmember_role_idshared_with_group_iduser_idnamespace_idsaved_view_iduser_iduser_iduser_idorganization_iduser_upload_id

Relationships

user_audit_events

12 cols · no RLS · line 7119View in 3D
  • Polymorphic reference without referential integrity target_type, target_idtarget_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • Isolated tableuser_audit_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('audit_events_id_seq' AS regclass))
created_at PKtimestamptzNOT NULL
user_id bigintNOT NULL
author_id bigintNOT NULL
target_id bigintnull
event_name textnullCHECK char_length(event_name) <= 255
details textnull
ip_address inetnull
author_name textnullCHECK char_length(author_name) <= 255
entity_path textnullCHECK char_length(entity_path) <= 5500
target_details textnullCHECK char_length(target_details) <= 5500
target_type textnullCHECK char_length(target_type) <= 255

Indexes

  • (author_id, created_at, id) idx_user_audit_events_on_author_id_created_at_id
  • (user_id, created_at, id) idx_user_audit_events_on_project_created_at_id
  • (user_id, author_id, created_at, id) idx_user_audit_events_on_user_id_author_created_at_id

Referenced by

  • nothing

Table checks: char_length(author_name) <= 255; char_length(entity_path) <= 5500; char_length(event_name) <= 255; char_length(target_details) <= 5500; char_length(target_type) <= 255

user_achievements

14 cols · no RLS · line 32488View in 3D
  • Nullable foreign key namespace_iduser_achievements.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key awarded_by_user_iduser_achievements.awarded_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key revoked_by_user_iduser_achievements.revoked_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK namespace_id, awarded_by_user_id, revoked_by_user_iduser_achievements has several nullable FKs (namespace_id, awarded_by_user_id, revoked_by_user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
achievement_id bigintNOT NULLachievements.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
awarded_by_user_id bigintnullusers.id 1:N · SET NULL
revoked_by_user_id bigintnullusers.id 1:N · SET NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
revoked_at timestamptznull
priority integernull
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL
show_on_profile booleanNOT NULLFALSE
award_message textnullCHECK char_length(award_message) <= 200
award_message_html textnull
cached_markdown_version integernull

Indexes

  • (achievement_id, revoked_by_user_id IS NULL) index_user_achievements_on_achievement_id_revoked_by_is_null
  • (awarded_by_user_id, revoked_by_user_id IS NULL) index_user_achievements_on_awarded_by_revoked_by_is_null
  • (namespace_id) index_user_achievements_on_namespace_id
  • (revoked_by_user_id) index_user_achievements_on_revoked_by_user_id
  • (user_id, revoked_by_user_id IS NULL) index_user_achievements_on_user_id_revoked_by_is_null

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL; char_length(award_message) <= 200

user_admin_roles

5 cols · no RLS · line 32516View in 3D
  • Junction table allows duplicate links admin_role_id, user_iduser_admin_roles looks like a many-to-many link table but has no unique constraint across (admin_role_id, user_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
user_id PKbigintNOT NULLusers.id 1:1 · CASCADE
admin_role_id bigintNOT NULLadmin_roles.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
ldap booleanNOT NULLFALSE

Indexes

  • (admin_role_id) index_user_admin_roles_on_admin_role_id

Referenced by

  • nothing

user_agent_details

9 cols · no RLS · line 32524View in 3D
  • Nullable foreign key organization_iduser_agent_details.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK subject_typesubject_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity subject_type, subject_idsubject_id points at different tables depending on subject_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_agent varcharNOT NULL
ip_address varcharNOT NULL
subject_id bigintNOT NULL
subject_type varcharNOT NULL
submitted booleanNOT NULLFALSE
created_at timestampNOT NULL
updated_at timestampNOT NULL
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • (organization_id) index_user_agent_details_on_organization_id
  • (subject_id, subject_type) index_user_agent_details_on_subject_id_and_subject_type

Referenced by

  • nothing

Table checks: organization_id IS NOT NULL

user_broadcast_message_dismissals

6 cols · no RLS · line 32546View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
broadcast_message_id bigintNOT NULLbroadcast_messages.id 1:N · CASCADE
expires_at timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (user_id, broadcast_message_id) index_broadcast_dismissals_on_user_id_and_broadcast_message_id
  • (broadcast_message_id) index_user_broadcast_message_dismissals_on_broadcast_message_id

Referenced by

  • nothing

user_callouts

4 cols · no RLS · line 32564View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
feature_name integerNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
dismissed_at timestamptznull

Indexes

  • UNIQUE (user_id, feature_name) index_user_callouts_on_user_id_and_feature_name

Referenced by

  • nothing

user_credit_card_validations

10 cols · no RLS · line 32580View in 3D
ColumnTypeNullDefaultReferencesNotes
user_id PKbigintNOT NULLusers.id 1:1 · CASCADE
credit_card_validated_at timestamptzNOT NULL
last_digits_hash textnullCHECK char_length(last_digits_hash) <= 44
holder_name_hash textnullCHECK char_length(holder_name_hash) <= 44
expiration_date_hash textnullCHECK char_length(expiration_date_hash) <= 44
network_hash textnullCHECK char_length(network_hash) <= 44
zuora_payment_method_xid textnullCHECK char_length(zuora_payment_method_xid) <= 50
stripe_setup_intent_xid textnullCHECK char_length(stripe_setup_intent_xid) <= 255
stripe_payment_method_xid textnullCHECK char_length(stripe_payment_method_xid) <= 255
stripe_card_fingerprint textnullCHECK char_length(stripe_card_fingerprint) <= 255

Indexes

  • (holder_name_hash) idx_user_credit_card_validations_on_holder_name_hash
  • (expiration_date_hash, last_digits_hash, network_hash, credit_card_validated_at) idx_user_credit_card_validations_on_similar_to_meta_data
  • (stripe_card_fingerprint) index_user_credit_card_validations_on_stripe_card_fingerprint
  • UNIQUE (zuora_payment_method_xid) WHERE zuora_payment_method_xid IS NOT NULL unique_index_for_credit_card_validation_payment_method_xid

Referenced by

  • nothing

Table checks: char_length(stripe_payment_method_xid) <= 255; char_length(stripe_card_fingerprint) <= 255; char_length(stripe_setup_intent_xid) <= 255; char_length(network_hash) <= 44; char_length(expiration_date_hash) <= 44; char_length(zuora_payment_method_xid) <= 50; char_length(holder_name_hash) <= 44; char_length(last_digits_hash) <= 44

user_custom_attributes

6 cols · no RLS · line 32601View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestampNOT NULL
updated_at timestampNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
key varcharNOT NULL
value varcharNOT NULL

Indexes

  • (key, updated_at) index_key_updated_at_on_user_custom_attribute
  • (key, value) index_user_custom_attributes_on_key_and_value
  • UNIQUE (user_id, key) index_user_custom_attributes_on_user_id_and_key

Referenced by

  • nothing

user_details

30 cols · no RLS · line 32619View in 3D
  • Nullable foreign key bot_namespace_iduser_details.bot_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Wide table (30 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
user_id PKbigintNOT NULLusers.id 1:1 · CASCADE
job_title varchar(200)NOT NULLCAST('' AS varchar)
bio varchar(255)NOT NULLCAST('' AS varchar)
webauthn_xid textnullCHECK char_length(webauthn_xid) <= 100
provisioned_by_group_id bigintnull
pronouns textnullCHECK char_length(pronouns) <= 50
pronunciation textnullCHECK char_length(pronunciation) <= 255
phone textnullJiHu-specific columnCHECK char_length(phone) <= 50
linkedin textNOT NULLCAST('' AS text)CHECK char_length(linkedin) <= 500
twitter textNOT NULLCAST('' AS text)CHECK char_length(twitter) <= 500
website_url textNOT NULLCAST('' AS text)CHECK char_length(website_url) <= 500
location textNOT NULLCAST('' AS text)CHECK char_length(location) <= 500
password_last_changed_at timestamptzNOT NULLnow()JiHu-specific column
discord textNOT NULLCAST('' AS text)CHECK char_length(discord) <= 500
enterprise_group_id bigintnull
enterprise_group_associated_at timestamptznull
email_reset_offered_at timestamptznull
mastodon textNOT NULLCAST('' AS text)CHECK char_length(mastodon) <= 500
project_authorizations_recalculated_at timestamptzNOT NULLCAST('2010-01-01 00:00:00+00' AS timestamptz)
onboarding_status jsonbNOT NULLCAST('{}' AS jsonb)
bluesky textNOT NULLCAST('' AS text)CHECK char_length(bluesky) <= 256
bot_namespace_id bigintnullnamespaces.id 1:N · SET NULL
orcid textNOT NULLCAST('' AS text)CHECK char_length(orcid) <= 256
github textNOT NULLCAST('' AS text)CHECK char_length(github) <= 500
email_otp textnullSHA256 hash (64 hex characters)CHECK char_length(email_otp) <= 64
email_otp_last_sent_to textnullCHECK char_length(email_otp_last_sent_to) <= 511
email_otp_last_sent_at timestamptznull
email_otp_required_after timestamptznull
company textNOT NULLCAST('' AS text)CHECK char_length(company) <= 500
provisioned_by_project_id bigintnull

Indexes

  • (provisioned_by_group_id, user_id) idx_user_details_on_provisioned_by_group_id_user_id
  • (bot_namespace_id) index_user_details_on_bot_namespace_id
  • (enterprise_group_id, user_id) index_user_details_on_enterprise_group_id_and_user_id
  • (password_last_changed_at) index_user_details_on_password_last_changed_at
  • UNIQUE (phone) WHERE phone IS NOT NULL index_user_details_on_phone
  • (provisioned_by_project_id) index_user_details_on_provisioned_by_project_id
  • UNIQUE (user_id) index_user_details_on_user_id

Referenced by

  • nothing

Table checks: char_length(bluesky) <= 256; char_length(webauthn_xid) <= 100; char_length(twitter) <= 500; char_length(email_otp_last_sent_to) <= 511; char_length(discord) <= 500; char_length(linkedin) <= 500; char_length(website_url) <= 500; char_length(location) <= 500; char_length(orcid) <= 256; char_length(phone) <= 50; char_length(github) <= 500; char_length(email_otp) <= 64; char_length(pronouns) <= 50; char_length(mastodon) <= 500; char_length(pronunciation) <= 255; num_nonnulls(provisioned_by_group_id, provisioned_by_project_id) <= 1; char_length(company) <= 500

user_follow_users

2 cols · no RLS · line 32683View in 3D
ColumnTypeNullDefaultReferencesNotes
follower_id PKbigintNOT NULLusers.id 1:N · CASCADE
followee_id PKbigintNOT NULLusers.id 1:N · CASCADE

Indexes

  • (followee_id) user_follow_users_followee_id_idx

Referenced by

  • nothing

user_group_callouts

5 cols · no RLS · line 32688View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
feature_name smallintNOT NULL
dismissed_at timestamptznull

Indexes

  • UNIQUE (user_id, feature_name, group_id) index_group_user_callouts_feature
  • (group_id) index_user_group_callouts_on_group_id

Referenced by

  • nothing

user_group_member_roles

7 cols · no RLS · line 32705View in 3D
  • Nullable foreign key shared_with_group_iduser_group_member_roles.shared_with_group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
shared_with_group_id bigintnullnamespaces.id 1:N · CASCADE
member_role_id bigintNOT NULLmember_roles.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (group_id) index_user_group_member_roles_on_group_id
  • (member_role_id) index_user_group_member_roles_on_member_role_id
  • (shared_with_group_id) index_user_group_member_roles_on_shared_with_group_id
  • (user_id) index_user_group_member_roles_on_user_id
  • UNIQUE (user_id, group_id) WHERE shared_with_group_id IS NULL unique_user_group_member_roles_user_group
  • UNIQUE (user_id, group_id, shared_with_group_id) WHERE shared_with_group_id IS NOT NULL unique_user_group_member_roles_user_group_shared_with_group

Referenced by

  • nothing

user_highest_roles

3 cols · no RLS · line 32724View in 3D
ColumnTypeNullDefaultReferencesNotes
user_id PKbigintNOT NULLusers.id 1:1 · CASCADE
updated_at timestamptzNOT NULL
highest_access_level integernull

Indexes

  • (user_id, highest_access_level) index_user_highest_roles_on_user_id_and_highest_access_level

Referenced by

  • nothing

user_member_roles

6 cols · no RLS · line 32730View in 3D
  • Junction table allows duplicate links member_role_id, user_iduser_member_roles looks like a many-to-many link table but has no unique constraint across (member_role_id, user_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:1 · CASCADE
member_role_id bigintNOT NULLmember_roles.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
ldap booleanNOT NULLFALSE

Indexes

  • (member_role_id) idx_user_member_roles_on_member_role_id
  • UNIQUE (user_id) idx_user_member_roles_on_user_id_unique

Referenced by

  • nothing

user_namespace_callouts

5 cols · no RLS · line 32748View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
dismissed_at timestamptznull
feature_name smallintNOT NULL

Indexes

  • UNIQUE (user_id, feature_name, namespace_id) index_ns_user_callouts_feature
  • (namespace_id) index_user_namespace_callouts_on_namespace_id

Referenced by

  • nothing

user_permission_export_upload_upload_states

10 cols · no RLS · line 32765View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
user_permission_export_upload_upload_id bigintNOT NULLuser_permission_export_upload_uploads.id 1:1 · CASCADE
uploaded_by_user_id bigintNOT NULLusers.id 1:N · SET NULL
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_user_permission_export_upload_states_failed_verification
  • (user_permission_export_upload_upload_id) WHERE verification_state = 0 OR verification_state = 3 idx_user_permission_export_upload_states_needs_verification_id
  • UNIQUE (user_permission_export_upload_upload_id) idx_user_permission_export_upload_states_on_upe_upload_id
  • (uploaded_by_user_id) idx_user_permission_export_upload_states_on_uploaded_by_user_id
  • (verification_state) idx_user_permission_export_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_user_permission_export_upload_states_pending_verification
  • (user_permission_export_upload_upload_id, verification_started_at) WHERE verification_state = 1 idx_user_permission_export_upload_states_verification_started

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

user_permission_export_upload_uploads

16 cols · no RLS · line 32788View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnullCHECK uploaded_by_user_id IS NOT NULL
organization_id bigintnull
namespace_id bigintnull
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • UNIQUE (id) idx_user_permission_export_upload_uploads_on_id
  • (model_id, model_type, uploader, created_at) user_permission_export_upload_model_id_model_type_uploader__idx
  • (checksum) user_permission_export_upload_uploads_checksum_idx
  • (namespace_id) user_permission_export_upload_uploads_namespace_id_idx
  • (organization_id) user_permission_export_upload_uploads_organization_id_idx
  • (project_id) user_permission_export_upload_uploads_project_id_idx
  • (store) user_permission_export_upload_uploads_store_idx
  • (uploaded_by_user_id) user_permission_export_upload_uploads_uploaded_by_user_id_idx
  • (uploader, path) user_permission_export_upload_uploads_uploader_path_idx

Referenced by

Table checks: char_length(path) <= 511; uploaded_by_user_id IS NOT NULL; char_length(checksum) <= 64

user_permission_export_uploads

7 cols · no RLS · line 32810View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
file_store integernull
status smallintNOT NULL0
file textnullCHECK char_length(file) <= 255

Indexes

  • (user_id, status) index_user_permission_export_uploads_on_user_id_and_status

Referenced by

  • nothing

Table checks: char_length(file) <= 255

user_phone_number_validations

12 cols · no RLS · line 32830View in 3D
ColumnTypeNullDefaultReferencesNotes
user_id PKbigintNOT NULLusers.id 1:1 · CASCADE
validated_at timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
international_dial_code smallintNOT NULL
verification_attempts smallintNOT NULL0
risk_score smallintNOT NULL0
country textNOT NULLCHECK char_length(country) <= 3
phone_number textNOT NULLCHECK char_length(phone_number) <= 12
telesign_reference_xid textnullCHECK char_length(telesign_reference_xid) <= 255
sms_sent_at timestamptznull
sms_send_count smallintNOT NULL0

Indexes

  • (telesign_reference_xid) index_user_phone_number_validations_on_telesign_reference_xid
  • (international_dial_code, phone_number) index_user_phone_validations_on_dial_code_phone_number

Referenced by

  • nothing

Table checks: char_length(country) <= 3; char_length(phone_number) <= 12; char_length(telesign_reference_xid) <= 255

user_preferences

58 cols · no RLS · line 32848View in 3D
  • Nullable foreign key default_duo_add_on_assignment_iduser_preferences.default_duo_add_on_assignment_id may be NULL, so the relationship to subscription_user_add_on_assignments is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key duo_default_namespace_iduser_preferences.duo_default_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key knowledge_graph_governing_namespace_iduser_preferences.knowledge_graph_governing_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK default_duo_add_on_assignment_id, duo_default_namespace_id, knowledge_graph_governing_namespace_iduser_preferences has several nullable FKs (default_duo_add_on_assignment_id, duo_default_namespace_id, knowledge_graph_governing_namespace_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • Wide table (58 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:1 · CASCADE
issue_notes_filter smallintNOT NULL0
merge_request_notes_filter smallintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
epics_sort varcharnull
roadmap_epics_state integernull
epic_notes_filter smallintNOT NULL0
issues_sort varcharnull
merge_requests_sort varcharnull
roadmaps_sort varcharnull
first_day_of_week integernull
timezone varcharnull
time_display_relative booleannullTRUECHECK time_display_relative IS NOT NULL
projects_sort varchar(64)null
show_whitespace_in_diffs booleanNOT NULLTRUE
sourcegraph_enabled booleannull
setup_for_company booleannull
render_whitespace_in_code booleannullFALSECHECK render_whitespace_in_code IS NOT NULL
tab_width smallintnull8CHECK tab_width IS NOT NULL
view_diffs_file_by_file booleanNOT NULLFALSE
gitpod_enabled booleanNOT NULLFALSE
markdown_surround_selection booleanNOT NULLTRUE
diffs_deletion_color textnullCHECK char_length(diffs_deletion_color) <= 7
diffs_addition_color textnullCHECK char_length(diffs_addition_color) <= 7
markdown_automatic_lists booleanNOT NULLTRUE
use_new_navigation booleannull
achievements_enabled booleanNOT NULLTRUE
pinned_nav_items jsonbNOT NULLCAST('{}' AS jsonb)
pass_user_identities_to_ci_jwt booleanNOT NULLFALSE
enabled_following booleanNOT NULLTRUE
visibility_pipeline_id_type smallintNOT NULL0
project_shortcut_buttons booleanNOT NULLTRUE
enabled_zoekt booleanNOT NULLTRUE
keyboard_shortcuts_enabled booleanNOT NULLTRUE
time_display_format smallintNOT NULL0
early_access_program_participant booleanNOT NULLFALSE
early_access_program_tracking booleanNOT NULLFALSE
extensions_marketplace_opt_in_status smallintNOT NULL0
organization_groups_projects_sort textnullCHECK char_length(organization_groups_projects_sort) <= 64
organization_groups_projects_display smallintNOT NULL1
dpop_enabled booleanNOT NULLFALSE
use_work_items_view booleanNOT NULLFALSE
text_editor_type smallintNOT NULL2
merge_request_dashboard_list_type smallintNOT NULL0
extensions_marketplace_opt_in_url textnullCHECK char_length(extensions_marketplace_opt_in_url) <= 512
dark_color_scheme_id smallintnull
work_items_display_settings jsonbNOT NULLCAST('{}' AS jsonb)
default_duo_add_on_assignment_id bigintnullsubscription_user_add_on_assignments.id 1:1 · SET NULL
markdown_maintain_indentation booleanNOT NULLFALSE
merge_request_dashboard_show_drafts booleanNOT NULLTRUE
duo_default_namespace_id bigintnullnamespaces.id 1:N · SET NULL
policy_advanced_editor booleanNOT NULLFALSE
early_access_studio_participant booleanNOT NULLFALSE
wiki_use_auto_commit_message booleanNOT NULLFALSE
orbit_settings jsonbNOT NULLCAST('{}' AS jsonb)
knowledge_graph_governing_namespace_id bigintnullnamespaces.id 1:N · SET NULL

Indexes

  • UNIQUE (default_duo_add_on_assignment_id) add_default_user_assignment_to_user_preferences
  • (knowledge_graph_governing_namespace_id) idx_user_preferences_on_knowledge_graph_governing_namespace_id
  • (duo_default_namespace_id) index_user_preferences_on_duo_default_namespace_id
  • (gitpod_enabled) index_user_preferences_on_gitpod_enabled
  • (policy_advanced_editor) WHERE policy_advanced_editor = TRUE index_user_preferences_on_policy_advanced_editor
  • UNIQUE (user_id) index_user_preferences_on_user_id

Referenced by

  • nothing

Table checks: time_display_relative IS NOT NULL; char_length(diffs_deletion_color) <= 7; char_length(extensions_marketplace_opt_in_url) <= 512; char_length(organization_groups_projects_sort) <= 64; render_whitespace_in_code IS NOT NULL; char_length(diffs_addition_color) <= 7; tab_width IS NOT NULL

user_project_callouts

5 cols · no RLS · line 32925View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
feature_name smallintNOT NULL
dismissed_at timestamptznull

Indexes

  • UNIQUE (user_id, feature_name, project_id) index_project_user_callouts_feature
  • (project_id) index_user_project_callouts_on_project_id

Referenced by

  • nothing

user_project_member_roles

7 cols · no RLS · line 32942View in 3D
  • Nullable foreign key shared_with_group_iduser_project_member_roles.shared_with_group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
shared_with_group_id bigintnullnamespaces.id 1:N · CASCADE
member_role_id bigintNOT NULLmember_roles.id 1:N · CASCADE

Indexes

  • (member_role_id) index_user_project_member_roles_on_member_role_id
  • (project_id) index_user_project_member_roles_on_project_id
  • (shared_with_group_id) index_user_project_member_roles_on_shared_with_group_id
  • (user_id) index_user_project_member_roles_on_user_id
  • UNIQUE (user_id, project_id, shared_with_group_id) WHERE shared_with_group_id IS NOT NULL uniq_user_project_member_roles_user_project_shared_with_group

Referenced by

  • nothing

user_saved_views

5 cols · no RLS · line 32961View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
saved_view_id bigintNOT NULLsaved_views.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
relative_position integernull

Indexes

  • (namespace_id, user_id) index_user_saved_views_on_namespace_and_user
  • (relative_position) index_user_saved_views_on_relative_position
  • (saved_view_id) index_user_saved_views_on_saved_view_id
  • UNIQUE (user_id, saved_view_id) index_user_saved_views_on_user_id_and_saved_view_id

Referenced by

  • nothing

user_statuses

7 cols · no RLS · line 32978View in 3D
ColumnTypeNullDefaultReferencesNotes
user_id PKbigintNOT NULLusers.id 1:1 · CASCADE
cached_markdown_version integernull
emoji varcharNOT NULLCAST('speech_balloon' AS varchar)
message varchar(100)null
message_html varcharnull
availability smallintNOT NULL0
clear_status_at timestamptznull

Indexes

  • (clear_status_at) WHERE clear_status_at IS NOT NULL index_user_statuses_on_clear_status_at_not_null
  • (user_id) index_user_statuses_on_user_id

Referenced by

  • nothing

user_synced_attributes_metadata

8 cols · no RLS · line 32988View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name_synced booleannullFALSE
email_synced booleannullFALSE
location_synced booleannullFALSE
user_id bigintNOT NULLusers.id 1:1 · CASCADE
provider varcharnull
organization_synced booleannullFALSE
job_title_synced booleannullFALSE

Indexes

  • UNIQUE (user_id) index_user_synced_attributes_metadata_on_user_id

Referenced by

  • nothing

user_upload_states

10 cols · no RLS · line 33008View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
user_upload_id bigintNOT NULLuser_uploads.id 1:1 · CASCADE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_user_upload_states_failed_verification
  • (user_upload_id) WHERE verification_state = 0 OR verification_state = 3 index_user_upload_states_needs_verification_id
  • (organization_id) index_user_upload_states_on_organization_id
  • UNIQUE (user_upload_id) index_user_upload_states_on_user_upload_id
  • (user_upload_id, verification_started_at) WHERE verification_state = 1 index_user_upload_states_on_verification_started
  • (verification_state) index_user_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_user_upload_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

user_uploads

16 cols · no RLS · line 33031View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnullCHECK organization_id IS NOT NULL
namespace_id bigintnull
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • UNIQUE (id) index_user_uploads_on_id
  • (checksum) user_uploads_checksum_idx
  • (model_id, model_type, uploader, created_at) user_uploads_model_id_model_type_uploader_created_at_idx
  • (namespace_id) user_uploads_namespace_id_idx
  • (organization_id) user_uploads_organization_id_idx
  • (project_id) user_uploads_project_id_idx
  • (store) user_uploads_store_idx
  • (uploaded_by_user_id) user_uploads_uploaded_by_user_id_idx
  • (uploader, path) user_uploads_uploader_path_idx

Referenced by

Table checks: char_length(path) <= 511; char_length(checksum) <= 64; organization_id IS NOT NULL

value 2 tables

Tables whose names start with value_.

Entity-relationship diagram: value_stream_dashboard_counts, value_stream_dashboard_aggregationsvalue_stream_dashboard_countsid PKbigintnamespace_id PKbigintcount PKbigintrecorded_at PKtimestamptzmetric PKsmallintvalue_stream_dashboard_aggregationsnamespace_id PKbigintlast_run_attimestamptzenabledbooleannamespacesnamespace_id

Relationships

value_stream_dashboard_counts

5 cols · no RLS · line 7140View in 3D
  • Isolated tablevalue_stream_dashboard_counts references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id PKbigintNOT NULL
count PKbigintNOT NULL
recorded_at PKtimestamptzNOT NULL
metric PKsmallintNOT NULL

Indexes

  • none

Referenced by

  • nothing

value_stream_dashboard_aggregations

3 cols · no RLS · line 33128View in 3D
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
last_run_at timestamptznull
enabled booleanNOT NULLTRUE

Indexes

  • (last_run_at, namespace_id) WHERE …(enabled) index_on_value_stream_dashboard_aggregations_last_run_at_and_id

Referenced by

  • nothing

vulnerability 44 tables

Tables whose names start with vulnerability_.

Entity-relationship diagram: vulnerability_archive_exports, vulnerability_archived_records, vulnerability_archives, vulnerability_archive_export_upload_states, vulnerability_archive_export_uploads, vulnerability_detection_transitions, vulnerability_export_part_upload_states, vulnerability_export_part_uploads, vulnerability_export_parts, vulnerability_export_upload_states, vulnerability_export_uploads, vulnerability_exports, vulnerability_external_issue_links, vulnerability_feedback, vulnerability_finding_ascp_component_links, vulnerability_finding_due_dates, vulnerability_finding_evidences, vulnerability_finding_links, vulnerability_finding_risk_scores, vulnerability_finding_signatures, vulnerability_findings_remediations, vulnerability_flags, vulnerability_flip_guards, vulnerability_historical_statistics, vulnerability_identifiers, vulnerability_issue_links, vulnerability_management_policy_rules, vulnerability_merge_request_links, vulnerability_namespace_historical_statistics, vulnerability_namespace_statistics, vulnerability_occurrence_identifiers, vulnerability_occurrences, vulnerability_partial_scans, vulnerability_reads, vulnerability_remediation_upload_states, vulnerability_remediation_uploads, vulnerability_remediations, vulnerability_representation_information, vulnerability_scanners, vulnerability_severity_overrides, vulnerability_state_transitions, vulnerability_statistics, vulnerability_triggered_workflows, vulnerability_user_mentionsvulnerability_archive_exportsid PKbigintpartition_number PKbigintcreated_attimestamptzupdated_attimestamptzstarted_attimestamptzfinished_attimestamptzproject_idbigintauthor_idbigintdate_rangedaterangefile_storesmallintformatsmallintfiletextstatustextvulnerability_archived_recordscreated_attimestamptzupdated_attimestamptzid PKbigintdate PKdateproject_idbigintarchive_idbigintvulnerability_identifierbigintdatajsonbvulnerability_archivescreated_attimestamptzupdated_attimestamptzid PKbigintproject_idbigintarchived_records_countintegerdate PKdatevulnerability_archive_export_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzvulnerability_archive_export_upload_id FKbigintproject_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextvulnerability_archive_export_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextvulnerability_detection_transitionsid PKbigintvulnerability_occurrence_id FKbigintproject_idbigintcreated_attimestamptzupdated_attimestamptzdetectedbooleanvulnerability_export_part_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzvulnerability_export_part_upload_id FKbigintorganization_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextvulnerability_export_part_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextvulnerability_export_partsid PKbigintvulnerability_export_id FKbigintstart_idbigintend_idbigintorganization_idbigintfile_storeintegerfiletextcreated_attimestamptzupdated_attimestamptzvulnerability_export_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzvulnerability_export_upload_id FKbigintorganization_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextvulnerability_export_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextvulnerability_exportsid PKbigintcreated_attimestamptzupdated_attimestamptzstarted_attimestamptzfinished_attimestamptzstatusvarchar(255)filevarchar(255)project_idbigintauthor_idbigintfile_storeintegerformatsmallintgroup_idbigintorganization_idbigintexpires_attimestamptzsend_emailbooleanreport_datajsonbvulnerability_external_issue_linksid PKbigintcreated_attimestamptzupdated_attimestamptzauthor_idbigintvulnerability_id FKbigintlink_typesmallintexternal_typesmallintexternal_project_keytextexternal_issue_keytextproject_idbigintvulnerability_occurrence_id FKbigintvulnerability_feedbackid PKbigintcreated_attimestamptzupdated_attimestamptzfeedback_typesmallintcategorysmallintproject_idbigintauthor_idbigintissue_idbigintmerge_request_idbigintcomment_author_idbigintcommenttextcomment_timestamptimestamptzfinding_uuiduuiddismissal_reasonsmallintmigrated_to_state_transitionbooleanpipeline_idbigintvulnerability_finding_ascp_component_linksid PKbigintcreated_attimestamptzupdated_attimestamptzvulnerability_occurrence_id FKbigintascp_component_id FKbigintproject_idbigintvulnerability_finding_due_datesid PKbigintvulnerability_occurrence_id FKbigintdue_datedateproject_idbigintcreated_attimestamptzupdated_attimestamptzvulnerability_finding_evidencesid PKbigintcreated_attimestamptzupdated_attimestamptzvulnerability_occurrence_id FKbigintdatajsonbproject_idbigintvulnerability_finding_linksid PKbigintcreated_attimestamptzupdated_attimestamptzvulnerability_occurrence_id FKbigintnametexturltextproject_idbigintvulnerability_finding_risk_scoresfinding_id PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintrisk_scoredouble precisionvulnerability_finding_signaturesid PKbigintfinding_id FKbigintcreated_attimestamptzupdated_attimestamptzalgorithm_typesmallintsignature_shabyteaproject_idbigintvulnerability_findings_remediationsid PKbigintvulnerability_occurrence_id FKbigintvulnerability_remediation_id FKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintvulnerability_flagsid PKbigintcreated_attimestamptzupdated_attimestamptzvulnerability_occurrence_id FKbigintflag_typesmallintorigintextdescriptiontextproject_idbigintconfidence_scoredouble precisionworkflow_idbigintstatussmallintvulnerability_flip_guardsvulnerability_finding_id PKbigintproject_idbigintfirst_automatic_transition_attimestamptzautomated_transition_countsmallintis_guardedbooleanlast_automatic_transition_attimestamptzcreated_attimestamptzupdated_attimestamptzvulnerability_historical_statisticsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbiginttotalintegercriticalintegerhighintegermediumintegerlowintegerunknownintegerinfointegerdatedateletter_gradesmallintsecurity_project_tracked_context_idbigintvulnerability_identifiersid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintfingerprintbyteaexternal_typevarcharexternal_idvarcharnamevarcharurltextpartition_idbigintvulnerability_issue_linksid PKbigintvulnerability_id FKbigintissue_idbigintlink_typesmallintcreated_attimestamptzupdated_attimestamptzproject_idbigintvulnerability_occurrence_idbigintvulnerability_management_policy_rulesid PKbigintsecurity_policy_id FKbigintsecurity_policy_management_project_id FKbigintcreated_attimestamptzupdated_attimestamptzrule_indexsmallinttypesmallintcontentjsonbvulnerability_merge_request_linksid PKbigintvulnerability_id FKbigintmerge_request_idbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintvulnerability_occurrence_idbigintreadiness_scoredouble precisioncreated_by_ai_workflowbooleanvulnerability_namespace_historical_statisticsid PKbigintnamespace_idbigintcreated_attimestamptzupdated_attimestamptztraversal_idsbigint[]totalintegercriticalintegerhighintegermediumintegerlowintegerunknownintegerinfointegerdatedateletter_gradesmallintmigratingbooleanvulnerability_namespace_statisticsid PKbigintcreated_attimestamptzupdated_attimestamptznamespace_idbiginttotalintegercriticalintegerhighintegermediumintegerlowintegerunknownintegerinfointegertraversal_idsbigint[]vulnerability_occurrence_identifiersid PKbigintcreated_attimestamptzupdated_attimestamptzoccurrence_id FKbigintidentifier_id FKbigintproject_idbigintpartition_id FKbigintvulnerability_occurrencesid PKbigintcreated_attimestamptzupdated_attimestamptzseveritysmallintreport_typesmallintproject_idbigintscanner_id FKbigintprimary_identifier_id FKbigintlocation_fingerprintbyteanamevarcharmetadata_versionvarcharraw_metadatatextvulnerability_id FKbigintdetailsjsonbdescriptiontextsolutiontextcvetextlocationjsonbdetection_methodsmallintuuiduuidinitial_pipeline_idbigintlatest_pipeline_idbigintsecurity_project_tracked_context_idbigintdetected_attimestamptznew_uuiduuidpartition_id FKbigintvulnerability_partial_scanscreated_attimestamptzupdated_attimestamptzscan_id PKbigintproject_idbigintmodesmallintpipeline_idbigintscan_typesmallintvulnerability_readsid PKbigintvulnerability_id FKbigintproject_idbigintscanner_id FKbigintreport_typesmallintseveritysmallintstatesmallinthas_issuesbooleanresolved_on_default_branchbooleanuuiduuidlocation_imagetextcluster_agent_idtextcasted_cluster_agent_idbigintdismissal_reasonsmallinthas_merge_requestbooleanhas_remediationsbooleanowasp_top_10smallinttraversal_idsbigint[]archivedbooleanidentifier_namestext[]has_vulnerability_resolutionbooleanauto_resolvedbooleansecurity_project_tracked_context_idbigintvulnerability_occurrence_id FKbigintpartition_idbigintvulnerability_remediation_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzvulnerability_remediation_upload_id FKbigintproject_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextvulnerability_remediation_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextvulnerability_remediationsid PKbigintcreated_attimestamptzupdated_attimestamptzfile_storesmallintsummarytextfiletextchecksumbyteaproject_idbigintvulnerability_representation_informationcreated_attimestamptzupdated_attimestamptzvulnerability_id PKbigintproject_idbigintresolved_in_commit_shabyteavulnerability_occurrence_idbigintremoved_from_codebooleanvulnerability_scannersid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintexternal_idvarcharnamevarcharvendortextvulnerability_severity_overridesid PKbigintvulnerability_id FKbigintauthor_idbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintoriginal_severitysmallintnew_severitysmallintvulnerability_occurrence_idbigintsecurity_policy_idbiginttriggered_by_policybooleanvulnerability_state_transitionsid PKbigintvulnerability_id FKbigintto_statesmallintfrom_statesmallintcreated_attimestamptzupdated_attimestamptzauthor_idbigintcommenttextdismissal_reasonsmallintproject_idbigintvulnerability_occurrence_idbigintvulnerability_statisticsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbiginttotalintegercriticalintegerhighintegermediumintegerlowintegerunknownintegerinfointegerletter_gradesmallintlatest_pipeline_idbigintarchivedbooleantraversal_idsbigint[]security_project_tracked_context_idbigintvulnerability_triggered_workflowsid PKbigintcreated_attimestamptzupdated_attimestamptzvulnerability_occurrence_id FKbigintworkflow_idbigintproject_idbigintworkflow_namesmallintvulnerability_user_mentionsid PKbigintvulnerability_id FKbigintmentioned_users_idsbigint[]mentioned_projects_idsbigint[]mentioned_groups_idsbigint[]note_idbigintproject_idbigintvulnerability_occurrence_idbigintascp_componentsorganizationsprojectssecurity_policiessecurity_scansvulnerabilitiesvulnerability_archive_export_upload_idproject_idvulnerability_export_part_upload_idorganization_idvulnerability_export_idvulnerability_export_upload_idorganization_idvulnerability_idsecurity_policy_management_project_idsecurity_policy_idvulnerability_idvulnerability_idscanner_idpartition_id, primary_identifier_idscan_idproject_idvulnerability_remediation_upload_idvulnerability_idvulnerability_idvulnerability_idvulnerability_idvulnerability_occurrence_idvulnerability_occurrence_idvulnerability_idvulnerability_occurrence_idascp_component_idvulnerability_occurrence_idvulnerability_occurrence_idvulnerability_occurrence_idfinding_idfinding_idvulnerability_occurrence_idvulnerability_remediation_idvulnerability_occurrence_idvulnerability_finding_idpartition_id, identifier_idoccurrence_idvulnerability_occurrence_idvulnerability_idscanner_idvulnerability_occurrence_id

Relationships

vulnerability_archive_exports

13 cols · no RLS · line 7162View in 3D
  • Isolated tablevulnerability_archive_exports references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
partition_number PKbigintNOT NULL1
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
started_at timestamptznull
finished_at timestamptznull
project_id bigintNOT NULL
author_id bigintNOT NULL
date_range daterangeNOT NULL
file_store smallintnull
format smallintnull
file textnullCHECK char_length(file) <= 255
status textnullCHECK char_length(status) <= 8

Indexes

  • (author_id) index_vulnerability_archive_exports_on_author_id
  • (project_id) index_vulnerability_archive_exports_on_project_id
  • (status) index_vulnerability_archive_exports_on_status

Referenced by

  • nothing

Table checks: char_length(file) <= 255; char_length(status) <= 8

vulnerability_archived_records

8 cols · no RLS · line 7181View in 3D
  • Isolated tablevulnerability_archived_records references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
id PKbigintNOT NULL
date PKdateNOT NULL
project_id bigintNOT NULL
archive_id bigintNOT NULL
vulnerability_identifier bigintNOT NULL
data jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • UNIQUE (vulnerability_identifier, date, project_id) index_vuln_archived_records_on_unique_attrs_and_project_id
  • (archive_id, date) index_vulnerability_archived_records_on_archive_id_and_date
  • (archive_id, id) index_vulnerability_archived_records_on_archive_id_and_id
  • (project_id) index_vulnerability_archived_records_on_project_id

Referenced by

  • nothing

vulnerability_archives

6 cols · no RLS · line 7193View in 3D
  • Isolated tablevulnerability_archives references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
id PKbigintNOT NULL
project_id bigintNOT NULL
archived_records_count integerNOT NULL0CHECK archived_records_count >= 0
date PKdateNOT NULL

Indexes

  • UNIQUE (project_id, date) index_vulnerability_archives_on_project_id_and_date

Referenced by

  • nothing

Table checks: archived_records_count >= 0

vulnerability_archive_export_upload_states

10 cols · no RLS · line 33543View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
vulnerability_archive_export_upload_id bigintNOT NULLvulnerability_archive_export_uploads.id 1:1 · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_vae_upl_states_failed_verification
  • (vulnerability_archive_export_upload_id) WHERE verification_state = 0 OR verification_state = 3 idx_vae_upl_states_needs_verification_id
  • UNIQUE (vulnerability_archive_export_upload_id) idx_vae_upl_states_on_vae_upl_id
  • (vulnerability_archive_export_upload_id, verification_started_at) WHERE verification_state = 1 idx_vae_upl_states_on_verification_started
  • (verification_state) idx_vae_upl_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_vae_upl_states_pending_verification
  • (project_id) index_vulnerability_archive_export_upload_states_on_project_id

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

vulnerability_archive_export_uploads

16 cols · no RLS · line 33566View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnull
namespace_id bigintnull
project_id bigintnullCHECK project_id IS NOT NULL
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • UNIQUE (id) idx_vae_upl_on_id_unique
  • (model_id, model_type, uploader, created_at) vulnerability_archive_export__model_id_model_type_uploader__idx
  • (checksum) vulnerability_archive_export_uploads_checksum_idx
  • (namespace_id) vulnerability_archive_export_uploads_namespace_id_idx
  • (organization_id) vulnerability_archive_export_uploads_organization_id_idx
  • (project_id) vulnerability_archive_export_uploads_project_id_idx
  • (store) vulnerability_archive_export_uploads_store_idx
  • (uploaded_by_user_id) vulnerability_archive_export_uploads_uploaded_by_user_id_idx
  • (uploader, path) vulnerability_archive_export_uploads_uploader_path_idx

Referenced by

Table checks: char_length(path) <= 511; project_id IS NOT NULL; char_length(checksum) <= 64

vulnerability_detection_transitions

6 cols · no RLS · line 33615View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
vulnerability_occurrence_id bigintNOT NULLvulnerability_occurrences.id 1:N · CASCADE
project_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
detected booleanNOT NULLTRUE

Indexes

  • (vulnerability_occurrence_id, id) idx_vuln_detection_transitions_on_occurrence_id_id
  • (project_id) index_vulnerability_detection_transitions_on_project_id

Referenced by

  • nothing

vulnerability_export_part_upload_states

10 cols · no RLS · line 33633View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
vulnerability_export_part_upload_id bigintNOT NULLvulnerability_export_part_uploads.id 1:1 · CASCADE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_vep_upl_states_failed_verification
  • (vulnerability_export_part_upload_id) WHERE verification_state = 0 OR verification_state = 3 idx_vep_upl_states_needs_verification_id
  • (organization_id) idx_vep_upl_states_on_organization_id
  • UNIQUE (vulnerability_export_part_upload_id) idx_vep_upl_states_on_vep_upl_id
  • (vulnerability_export_part_upload_id, verification_started_at) WHERE verification_state = 1 idx_vep_upl_states_on_verification_started
  • (verification_state) idx_vep_upl_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_vep_upl_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

vulnerability_export_part_uploads

16 cols · no RLS · line 33656View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnullCHECK organization_id IS NOT NULL
namespace_id bigintnull
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • UNIQUE (id) idx_vep_upl_on_id_unique
  • (model_id, model_type, uploader, created_at) vulnerability_export_part_upl_model_id_model_type_uploader__idx
  • (checksum) vulnerability_export_part_uploads_checksum_idx
  • (namespace_id) vulnerability_export_part_uploads_namespace_id_idx
  • (organization_id) vulnerability_export_part_uploads_organization_id_idx
  • (project_id) vulnerability_export_part_uploads_project_id_idx
  • (store) vulnerability_export_part_uploads_store_idx
  • (uploaded_by_user_id) vulnerability_export_part_uploads_uploaded_by_user_id_idx
  • (uploader, path) vulnerability_export_part_uploads_uploader_path_idx

Referenced by

Table checks: char_length(path) <= 511; char_length(checksum) <= 64; organization_id IS NOT NULL

vulnerability_export_parts

9 cols · no RLS · line 33678View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
vulnerability_export_id bigintNOT NULLvulnerability_exports.id 1:N · CASCADE
start_id bigintNOT NULL
end_id bigintNOT NULL
organization_id bigintNOT NULL
file_store integernull
file textnullCHECK char_length(file) <= 255
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (organization_id) index_vulnerability_export_parts_on_organization_id
  • (vulnerability_export_id) index_vulnerability_export_parts_on_vulnerability_export_id

Referenced by

  • nothing

Table checks: char_length(file) <= 255

vulnerability_export_upload_states

10 cols · no RLS · line 33700View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
vulnerability_export_upload_id bigintNOT NULLvulnerability_export_uploads.id 1:1 · CASCADE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_ve_upl_states_failed_verification
  • (vulnerability_export_upload_id) WHERE verification_state = 0 OR verification_state = 3 idx_ve_upl_states_needs_verification_id
  • UNIQUE (vulnerability_export_upload_id) idx_ve_upl_states_on_ve_upl_id
  • (vulnerability_export_upload_id, verification_started_at) WHERE verification_state = 1 idx_ve_upl_states_on_verification_started
  • (verification_state) idx_ve_upl_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_ve_upl_states_pending_verification
  • (organization_id) index_vulnerability_export_upload_states_on_organization_id

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

vulnerability_export_uploads

16 cols · no RLS · line 33723View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnullCHECK organization_id IS NOT NULL
namespace_id bigintnull
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • UNIQUE (id) idx_ve_upl_on_id_unique
  • (checksum) vulnerability_export_uploads_checksum_idx
  • (model_id, model_type, uploader, created_at) vulnerability_export_uploads_model_id_model_type_uploader_c_idx
  • (namespace_id) vulnerability_export_uploads_namespace_id_idx
  • (organization_id) vulnerability_export_uploads_organization_id_idx
  • (project_id) vulnerability_export_uploads_project_id_idx
  • (store) vulnerability_export_uploads_store_idx
  • (uploaded_by_user_id) vulnerability_export_uploads_uploaded_by_user_id_idx
  • (uploader, path) vulnerability_export_uploads_uploader_path_idx

Referenced by

Table checks: organization_id IS NOT NULL; char_length(path) <= 511; char_length(checksum) <= 64

vulnerability_exports

16 cols · no RLS · line 33745View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
started_at timestamptznull
finished_at timestamptznull
status varchar(255)NOT NULL
file varchar(255)null
project_id bigintnull
author_id bigintNOT NULL
file_store integernull
format smallintNOT NULL0
group_id bigintnull
organization_id bigintNOT NULL
expires_at timestamptznull
send_email booleanNOT NULLFALSE
report_data jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (author_id) index_vulnerability_exports_on_author_id
  • (file_store) index_vulnerability_exports_on_file_store
  • (group_id) WHERE group_id IS NOT NULL index_vulnerability_exports_on_group_id_not_null
  • (organization_id) index_vulnerability_exports_on_organization_id
  • (project_id) WHERE project_id IS NOT NULL index_vulnerability_exports_on_project_id_not_null

Referenced by

vulnerability_feedback

16 cols · no RLS · line 33799View in 3D
  • Isolated tablevulnerability_feedback references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
feedback_type smallintNOT NULL
category smallintNOT NULL
project_id bigintNOT NULL
author_id bigintNOT NULL
issue_id bigintnull
merge_request_id bigintnull
comment_author_id bigintnull
comment textnull
comment_timestamp timestamptznull
finding_uuid uuidnull
dismissal_reason smallintnull
migrated_to_state_transition booleannullFALSE
pipeline_id bigintnull

Indexes

  • (finding_uuid) index_vulnerability_feedback_finding_uuid
  • (author_id) index_vulnerability_feedback_on_author_id
  • (comment_author_id) index_vulnerability_feedback_on_comment_author_id
  • (feedback_type, finding_uuid) index_vulnerability_feedback_on_feedback_type_and_finding_uuid
  • (issue_id) index_vulnerability_feedback_on_issue_id
  • (id) WHERE issue_id IS NOT NULL index_vulnerability_feedback_on_issue_id_not_null
  • (merge_request_id) index_vulnerability_feedback_on_merge_request_id
  • (pipeline_id) index_vulnerability_feedback_on_pipeline_id
  • (project_id, category, feedback_type) index_vulnerability_feedback_on_set_of_common_attributes

Referenced by

  • nothing

vulnerability_finding_due_dates

6 cols · no RLS · line 33845View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
vulnerability_occurrence_id bigintNOT NULLvulnerability_occurrences.id 1:1 · CASCADE
due_date dateNOT NULL
project_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (vulnerability_occurrence_id) index_vulnerability_finding_due_dates_on_occurrence_id
  • (project_id) index_vulnerability_finding_due_dates_on_project_id

Referenced by

  • nothing

vulnerability_finding_evidences

6 cols · no RLS · line 33863View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
vulnerability_occurrence_id bigintNOT NULLvulnerability_occurrences.id 1:1 · CASCADE
data jsonbNOT NULLCAST('{}' AS jsonb)
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • UNIQUE (vulnerability_occurrence_id) finding_evidences_on_unique_vulnerability_occurrence_id
  • (project_id) index_vulnerability_finding_evidences_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

vulnerability_finding_risk_scores

5 cols · no RLS · line 33904View in 3D
ColumnTypeNullDefaultReferencesNotes
finding_id PKbigintNOT NULLvulnerability_occurrences.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
risk_score double precisionNOT NULL0.0

Indexes

  • UNIQUE (finding_id) index_vulnerability_risk_scores_on_vulnerability_finding
  • (project_id) index_vulnerability_risk_scores_on_vulnerability_project

Referenced by

  • nothing

vulnerability_finding_signatures

7 cols · no RLS · line 33912View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
finding_id bigintNOT NULLvulnerability_occurrences.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
algorithm_type smallintNOT NULL
signature_sha byteaNOT NULL
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • UNIQUE (finding_id, algorithm_type, signature_sha) idx_vuln_signatures_uniqueness_signature_sha
  • (project_id) index_vulnerability_finding_signatures_on_project_id
  • (signature_sha) index_vulnerability_finding_signatures_on_signature_sha

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

vulnerability_findings_remediations

6 cols · no RLS · line 33932View in 3D
  • Nullable foreign key vulnerability_occurrence_idvulnerability_findings_remediations.vulnerability_occurrence_id may be NULL, so the relationship to vulnerability_occurrences is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key vulnerability_remediation_idvulnerability_findings_remediations.vulnerability_remediation_id may be NULL, so the relationship to vulnerability_remediations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK vulnerability_occurrence_id, vulnerability_remediation_idvulnerability_findings_remediations has several nullable FKs (vulnerability_occurrence_id, vulnerability_remediation_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
vulnerability_occurrence_id bigintnullvulnerability_occurrences.id 1:N · CASCADE
vulnerability_remediation_id bigintnullvulnerability_remediations.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (project_id) index_vulnerability_findings_remediations_on_project_id
  • (vulnerability_remediation_id) index_vulnerability_findings_remediations_on_remediation_id
  • UNIQUE (vulnerability_occurrence_id, vulnerability_remediation_id) index_vulnerability_findings_remediations_on_unique_keys

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

vulnerability_flags

11 cols · no RLS · line 33951View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
vulnerability_occurrence_id bigintNOT NULLvulnerability_occurrences.id 1:N · CASCADE
flag_type smallintNOT NULL0
origin textNOT NULLCHECK char_length(origin) <= 255
description textNOT NULLCHECK char_length(description) <= 100000
project_id bigintnullCHECK project_id IS NOT NULL
confidence_score double precisionNOT NULL0.0CHECK confidence_score >= CAST(0 AS double precision) AND confidence_score <= CAST(1 AS double precision)
workflow_id bigintnull
status smallintNOT NULL0

Indexes

  • (project_id) index_vulnerability_flags_on_project_id
  • UNIQUE (vulnerability_occurrence_id, flag_type, origin) index_vulnerability_flags_on_unique_columns
  • (workflow_id) index_vulnerability_flags_on_workflow_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(origin) <= 255; confidence_score >= CAST(0 AS double precision) AND confidence_score <= CAST(1 AS double precision); char_length(description) <= 100000

vulnerability_flip_guards

8 cols · no RLS · line 33978View in 3D
ColumnTypeNullDefaultReferencesNotes
vulnerability_finding_id PKbigintNOT NULLvulnerability_occurrences.id 1:1 · CASCADE
project_id bigintNOT NULL
first_automatic_transition_at timestamptzNOT NULL
automated_transition_count smallintnull1
is_guarded booleanNOT NULLFALSE
last_automatic_transition_at timestamptzNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (project_id, vulnerability_finding_id) idx_vuln_flip_guards_on_project_and_finding_id

Referenced by

  • nothing

vulnerability_historical_statistics

14 cols · no RLS · line 33989View in 3D
  • Isolated tablevulnerability_historical_statistics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
total integerNOT NULL0
critical integerNOT NULL0
high integerNOT NULL0
medium integerNOT NULL0
low integerNOT NULL0
unknown integerNOT NULL0
info integerNOT NULL0
date dateNOT NULL
letter_grade smallintNOT NULL
security_project_tracked_context_id bigintnull

Indexes

  • UNIQUE (project_id, date, security_project_tracked_context_id) index_vuln_hist_stats_on_project_date_and_tracked_context_id
  • UNIQUE (project_id, date) index_vuln_historical_statistics_on_project_id_and_date
  • (date, id) index_vulnerability_historical_statistics_on_date_and_id

Referenced by

  • nothing

vulnerability_identifiers

10 cols · no RLS · line 34015View in 3D
  • Enum-like column with no CHECK external_typeexternal_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity external_type, external_idexternal_id points at different tables depending on external_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
fingerprint byteaNOT NULL
external_type varcharNOT NULL
external_id varcharNOT NULL
name varcharNOT NULL
url textnull
partition_id bigintnull1

Indexes

  • UNIQUE (project_id, fingerprint, partition_id) idx_vulnerability_identifiers_on_project_id_fingerprint_part_id
  • UNIQUE (id, partition_id) index_vulnerability_identifiers_on_id_partition_id
  • (id) WHERE lower(CAST(external_type AS text)) = CAST('cve' AS text) index_vulnerability_identifiers_on_id_where_external_type_cve
  • UNIQUE (project_id, fingerprint) index_vulnerability_identifiers_on_project_id_and_fingerprint
  • (project_id, name) index_vulnerability_identifiers_on_project_id_and_name

Referenced by

vulnerability_management_policy_rules

8 cols · no RLS · line 34058View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
security_policy_id bigintNOT NULLsecurity_policies.id 1:N · CASCADE
security_policy_management_project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
rule_index smallintNOT NULL
type smallintNOT NULL
content jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (security_policy_management_project_id) index_vuln_mgmt_policy_rules_on_policy_mgmt_project_id
  • UNIQUE (security_policy_id, rule_index) index_vuln_mgmt_policy_rules_on_unique_policy_rule_index

Referenced by

  • nothing

vulnerability_namespace_historical_statistics

15 cols · no RLS · line 34101View in 3D
  • Isolated tablevulnerability_namespace_historical_statistics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
traversal_ids bigint[]NOT NULLCAST('{}' AS bigint[])
total integerNOT NULL0
critical integerNOT NULL0
high integerNOT NULL0
medium integerNOT NULL0
low integerNOT NULL0
unknown integerNOT NULL0
info integerNOT NULL0
date dateNOT NULL
letter_grade smallintNOT NULL
migrating booleanNOT NULLFALSE

Indexes

  • UNIQUE (traversal_ids, date, namespace_id) idx_vuln_ns_hist_stats_on_traversal_ids_date_and_ns_id
  • (namespace_id, id) index_vuln_namespace_hist_statistics_for_traversal_ids_update

Referenced by

  • nothing

vulnerability_namespace_statistics

12 cols · no RLS · line 34128View in 3D
  • Isolated tablevulnerability_namespace_statistics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintNOT NULL
total integerNOT NULL0
critical integerNOT NULL0
high integerNOT NULL0
medium integerNOT NULL0
low integerNOT NULL0
unknown integerNOT NULL0
info integerNOT NULL0
traversal_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • UNIQUE (traversal_ids, namespace_id) idx_vuln_ns_stats_on_traversal_ids_and_namespace_id
  • (traversal_ids) index_vuln_namespace_statistics_gin_traversal_ids
  • UNIQUE (namespace_id) index_vuln_namespace_statistics_on_namespace_id

Referenced by

  • nothing

vulnerability_occurrence_identifiers

7 cols · no RLS · line 34152View in 3D
  • Nullable foreign key partition_id, identifier_idvulnerability_occurrence_identifiers.partition_id.identifier_id may be NULL, so the relationship to vulnerability_identifiers is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
occurrence_id bigintNOT NULLvulnerability_occurrences.id 1:N · CASCADE
identifier_id bigintNOT NULLvulnerability_identifiers.partition_id 1:N · CASCADE
project_id bigintnullCHECK project_id IS NOT NULL
partition_id bigintnull1vulnerability_identifiers.partition_id 1:N · CASCADECHECK partition_id IS NOT NULL

Indexes

  • (partition_id, identifier_id) idx_vuln_occurrence_identifiers_on_partition_id_identifier_id
  • (identifier_id) index_vulnerability_occurrence_identifiers_on_identifier_id
  • (project_id) index_vulnerability_occurrence_identifiers_on_project_id
  • UNIQUE (occurrence_id, identifier_id) index_vulnerability_occurrence_identifiers_on_unique_keys

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; partition_id IS NOT NULL

vulnerability_occurrences

26 cols · no RLS · line 34173View in 3D
  • Nullable foreign key vulnerability_idvulnerability_occurrences.vulnerability_id may be NULL, so the relationship to vulnerabilities is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key partition_id, primary_identifier_idvulnerability_occurrences.partition_id.primary_identifier_id may be NULL, so the relationship to vulnerability_identifiers is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
severity smallintNOT NULL
report_type smallintNOT NULL
project_id bigintNOT NULL
scanner_id bigintNOT NULLvulnerability_scanners.id 1:N · CASCADE
primary_identifier_id bigintNOT NULLvulnerability_identifiers.partition_id 1:N · CASCADE
location_fingerprint byteaNOT NULL
name varcharNOT NULL
metadata_version varcharNOT NULL
raw_metadata textnull
vulnerability_id bigintnullvulnerabilities.id 1:N · SET NULL
details jsonbNOT NULLCAST('{}' AS jsonb)
description textnullCHECK char_length(description) <= 15000
solution textnullCHECK char_length(solution) <= 7000
cve textnullCHECK char_length(cve) <= 48400
location jsonbnull
detection_method smallintNOT NULL0
uuid uuidNOT NULLCAST('00000000-0000-0000-0000-000000000000' AS uuid)
initial_pipeline_id bigintnull
latest_pipeline_id bigintnull
security_project_tracked_context_id bigintnull
detected_at timestamptznullnow()
new_uuid uuidnull
partition_id bigintnull1vulnerability_identifiers.partition_id 1:N · CASCADECHECK partition_id IS NOT NULL

Indexes

  • (project_id, report_type, ((location -> CAST('dependency' AS text)) -> CAST('package' AS text)) ->> CAST('name' AS text), (location -> CAST('dependency' AS text)) ->> CAST('version' AS text), COALESCE(location ->> CAST('file' AS text), location ->> CAST('image' AS text))) WHERE report_type = ANY(ARRAY[2, 1]) i_vuln_occurrences_on_proj_report_loc_dep_pkg_ver_file_img
  • (partition_id, primary_identifier_id) idx_vuln_occurrences_on_partition_id_primary_identifier_id
  • UNIQUE (uuid) index_vuln_findings_on_uuid_including_vuln_id_1
  • (project_id, report_type, location_fingerprint) index_vulnerability_occurrences_for_override_uuids_logic
  • (initial_pipeline_id) index_vulnerability_occurrences_on_initial_pipeline_id
  • (latest_pipeline_id) index_vulnerability_occurrences_on_latest_pipeline_id
  • (location -> CAST('image' AS text)) WHERE report_type = ANY(ARRAY[2, 7]) index_vulnerability_occurrences_on_location_image
  • ((location -> CAST('kubernetes_resource' AS text)) -> CAST('agent_id' AS text)) WHERE report_type = 7 index_vulnerability_occurrences_on_location_k8s_agent_id
  • ((location -> CAST('kubernetes_resource' AS text)) -> CAST('cluster_id' AS text)) WHERE report_type = 7 index_vulnerability_occurrences_on_location_k8s_cluster_id
  • (scanner_id) index_vulnerability_occurrences_on_scanner_id
  • (vulnerability_id) index_vulnerability_occurrences_on_vulnerability_id
  • (primary_identifier_id, vulnerability_id) index_vulnerability_occurrences_prim_iden_id_and_vuln_id
  • (project_id, security_project_tracked_context_id, id) tmp_idx_vuln_occurrences_on_project_id_sec_prj_trck_cnxt_id_id
  • (project_id, id) tmp_idx_vulnerability_occurrences_on_project_id_id

Referenced by

Table checks: partition_id IS NOT NULL; char_length(solution) <= 7000; char_length(description) <= 15000; char_length(cve) <= 48400

vulnerability_partial_scans

7 cols · no RLS · line 34215View in 3D
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
scan_id PKbigintNOT NULLsecurity_scans.id 1:1 · CASCADE
project_id bigintNOT NULL
mode smallintNOT NULL
pipeline_id bigintnull
scan_type smallintnull

Indexes

  • (pipeline_id) index_vulnerability_partial_scans_on_pipeline_id
  • (project_id) index_vulnerability_partial_scans_on_project_id
  • (scan_id) index_vulnerability_partial_scans_on_scan_id

Referenced by

  • nothing

vulnerability_reads

25 cols · no RLS · line 34225View in 3D
  • Nullable foreign key vulnerability_occurrence_idvulnerability_reads.vulnerability_occurrence_id may be NULL, so the relationship to vulnerability_occurrences is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
vulnerability_id bigintNOT NULLvulnerabilities.id 1:1 · CASCADE
project_id bigintNOT NULL
scanner_id bigintNOT NULLvulnerability_scanners.id 1:N · CASCADE
report_type smallintNOT NULL
severity smallintNOT NULL
state smallintNOT NULL
has_issues booleanNOT NULLFALSE
resolved_on_default_branch booleanNOT NULLFALSE
uuid uuidNOT NULL
location_image textnullCHECK char_length(location_image) <= 2048
cluster_agent_id textnullCHECK char_length(cluster_agent_id) <= 10
casted_cluster_agent_id bigintnull
dismissal_reason smallintnull
has_merge_request booleannullFALSECHECK has_merge_request IS NOT NULL
has_remediations booleanNOT NULLFALSE
owasp_top_10 smallintnullCAST('-1' AS integer)
traversal_ids bigint[]nullCAST('{}' AS bigint[])CHECK traversal_ids IS NOT NULL
archived booleanNOT NULLFALSE
identifier_names text[]NOT NULLCAST('{}' AS text[])
has_vulnerability_resolution booleannullFALSE
auto_resolved booleanNOT NULLFALSE
security_project_tracked_context_id bigintnull
vulnerability_occurrence_id bigintnullvulnerability_occurrences.id 1:1 · CASCADE
partition_id bigintnull1

Indexes

  • (project_id, state, dismissal_reason, severity, vulnerability_id) idx_vuln_reads_for_filtering
  • (state, report_type, severity, traversal_ids, vulnerability_id) WHERE archived = FALSE idx_vulnerability_reads_for_traversal_ids_queries_srt_severity
  • (project_id, scanner_id, vulnerability_id) idx_vulnerability_reads_project_id_scanner_id_vulnerability_id
  • (casted_cluster_agent_id) WHERE report_type = 7 index_cis_vulnerability_reads_on_cluster_agent_id
  • (project_id, state, report_type, vulnerability_id) WHERE …(resolved_on_default_branch) index_vuln_reads_common_query_on_resolved_on_default_branch
  • (casted_cluster_agent_id) WHERE casted_cluster_agent_id IS NOT NULL index_vuln_reads_on_casted_cluster_agent_id_where_it_is_null
  • (project_id, owasp_top_10) index_vuln_reads_on_project_id_owasp_top_10
  • (project_id, state, severity, vulnerability_id) index_vuln_reads_on_project_id_state_severity_and_vuln_id
  • (resolved_on_default_branch, state, report_type, severity, traversal_ids, vulnerability_id, has_vulnerability_resolution) WHERE archived = FALSE index_vulnerability_reads_common_attrs_for_groups
  • (project_id, state, report_type, severity, vulnerability_id, dismissal_reason, has_vulnerability_resolution) index_vulnerability_reads_common_finder_query
  • (project_id, resolved_on_default_branch) index_vulnerability_reads_for_filtered_removal
  • (traversal_ids, vulnerability_id) WHERE archived = FALSE index_vulnerability_reads_for_vulnerability_export
  • (cluster_agent_id) WHERE report_type = 7 index_vulnerability_reads_on_cluster_agent_id
  • (location_image) WHERE report_type = ANY(ARRAY[2, 7]) index_vulnerability_reads_on_location_image
  • (project_id, location_image) WHERE report_type = ANY(ARRAY[2, 7]) AND location_image IS NOT NULL index_vulnerability_reads_on_location_image_partial
  • (location_image) WHERE report_type = ANY(ARRAY[2, 7]) AND location_image IS NOT NULL index_vulnerability_reads_on_location_image_trigram
  • (project_id, vulnerability_id) index_vulnerability_reads_on_project_id_and_vulnerability_id
  • (scanner_id) index_vulnerability_reads_on_scanner_id
  • UNIQUE (uuid) index_vulnerability_reads_on_uuid
  • (uuid, project_id, state) index_vulnerability_reads_on_uuid_project_id_and_state
  • UNIQUE (vulnerability_id) index_vulnerability_reads_on_vulnerability_id
  • UNIQUE (vulnerability_occurrence_id) index_vulnerability_reads_on_vulnerability_occurrence_id_unique
  • (owasp_top_10, state, report_type, resolved_on_default_branch, severity, traversal_ids, vulnerability_id) WHERE archived = FALSE revised_idx_for_owasp_top_10_group_level_reports
  • (project_id, security_project_tracked_context_id, id) tmp_idx_vuln_reads_on_project_id_sec_prj_trck_cnxt_id_id

Referenced by

  • nothing

Table checks: char_length(location_image) <= 2048; has_merge_request IS NOT NULL; char_length(cluster_agent_id) <= 10; traversal_ids IS NOT NULL

vulnerability_remediation_upload_states

10 cols · no RLS · line 34266View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
vulnerability_remediation_upload_id bigintNOT NULLvulnerability_remediation_uploads.id 1:1 · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_vuln_remediation_upload_states_failed_verification
  • (vulnerability_remediation_upload_id) WHERE verification_state = 0 OR verification_state = 3 index_vuln_remediation_upload_states_needs_verification_id
  • UNIQUE (vulnerability_remediation_upload_id) index_vuln_remediation_upload_states_on_upload_id
  • (vulnerability_remediation_upload_id, verification_started_at) WHERE verification_state = 1 index_vuln_remediation_upload_states_on_verification_started
  • (verification_state) index_vuln_remediation_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_vuln_remediation_upload_states_pending_verification
  • (project_id) index_vulnerability_remediation_upload_states_on_project_id

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

vulnerability_remediation_uploads

16 cols · no RLS · line 34289View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnull
namespace_id bigintnull
project_id bigintnullCHECK project_id IS NOT NULL
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • UNIQUE (id) idx_vulnerability_remediation_uploads_on_id
  • (model_id, model_type, uploader, created_at) vulnerability_remediation_upl_model_id_model_type_uploader__idx
  • (checksum) vulnerability_remediation_uploads_checksum_idx
  • (namespace_id) vulnerability_remediation_uploads_namespace_id_idx
  • (organization_id) vulnerability_remediation_uploads_organization_id_idx
  • (project_id) vulnerability_remediation_uploads_project_id_idx
  • (store) vulnerability_remediation_uploads_store_idx
  • (uploaded_by_user_id) vulnerability_remediation_uploads_uploaded_by_user_id_idx
  • (uploader, path) vulnerability_remediation_uploads_uploader_path_idx

Referenced by

Table checks: project_id IS NOT NULL; char_length(path) <= 511; char_length(checksum) <= 64

vulnerability_remediations

8 cols · no RLS · line 34311View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store smallintnull
summary textNOT NULLCHECK char_length(summary) <= 200
file textNOT NULLCHECK char_length(file) <= 255
checksum byteaNOT NULLStores the SHA256 checksum of the attached diff file
project_id bigintNOT NULL

Indexes

  • UNIQUE (project_id, checksum) index_vulnerability_remediations_on_project_id_and_checksum

Referenced by

Table checks: char_length(summary) <= 200; char_length(file) <= 255

vulnerability_representation_information

7 cols · no RLS · line 34335View in 3D
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
vulnerability_id PKbigintNOT NULLvulnerabilities.id 1:1 · CASCADE
project_id bigintNOT NULL
resolved_in_commit_sha byteanull
vulnerability_occurrence_id bigintnull
removed_from_code booleanNOT NULLFALSE

Indexes

  • (project_id) index_vuln_rep_info_on_project_id

Referenced by

  • nothing

vulnerability_scanners

7 cols · no RLS · line 34345View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
external_id varcharNOT NULL
name varcharNOT NULL
vendor textNOT NULLCAST('GitLab' AS text)CHECK char_length(vendor) <= 255

Indexes

  • UNIQUE (project_id, external_id) index_vulnerability_scanners_on_project_id_and_external_id

Referenced by

Table checks: char_length(vendor) <= 255

vulnerability_severity_overrides

11 cols · no RLS · line 34364View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
vulnerability_id bigintNOT NULLvulnerabilities.id 1:N · CASCADE
author_id bigintnull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
original_severity smallintNOT NULL
new_severity smallintNOT NULL
vulnerability_occurrence_id bigintnull
security_policy_id bigintnull
triggered_by_policy booleanNOT NULLFALSE

Indexes

  • (security_policy_id) WHERE security_policy_id IS NOT NULL index_vuln_severity_overrides_on_security_policy_id
  • (author_id) index_vulnerability_severity_overrides_on_author_id
  • (project_id) index_vulnerability_severity_overrides_on_project_id
  • (vulnerability_id) index_vulnerability_severity_overrides_on_vulnerability_id

Referenced by

  • nothing

vulnerability_state_transitions

11 cols · no RLS · line 34387View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
vulnerability_id bigintNOT NULLvulnerabilities.id 1:N · CASCADE
to_state smallintNOT NULL
from_state smallintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
author_id bigintnull
comment textnullCHECK char_length(comment) <= 50000
dismissal_reason smallintnull
project_id bigintnullCHECK project_id IS NOT NULL
vulnerability_occurrence_id bigintnull

Indexes

  • (vulnerability_id, id) index_vulnerability_state_transitions_id_and_vulnerability_id
  • (author_id) index_vulnerability_state_transitions_on_author_id
  • (project_id) index_vulnerability_state_transitions_on_project_id
  • (created_at, vulnerability_id) WHERE to_state = 3 index_vulnerability_state_transitions_resolved_activity

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(comment) <= 50000

vulnerability_statistics

16 cols · no RLS · line 34412View in 3D
  • Isolated tablevulnerability_statistics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
total integerNOT NULL0
critical integerNOT NULL0
high integerNOT NULL0
medium integerNOT NULL0
low integerNOT NULL0
unknown integerNOT NULL0
info integerNOT NULL0
letter_grade smallintNOT NULL
latest_pipeline_id bigintnull
archived booleanNOT NULLFALSE
traversal_ids bigint[]NOT NULLCAST('{}' AS bigint[])CHECK cardinality(traversal_ids) > 0
security_project_tracked_context_id bigintnull

Indexes

  • (traversal_ids, letter_grade) WHERE archived = FALSE idx_vulnerability_statistics_on_traversal_ids_and_letter_grade
  • UNIQUE (project_id, security_project_tracked_context_id) index_vuln_stats_on_project_id_and_tracked_context_id
  • (latest_pipeline_id) index_vulnerability_statistics_on_latest_pipeline_id
  • (letter_grade) index_vulnerability_statistics_on_letter_grade
  • UNIQUE (project_id) index_vulnerability_statistics_on_unique_project_id

Referenced by

  • nothing

Table checks: cardinality(traversal_ids) > 0

vulnerability_triggered_workflows

7 cols · no RLS · line 34440View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
vulnerability_occurrence_id bigintNOT NULLvulnerability_occurrences.id 1:N · CASCADE
workflow_id bigintNOT NULL
project_id bigintNOT NULL
workflow_name smallintNOT NULL0

Indexes

  • (project_id) index_vulnerability_triggered_workflows_on_project_id
  • (workflow_id) index_vulnerability_triggered_workflows_on_workflow_id
  • (vulnerability_occurrence_id) index_vulnerability_workflows_on_vuln_occurrence_id

Referenced by

  • nothing

vulnerability_user_mentions

8 cols · no RLS · line 34459View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
vulnerability_id bigintNOT NULLvulnerabilities.id 1:N · CASCADE
mentioned_users_ids bigint[]null
mentioned_projects_ids bigint[]null
mentioned_groups_ids bigint[]null
note_id bigintnull
project_id bigintnullCHECK project_id IS NOT NULL
vulnerability_occurrence_id bigintnull

Indexes

  • UNIQUE (note_id, project_id) WHERE note_id IS NOT NULL idx_vuln_user_mentions_on_note_id_and_project_id
  • (project_id) index_vulnerability_user_mentions_on_project_id
  • UNIQUE (vulnerability_id) WHERE note_id IS NULL index_vulns_user_mentions_on_vulnerability_id
  • UNIQUE (vulnerability_id, note_id) index_vulns_user_mentions_on_vulnerability_id_and_note_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

web 2 tables

Tables whose names start with web_.

Entity-relationship diagram: web_hook_logs_daily, web_hooksweb_hook_logs_dailyid PKbigintweb_hook_idbiginttriggervarcharurlvarcharrequest_headerstextrequest_datatextresponse_headerstextresponse_bodytextresponse_statusvarcharexecution_durationdouble precisioninternal_error_messagevarcharupdated_attimestampcreated_at PKtimestampurl_hashtextorganization_idbigintgroup_idbigintproject_idbigintweb_hooksid PKbigintproject_id FKbigintcreated_attimestampupdated_attimestamptypevarcharpush_eventsbooleanissues_eventsbooleanmerge_requests_eventsbooleantag_push_eventsbooleangroup_id FKbigintnote_eventsbooleanenable_ssl_verificationbooleanwiki_page_eventsbooleanpipeline_eventsbooleanconfidential_issues_eventsbooleanrepository_update_eventsbooleanjob_eventsbooleanconfidential_note_eventsbooleanpush_events_branch_filtertextencrypted_tokenvarcharencrypted_token_ivvarcharencrypted_urlvarcharencrypted_url_ivvarchardeployment_eventsbooleanreleases_eventsbooleanfeature_flag_eventsbooleanmember_eventsbooleansubgroup_eventsbooleanrecent_failuressmallintdisabled_untiltimestamptzencrypted_url_variablesbyteaencrypted_url_variables_ivbyteaintegration_id FKbigintbranch_filter_strategysmallintemoji_eventsbooleannametextdescriptiontextcustom_webhook_templatetextresource_access_token_eventsbooleanencrypted_custom_headersbyteaencrypted_custom_headers_ivbyteaproject_eventsbooleanvulnerability_eventsbooleanmember_approval_eventsbooleanmilestone_eventsbooleanorganization_id FKbigintresource_deploy_token_eventsbooleanfilterjsonbsigning_tokenjsonbintegrationsnamespacesorganizationsprojectsproject_idintegration_idorganization_idgroup_id

Relationships

web_hook_logs_daily

17 cols · no RLS · line 7204View in 3D
  • Enum-like column with no CHECK response_statusresponse_status is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tableweb_hook_logs_daily references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
web_hook_id bigintNOT NULL
trigger varcharnull
url varcharnull
request_headers textnull
request_data textnull
response_headers textnull
response_body textnull
response_status varcharnull
execution_duration double precisionnull
internal_error_message varcharnull
updated_at timestampNOT NULL
created_at PKtimestampNOT NULL
url_hash textnullCHECK char_length(url_hash) <= 44
organization_id bigintnull
group_id bigintnull
project_id bigintnull

Indexes

  • (web_hook_id, response_status, created_at) idx_web_hook_logs_daily_on_hook_id_resp_status_created_at
  • (group_id) index_web_hook_logs_daily_on_group_id
  • (organization_id) index_web_hook_logs_daily_on_organization_id
  • (project_id) index_web_hook_logs_daily_on_project_id
  • (web_hook_id, created_at) index_web_hook_logs_daily_on_web_hook_id_and_created_at
  • (created_at, web_hook_id) index_web_hook_logs_daily_part_on_created_at_and_web_hook_id

Referenced by

  • nothing

Table checks: char_length(url_hash) <= 44; num_nonnulls(group_id, organization_id, project_id) = 1

web_hooks

49 cols · no RLS · line 34489View in 3D
  • Nullable foreign key project_idweb_hooks.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key integration_idweb_hooks.integration_id may be NULL, so the relationship to integrations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idweb_hooks.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idweb_hooks.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK typetype is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Either/or foreign keys without a CHECK project_id, integration_id, organization_id, group_idweb_hooks has several nullable FKs (project_id, integration_id, organization_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Wide table (49 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestampnull
updated_at timestampnull
type varcharnullCAST('ProjectHook' AS varchar)
push_events booleanNOT NULLTRUE
issues_events booleanNOT NULLFALSE
merge_requests_events booleanNOT NULLFALSE
tag_push_events booleannullFALSE
group_id bigintnullnamespaces.id 1:N · CASCADE
note_events booleanNOT NULLFALSE
enable_ssl_verification booleannullTRUE
wiki_page_events booleanNOT NULLFALSE
pipeline_events booleanNOT NULLFALSE
confidential_issues_events booleanNOT NULLFALSE
repository_update_events booleanNOT NULLFALSE
job_events booleanNOT NULLFALSE
confidential_note_events booleannull
push_events_branch_filter textnull
encrypted_token varcharnull
encrypted_token_iv varcharnull
encrypted_url varcharnull
encrypted_url_iv varcharnull
deployment_events booleanNOT NULLFALSE
releases_events booleanNOT NULLFALSE
feature_flag_events booleanNOT NULLFALSE
member_events booleanNOT NULLFALSE
subgroup_events booleanNOT NULLFALSE
recent_failures smallintNOT NULL0
disabled_until timestamptznull
encrypted_url_variables byteanull
encrypted_url_variables_iv byteanull
integration_id bigintnullintegrations.id 1:N · CASCADE
branch_filter_strategy smallintNOT NULL0
emoji_events booleanNOT NULLFALSE
name textnullCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 2048
custom_webhook_template textnullCHECK char_length(custom_webhook_template) <= 4096
resource_access_token_events booleanNOT NULLFALSE
encrypted_custom_headers byteanull
encrypted_custom_headers_iv byteanull
project_events booleanNOT NULLFALSE
vulnerability_events booleanNOT NULLFALSE
member_approval_events booleanNOT NULLFALSE
milestone_events booleanNOT NULLFALSE
organization_id bigintnullorganizations.id 1:N · CASCADE
resource_deploy_token_events booleanNOT NULLFALSE
filter jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(filter) = CAST('object' AS text)
signing_token jsonbnull

Indexes

  • (group_id) index_on_group_id_on_webhooks
  • (group_id) WHERE CAST(type AS text) = CAST('GroupHook' AS text) index_web_hooks_on_group_id
  • (integration_id) index_web_hooks_on_integration_id
  • (organization_id) index_web_hooks_on_organization_id
  • (project_id, id) WHERE CAST(type AS text) = CAST('ProjectHook' AS text) index_web_hooks_on_project_id_and_id
  • (project_id, recent_failures) index_web_hooks_on_project_id_recent_failures
  • (type) index_web_hooks_on_type

Referenced by

  • nothing

Table checks: char_length(name) <= 255; char_length(description) <= 2048; char_length(custom_webhook_template) <= 4096; num_nonnulls(group_id, organization_id, project_id) = 1; jsonb_typeof(filter) = CAST('object' AS text)

zoekt 6 tables

Tables whose names start with zoekt_.

Entity-relationship diagram: zoekt_tasks, zoekt_enabled_namespaces, zoekt_indices, zoekt_nodes, zoekt_replicas, zoekt_repositorieszoekt_tasksid PKbigintpartition_id PKbigintzoekt_node_idbigintzoekt_repository_idbigintproject_identifierbigintperform_attimestamptzcreated_attimestamptzupdated_attimestamptzstatesmallinttask_typesmallintretries_leftsmallintzoekt_enabled_namespacesid PKbigintroot_namespace_id FKbigintcreated_attimestamptzupdated_attimestamptzsearchbooleanmetadatajsonblast_rollout_failed_attimestamptznumber_of_replicas_overrideintegerzoekt_indicesid PKbigintzoekt_enabled_namespace_id FKbigintzoekt_node_id FKbigintnamespace_idbigintcreated_attimestamptzupdated_attimestamptzstatesmallintzoekt_replica_id FKbigintreserved_storage_bytesbigintused_storage_bytesbigintwatermark_levelsmallintmetadatajsonbused_storage_bytes_updated_attimestamptzlast_indexed_attimestamptzzoekt_nodesid PKbigintuuiduuidused_bytesbiginttotal_bytesbigintlast_seen_attimestamptzcreated_attimestamptzupdated_attimestamptzindex_base_urltextsearch_base_urltextmetadatajsonbindexed_bytesbigintusable_storage_bytesbigintschema_versionsmallintservicessmallint[]webserver_last_seen_attimestamptzzoekt_replicasid PKbigintzoekt_enabled_namespace_id FKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzstatesmallintzoekt_repositoriesid PKbigintzoekt_index_id FKbigintproject_id FKbigintproject_identifierbigintcreated_attimestamptzupdated_attimestamptzindexed_attimestamptzstatesmallintsize_bytesbigintindex_file_countintegerretries_leftsmallintschema_versionsmallintnamespacesprojectsroot_namespace_idnamespace_idzoekt_enabled_namespace_idzoekt_enabled_namespace_idzoekt_node_idzoekt_replica_idproject_idzoekt_index_id

Relationships

zoekt_tasks

11 cols · no RLS · line 7226View in 3D
  • Isolated tablezoekt_tasks references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
partition_id PKbigintNOT NULL1
zoekt_node_id bigintNOT NULL
zoekt_repository_id bigintNOT NULL
project_identifier bigintNOT NULL
perform_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
state smallintNOT NULL0
task_type smallintNOT NULL
retries_left smallintNOT NULL5

Indexes

  • (state) index_zoekt_tasks_on_state
  • (zoekt_node_id, state, perform_at) index_zoekt_tasks_on_zoekt_node_id_and_state_and_perform_at
  • (zoekt_repository_id) index_zoekt_tasks_on_zoekt_repository_id

Referenced by

  • nothing

Table checks: retries_left > 0 OR (retries_left = 0 AND state = 255)

zoekt_enabled_namespaces

8 cols · no RLS · line 35383View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
root_namespace_id bigintNOT NULLnamespaces.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
search booleanNOT NULLTRUE
metadata jsonbNOT NULLCAST('{}' AS jsonb)
last_rollout_failed_at timestamptznull
number_of_replicas_override integernull

Indexes

  • (last_rollout_failed_at) index_zens_on_last_rollout_failed_at
  • UNIQUE (root_namespace_id) unique_zoekt_enabled_namespaces_on_root_namespace_id

Referenced by

zoekt_indices

14 cols · no RLS · line 35403View in 3D
  • Nullable foreign key zoekt_enabled_namespace_idzoekt_indices.zoekt_enabled_namespace_id may be NULL, so the relationship to zoekt_enabled_namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key zoekt_replica_idzoekt_indices.zoekt_replica_id may be NULL, so the relationship to zoekt_replicas is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK zoekt_enabled_namespace_id, zoekt_replica_idzoekt_indices has several nullable FKs (zoekt_enabled_namespace_id, zoekt_replica_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
zoekt_enabled_namespace_id bigintnullzoekt_enabled_namespaces.id 1:N · SET NULL
zoekt_node_id bigintNOT NULLzoekt_nodes.id 1:N · CASCADE
namespace_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
state smallintNOT NULL0
zoekt_replica_id bigintnullzoekt_replicas.id 1:N · SET NULL
reserved_storage_bytes bigintnullCAST('10737418240' AS bigint)
used_storage_bytes bigintNOT NULL0
watermark_level smallintNOT NULL0
metadata jsonbNOT NULLCAST('{}' AS jsonb)
used_storage_bytes_updated_at timestamptzNOT NULLCAST('1970-01-01 00:00:00+00' AS timestamptz)
last_indexed_at timestamptzNOT NULLCAST('1970-01-01 00:00:00+00' AS timestamptz)

Indexes

  • (used_storage_bytes_updated_at) WHERE last_indexed_at >= used_storage_bytes_updated_at idx_zoekt_last_indexed_at_gt_used_storage_bytes_updated_at
  • (id) WHERE (watermark_level = 10 AND state = 10) OR watermark_level = 60 index_zoekt_indices_on_id_conditional_watermark_level_state
  • (namespace_id, zoekt_enabled_namespace_id) index_zoekt_indices_on_namespace_id
  • (zoekt_replica_id) index_zoekt_indices_on_replica_id
  • UNIQUE (state, id) index_zoekt_indices_on_state_and_id
  • (state, zoekt_node_id) index_zoekt_indices_on_state_and_zoekt_node_id
  • (watermark_level, id) index_zoekt_indices_on_watermark_level_and_id
  • (watermark_level, id) WHERE reserved_storage_bytes > 0 index_zoekt_indices_on_watermark_level_reserved_storage_bytes
  • UNIQUE (zoekt_node_id, id) index_zoekt_indices_on_zoekt_node_id_and_id
  • UNIQUE (zoekt_enabled_namespace_id, zoekt_node_id) u_zoekt_indices_zoekt_enabled_namespace_id_and_zoekt_node_id

Referenced by

zoekt_nodes

15 cols · no RLS · line 35429View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
uuid uuidNOT NULL
used_bytes bigintNOT NULL0
total_bytes bigintNOT NULL0
last_seen_at timestamptzNOT NULLCAST('1970-01-01 00:00:00+00' AS timestamptz)
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
index_base_url textNOT NULLCHECK char_length(index_base_url) <= 1024
search_base_url textNOT NULLCHECK char_length(search_base_url) <= 1024
metadata jsonbNOT NULLCAST('{}' AS jsonb)
indexed_bytes bigintNOT NULL0
usable_storage_bytes bigintNOT NULL0
schema_version smallintNOT NULL0
services smallint[]NOT NULLCAST('{0}' AS smallint[])
webserver_last_seen_at timestamptznull

Indexes

  • (last_seen_at) index_zoekt_nodes_on_last_seen_at
  • UNIQUE (uuid) index_zoekt_nodes_on_uuid

Referenced by

Table checks: char_length(search_base_url) <= 1024; char_length(index_base_url) <= 1024

zoekt_replicas

6 cols · no RLS · line 35458View in 3D
  • Junction table allows duplicate links namespace_id, zoekt_enabled_namespace_idzoekt_replicas looks like a many-to-many link table but has no unique constraint across (namespace_id, zoekt_enabled_namespace_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
zoekt_enabled_namespace_id bigintNOT NULLzoekt_enabled_namespaces.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
state smallintNOT NULL0

Indexes

  • (zoekt_enabled_namespace_id) index_zoekt_replicas_on_enabled_namespace_id
  • (namespace_id, zoekt_enabled_namespace_id) index_zoekt_replicas_on_namespace_id_enabled_namespace_id
  • (state) index_zoekt_replicas_on_state

Referenced by

zoekt_repositories

12 cols · no RLS · line 35476View in 3D
  • Nullable foreign key project_idzoekt_repositories.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
zoekt_index_id bigintNOT NULLzoekt_indices.id 1:N · RESTRICT
project_id bigintnullprojects.id 1:N · SET NULL
project_identifier bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
indexed_at timestamptznull
state smallintNOT NULL0
size_bytes bigintNOT NULL0
index_file_count integerNOT NULL0
retries_left smallintNOT NULL10
schema_version smallintNOT NULL0

Indexes

  • (zoekt_index_id, size_bytes) idx_zoekt_repositories_on_zoekt_index_id_and_size_bytes
  • (project_identifier, state, schema_version) idx_zoekt_repositories_project_state_schema
  • (zoekt_index_id, state, schema_version) idx_zoekt_repositories_zoekt_index_id_state_schema_version
  • (project_id) WHERE project_id IS NULL index_zoekt_repos_with_missing_project_id
  • (project_id) index_zoekt_repositories_on_project_id
  • (schema_version) index_zoekt_repositories_on_schema_version
  • (state) index_zoekt_repositories_on_state
  • UNIQUE (zoekt_index_id, project_id) u_zoekt_repositories_zoekt_index_id_and_project_id

Referenced by

  • nothing

Table checks: project_id IS NULL OR project_identifier = project_id; retries_left > 0 OR (retries_left = 0 AND state >= 200)

analytics 76 tables

Tables whose names start with analytics_.

Entity-relationship diagram: analytics_cycle_analytics_issue_stage_events, analytics_cycle_analytics_issue_stage_events_00, analytics_cycle_analytics_issue_stage_events_01, analytics_cycle_analytics_issue_stage_events_02, analytics_cycle_analytics_issue_stage_events_03, analytics_cycle_analytics_issue_stage_events_04, analytics_cycle_analytics_issue_stage_events_05, analytics_cycle_analytics_issue_stage_events_06, analytics_cycle_analytics_issue_stage_events_07, analytics_cycle_analytics_issue_stage_events_08, analytics_cycle_analytics_issue_stage_events_09, analytics_cycle_analytics_issue_stage_events_10, analytics_cycle_analytics_issue_stage_events_11, analytics_cycle_analytics_issue_stage_events_12, analytics_cycle_analytics_issue_stage_events_13, analytics_cycle_analytics_issue_stage_events_14, analytics_cycle_analytics_issue_stage_events_15, analytics_cycle_analytics_issue_stage_events_16, analytics_cycle_analytics_issue_stage_events_17, analytics_cycle_analytics_issue_stage_events_18, analytics_cycle_analytics_issue_stage_events_19, analytics_cycle_analytics_issue_stage_events_20, analytics_cycle_analytics_issue_stage_events_21, analytics_cycle_analytics_issue_stage_events_22, analytics_cycle_analytics_issue_stage_events_23, analytics_cycle_analytics_issue_stage_events_24, analytics_cycle_analytics_issue_stage_events_25, analytics_cycle_analytics_issue_stage_events_26, analytics_cycle_analytics_issue_stage_events_27, analytics_cycle_analytics_issue_stage_events_28, analytics_cycle_analytics_issue_stage_events_29, analytics_cycle_analytics_issue_stage_events_30, analytics_cycle_analytics_issue_stage_events_31, analytics_cycle_analytics_merge_request_stage_events, analytics_cycle_analytics_merge_request_stage_events_00, analytics_cycle_analytics_merge_request_stage_events_01, analytics_cycle_analytics_merge_request_stage_events_02, analytics_cycle_analytics_merge_request_stage_events_03, analytics_cycle_analytics_merge_request_stage_events_04, analytics_cycle_analytics_merge_request_stage_events_05, analytics_cycle_analytics_merge_request_stage_events_06, analytics_cycle_analytics_merge_request_stage_events_07, analytics_cycle_analytics_merge_request_stage_events_08, analytics_cycle_analytics_merge_request_stage_events_09, analytics_cycle_analytics_merge_request_stage_events_10, analytics_cycle_analytics_merge_request_stage_events_11, analytics_cycle_analytics_merge_request_stage_events_12, analytics_cycle_analytics_merge_request_stage_events_13, analytics_cycle_analytics_merge_request_stage_events_14, analytics_cycle_analytics_merge_request_stage_events_15, analytics_cycle_analytics_merge_request_stage_events_16, analytics_cycle_analytics_merge_request_stage_events_17, analytics_cycle_analytics_merge_request_stage_events_18, analytics_cycle_analytics_merge_request_stage_events_19, analytics_cycle_analytics_merge_request_stage_events_20, analytics_cycle_analytics_merge_request_stage_events_21, analytics_cycle_analytics_merge_request_stage_events_22, analytics_cycle_analytics_merge_request_stage_events_23, analytics_cycle_analytics_merge_request_stage_events_24, analytics_cycle_analytics_merge_request_stage_events_25, analytics_cycle_analytics_merge_request_stage_events_26, analytics_cycle_analytics_merge_request_stage_events_27, analytics_cycle_analytics_merge_request_stage_events_28, analytics_cycle_analytics_merge_request_stage_events_29, analytics_cycle_analytics_merge_request_stage_events_30, analytics_cycle_analytics_merge_request_stage_events_31, analytics_cycle_analytics_aggregations, analytics_cycle_analytics_group_stages, analytics_cycle_analytics_group_value_streams, analytics_cycle_analytics_stage_aggregations, analytics_cycle_analytics_stage_event_hashes, analytics_cycle_analytics_value_stream_settings, analytics_dashboards_pointers, analytics_devops_adoption_segments, analytics_devops_adoption_snapshots, analytics_usage_trends_measurementsanalytics_cycle_analytics_issue_stage_eventsstage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_00stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_01stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_02stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_03stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_04stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_05stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_06stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_07stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_08stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_09stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_10stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_11stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_12stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_13stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_14stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_15stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_16stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_17stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_18stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_19stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_20stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_21stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_22stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_23stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_24stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_25stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_26stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_27stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_28stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_29stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_30stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_issue_stage_events_31stage_event_hash_id PKbigintissue_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintweightintegersprint_idbigintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_eventsstage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_00stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_01stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_02stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_03stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_04stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_05stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_06stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_07stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_08stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_09stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_10stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_11stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_12stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_13stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_14stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_15stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_16stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_17stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_18stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_19stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_20stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_21stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_22stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_23stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_24stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_25stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_26stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_27stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_28stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_29stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_30stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_merge_request_stage_events_31stage_event_hash_id PKbigintmerge_request_id PKbigintgroup_idbigintproject_idbigintmilestone_idbigintauthor_idbigintstart_event_timestamptimestamptzend_event_timestamptimestamptzstate_idsmallintduration_in_millisecondsbigintanalytics_cycle_analytics_aggregationsgroup_id PKbigintincremental_runtimes_in_secondsinteger[]incremental_processed_recordsinteger[]last_incremental_issues_idbigintlast_incremental_merge_requests_idbigintlast_incremental_run_attimestamptzlast_incremental_issues_updated_attimestamptzlast_incremental_merge_requests_updated_attimestamptzlast_full_run_attimestamptzlast_consistency_check_updated_attimestamptzenabledbooleanfull_runtimes_in_secondsinteger[]full_processed_recordsinteger[]last_full_merge_requests_updated_attimestamptzlast_full_issues_updated_attimestamptzlast_full_issues_idbigintlast_full_merge_requests_idbigintlast_consistency_check_issues_stage_event_hash_idbigintlast_consistency_check_issues_start_event_timestamptimestamptzlast_consistency_check_issues_end_event_timestamptimestamptzlast_consistency_check_issues_issuable_idbigintlast_consistency_check_merge_requests_stage_event_hash_idbigintlast_consistency_check_merge_requests_start_event_timestamptimestamptzlast_consistency_check_merge_requests_end_event_timestamptimestamptzlast_consistency_check_merge_requests_issuable_idbigintanalytics_cycle_analytics_group_stagesid PKbigintcreated_attimestamptzupdated_attimestamptzrelative_positionintegerstart_event_identifierintegerend_event_identifierintegergroup_id FKbigintstart_event_label_id FKbigintend_event_label_id FKbiginthiddenbooleancustombooleannamevarchar(255)group_value_stream_id FKbigintstage_event_hash_id FKbigintanalytics_cycle_analytics_group_value_streamsid PKbigintcreated_attimestamptzupdated_attimestamptzgroup_id FKbigintnametextanalytics_cycle_analytics_stage_aggregationsgroup_id FKbigintstage_id PKbigintruntimes_in_secondsinteger[]processed_recordsinteger[]last_issues_idbigintlast_merge_requests_idbigintlast_run_attimestamptzlast_issues_updated_attimestamptzlast_merge_requests_updated_attimestamptzlast_completed_attimestamptzenabledbooleananalytics_cycle_analytics_stage_event_hashesid PKbiginthash_sha256byteaorganization_id FKbigintanalytics_cycle_analytics_value_stream_settingsvalue_stream_id PKbigintproject_ids_filterbigint[]namespace_id FKbigintanalytics_dashboards_pointersid PKbigintnamespace_id FKbigintproject_id FKbiginttarget_project_id FKbigintanalytics_devops_adoption_segmentsid PKbigintlast_recorded_attimestamptzcreated_attimestamptzupdated_attimestamptznamespace_id FKbigintdisplay_namespace_id FKbigintanalytics_devops_adoption_snapshotsid PKbigintrecorded_attimestamptzissue_openedbooleanmerge_request_openedbooleanmerge_request_approvedbooleanrunner_configuredbooleanpipeline_succeededbooleandeploy_succeededbooleanend_timetimestamptztotal_projects_countintegercode_owners_used_countintegernamespace_id FKbigintsast_enabled_countintegerdast_enabled_countintegerdependency_scanning_enabled_countintegercoverage_fuzzing_enabled_countintegervulnerability_management_used_countintegeranalytics_usage_trends_measurementsid PKbigintcountbigintrecorded_attimestamptzidentifiersmallintlabelsnamespacesorganizationsprojectsgroup_idgroup_idorganization_idtarget_project_idnamespace_idproject_iddisplay_namespace_idnamespace_idnamespace_idstage_event_hash_idgroup_value_stream_idstart_event_label_idgroup_idend_event_label_idnamespace_idvalue_stream_idstage_idgroup_id

Relationships

analytics_cycle_analytics_issue_stage_events

12 cols · no RLS · line 7242View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_issue_stage_events_project_duration
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_issue_stage_events_for_consistency_check
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_issue_stage_events_group_duration
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_issue_stage_events_group_in_progress_duration
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_issue_stage_events_project_in_progress_duration

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_00

12 cols · no RLS · line 7258View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_1f6c3faabe
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_c546bb0736
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_c7ac8595d3
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_d8fa9793ad
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_fbf2d3310b

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_01

12 cols · no RLS · line 7273View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_27759556bc
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_435802dd01
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_837cc295f1
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_a9424aa392
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_dc571ba649

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_02

12 cols · no RLS · line 7288View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_234d38a657
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_46b989b294
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_92c09e352b
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_c02f569fba
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_f2848acfc7

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_03

12 cols · no RLS · line 7303View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_0d837a5dda
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_be0a028bcc
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_cd2b2939a4
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_e3d6234929
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_fccbe45c32

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_04

12 cols · no RLS · line 7318View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_0e98daa03c
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_64e3a1dfa1
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_6ec4c4afd4
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_c6ea8a0e26
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_ff39be5400

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_05

12 cols · no RLS · line 7333View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_2b7c0a294e
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_4717e7049b
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_5f24f6ead2
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_5fe1d00845
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_7b7c85eceb

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_06

12 cols · no RLS · line 7348View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_3c2a3a6ac9
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_50c09f6e04
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_66a736da09
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_e1a4f994d8
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_ef6a48bd29

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_07

12 cols · no RLS · line 7363View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_4b1793a4c4
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_59a8209ab6
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_77096a1dc6
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_df62a8c50e
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_ece25b5987

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_08

12 cols · no RLS · line 7378View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_142c4e7ea4
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_241e9a574c
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_6578d04baa
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_71c2b26944
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_c9b14a3d9f

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_09

12 cols · no RLS · line 7393View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_38a538234e
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_50272372ba
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_a6999c65c9
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_ab22231a16
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_cc0ba6343b

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_10

12 cols · no RLS · line 7408View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_055179c3ea
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_6137e27484
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_77c6293242
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_89c49cf697
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_971af9481e

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_11

12 cols · no RLS · line 7423View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_000925dbd7
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_5bfa62771b
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_6add8e74cf
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_a88f20fc98
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_bc189e47ab

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_12

12 cols · no RLS · line 7438View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_25e2aaee9b
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_4c9d14f978
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_74addd1240
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_cbb61ea269
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_de0334da63

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_13

12 cols · no RLS · line 7453View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_10588dbff0
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_436fa9ad5f
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_9201b952a0
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_a9ba23c88e
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_f0cdd09a5e

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_14

12 cols · no RLS · line 7468View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_5f96b344e2
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_75dc81d1d7
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_82c675952c
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_ad55e8b11c
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_c59cde6209

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_15

12 cols · no RLS · line 7483View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_2098118748
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_7ead2300ca
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_81b9cf594f
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_d9384b768d
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_f6b0d458a3

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_16

12 cols · no RLS · line 7498View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_16 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_21e262390a
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_2fcfd0dc70
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_765b0cd8db
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_b3b64068e7
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_f902c261ce

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_17

12 cols · no RLS · line 7513View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_17 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_17fa2812c5
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_adc159c3fe
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_b607012614
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_bee2b94a80
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_ea0c2d3361

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_18

12 cols · no RLS · line 7528View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_18 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_5111e3e7e7
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_6580ecb2db
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_6e64aa1646
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_70c657954b
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_d27b4c84e7

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_19

12 cols · no RLS · line 7543View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_19 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_1f8af04ed1
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_21db459e34
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_5a5f39d824
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_c971e6c5ce
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_db2753330c

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_20

12 cols · no RLS · line 7558View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_20 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_20353089e0
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_491b4b749e
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_bca83177ef
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_d1c24d8199
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_ed094a4f13

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_21

12 cols · no RLS · line 7573View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_21 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_4c2645eef2
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_4d04210a95
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_56281bfb73
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_b3c4c9a53f
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_f705dc8541

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_22

12 cols · no RLS · line 7588View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_22 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_4b22560035
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_60e3480f23
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_cda41e106e
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_e38489ea98
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_ef7be2ae94

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_23

12 cols · no RLS · line 7603View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_23 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_6fa47e1334
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_88b40d6740
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_a9b1763c36
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_b7f21460bb
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_f112fae8ac

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_24

12 cols · no RLS · line 7618View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_24 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_2e1054b181
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_4810ac88f5
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_5445e466ee
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_59ce40fcc4
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_cfa4237c83

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_25

12 cols · no RLS · line 7633View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_25 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_107e123e17
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_1230a7a402
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_389dd3c9fc
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_5b613b5fcf
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_aabc184267

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_26

12 cols · no RLS · line 7648View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_26 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_009e6c1133
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_8464227c80
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_8fb48e72ce
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_abbdf80ab1
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_c8c4219c0a

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_27

12 cols · no RLS · line 7663View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_27 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_22acc9ab11
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_3e6be332b7
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_5e46aea379
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_625ed9e965
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_95a353f50b

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_28

12 cols · no RLS · line 7678View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_28 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_2208bd7d7f
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_2e6991d05b
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_3a8848c00b
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_89c79afe5c
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_ff8741d8d7

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_29

12 cols · no RLS · line 7693View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_29 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_41a1c3a4c6
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_8688b40056
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_8a0fc3de4f
  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_b1dda405af
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_cb222425ed

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_30

12 cols · no RLS · line 7708View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_30 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_0ca85f3d71
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_2c6422f668
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_399dc06649
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_c473921734
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_ed6dbac8c0

Referenced by

  • nothing

analytics_cycle_analytics_issue_stage_events_31

12 cols · no RLS · line 7723View in 3D
  • Isolated tableanalytics_cycle_analytics_issue_stage_events_31 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
weight integernull
sprint_id bigintnull
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_27d7ad78d8
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_4d4f2f7de6
  • (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_4f6fc34e57
  • (stage_event_hash_id, group_id, end_event_timestamp, issue_id) index_ea1b583157
  • (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_eb558957f0

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events

10 cols · no RLS · line 7738View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_merge_request_stage_events_project_duration
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_merge_request_stage_events_group_duration
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_merge_request_stage_events_group_in_progress_duration
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_merge_request_stage_events_project_in_progress_duration
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_mr_stage_events_for_consistency_check

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_00

10 cols · no RLS · line 7752View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_201c5ddbe9
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_c17dae3605
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_c66758baa7
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_ce87cbaf2d
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_e64588e276

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_01

10 cols · no RLS · line 7765View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_206349925b
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_23783dc748
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_296f64df5c
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_551676e972
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_d17b82ddd9

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_02

10 cols · no RLS · line 7778View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_070cef72c3
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_24ac321751
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_6b1ce61c8f
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_a46b7b7f26
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_aed7f7b10c

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_03

10 cols · no RLS · line 7791View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_87d40fb9f9
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_9955b1dc59
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_9d0e953ab3
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_b83fe1306b
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_ff00c038cc

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_04

10 cols · no RLS · line 7804View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_47638677a3
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_482a09e0ee
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_682eba05f6
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_6e6c2e6a1d
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_e3d1fd5b19

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_05

10 cols · no RLS · line 7817View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_2ad4b4fdbc
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_39625b8a41
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_5034eae5ff
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_a8276a450f
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_c42b2e7eae

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_06

10 cols · no RLS · line 7830View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_2653e7eeb8
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_281840d2d1
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_ccb4f5c5a6
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_d6047ee813
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_e54adf9acb

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_07

10 cols · no RLS · line 7843View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_203dd694bc
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_223592b4a1
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_7da2307d2e
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_7ecb5b68b4
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_fee429223e

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_08

10 cols · no RLS · line 7856View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_4f2eb7a06b
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_91d5e4e3df
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_9b8e89ae41
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_c435d904ce
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_d2fe918e83

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_09

10 cols · no RLS · line 7869View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_0f28a65451
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_69bdcf213e
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_b4b2bba753
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_c09bb66559
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_d35c969634

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_10

10 cols · no RLS · line 7882View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_22ed8f01dd
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_2f80c360c3
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_4db5aa5872
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_80c65daf20
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_f91599d825

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_11

10 cols · no RLS · line 7895View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_02749b504c
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_584c1e6fb0
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_5b944f308d
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_a1a9dc36c1
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_c08e669dfa

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_12

10 cols · no RLS · line 7908View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_2fc271c673
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_59cfd5bc9a
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_64eb4cf8bd
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_9490e0e0b7
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_e6405afea0

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_13

10 cols · no RLS · line 7921View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_09af45dd6f
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_0c153e2eae
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_5bc2f32084
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_7f543eed8d
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_807671c4be

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_14

10 cols · no RLS · line 7934View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_2dfcdbe81e
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_52ea79bf8e
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_a6c68d16b2
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_b24e8538c8
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_f76e8a5304

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_15

10 cols · no RLS · line 7947View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_4a243772d7
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_aee84adb5b
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_bcaa8dcd34
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_c1cdd90d0d
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_f878aab8e3

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_16

10 cols · no RLS · line 7960View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_16 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_006f943df6
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_453a659cb6
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_5db09170d4
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_9555c2ae92
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_f256d3f6a1

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_17

10 cols · no RLS · line 7973View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_17 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_4137a6fac3
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_4dead6f314
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_5fb1867c41
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_bedd7e160b
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_f3d7d86e09

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_18

10 cols · no RLS · line 7986View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_18 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_3249505125
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_8b9f9a19a4
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_918bb2ebbb
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_e8f3a327b2
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_f1c3d14cdc

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_19

10 cols · no RLS · line 7999View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_19 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_061fe00461
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_5c4053b63d
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_708d792ae9
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_a2d9f185a5
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_c119f5b92e

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_20

10 cols · no RLS · line 8012View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_20 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_5ee060202f
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_c2b951bf20
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_d03e9cdfae
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_e73bc5ba6a
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_ee4c549a2d

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_21

10 cols · no RLS · line 8025View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_21 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_1b0ea30bdb
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_6cfb391b86
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_83edf231b8
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_a3feed3097
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_d493a5c171

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_22

10 cols · no RLS · line 8038View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_22 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_1a0388713a
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_620fe77c99
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_bf1809b19e
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_d0d285c264
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_e716b8ac3f

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_23

10 cols · no RLS · line 8051View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_23 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_03aa30a758
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_3005c75335
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_6e560c1a4d
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_a99cee1904
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_f86acdc2ff

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_24

10 cols · no RLS · line 8064View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_24 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_1a349ed064
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_5660b1b38e
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_6a39f6d5ac
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_844abd2888
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_d70379e22c

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_25

10 cols · no RLS · line 8077View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_25 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_8685d7c69c
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_9ee83b068b
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_d01ea0126a
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_ec25d494e6
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_f86f73056d

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_26

10 cols · no RLS · line 8090View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_26 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_541cc045fc
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_6f4e0abe54
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_a8fe03fe34
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_a9deff2159
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_fbccc855cf

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_27

10 cols · no RLS · line 8103View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_27 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_16627b455e
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_1af932a3c7
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_2945cf4c6d
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_72027c157f
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_f47327ec1f

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_28

10 cols · no RLS · line 8116View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_28 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_14e4fa1d7d
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_14f3645821
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_372160a706
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_3a10b315c0
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_8b1b6b03b4

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_29

10 cols · no RLS · line 8129View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_29 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_0287f5ba09
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_3206c1e6af
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_3640194b77
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_8a8eb06b9a
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_d69c2485f4

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_30

10 cols · no RLS · line 8142View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_30 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_08e3cfc564
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_331eb67441
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_4e6ce1c371
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_5913107510
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_6ea423bbd1

Referenced by

  • nothing

analytics_cycle_analytics_merge_request_stage_events_31

10 cols · no RLS · line 8155View in 3D
  • Isolated tableanalytics_cycle_analytics_merge_request_stage_events_31 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
stage_event_hash_id PKbigintNOT NULL
merge_request_id PKbigintNOT NULL
group_id bigintNOT NULL
project_id bigintNOT NULL
milestone_id bigintnull
author_id bigintnull
start_event_timestamp timestamptzNOT NULL
end_event_timestamp timestamptznull
state_id smallintNOT NULL1
duration_in_milliseconds bigintnull

Indexes

  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_2745f5a388
  • (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id) index_5e78c2eac1
  • (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_739845f617
  • (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE end_event_timestamp IS NOT NULL index_807fa83fc0
  • (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE end_event_timestamp IS NULL AND state_id = 1 index_83c5049b3e

Referenced by

  • nothing

analytics_cycle_analytics_aggregations

25 cols · no RLS · line 13592View in 3D
ColumnTypeNullDefaultReferencesNotes
group_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
incremental_runtimes_in_seconds integer[]NOT NULLCAST('{}' AS integer[])CHECK cardinality(incremental_runtimes_in_seconds) <= 10
incremental_processed_records integer[]NOT NULLCAST('{}' AS integer[])CHECK cardinality(incremental_processed_records) <= 10
last_incremental_issues_id bigintnull
last_incremental_merge_requests_id bigintnull
last_incremental_run_at timestamptznull
last_incremental_issues_updated_at timestamptznull
last_incremental_merge_requests_updated_at timestamptznull
last_full_run_at timestamptznull
last_consistency_check_updated_at timestamptznull
enabled booleanNOT NULLTRUE
full_runtimes_in_seconds integer[]NOT NULLCAST('{}' AS integer[])CHECK cardinality(full_runtimes_in_seconds) <= 10
full_processed_records integer[]NOT NULLCAST('{}' AS integer[])CHECK cardinality(full_processed_records) <= 10
last_full_merge_requests_updated_at timestamptznull
last_full_issues_updated_at timestamptznull
last_full_issues_id bigintnull
last_full_merge_requests_id bigintnull
last_consistency_check_issues_stage_event_hash_id bigintnull
last_consistency_check_issues_start_event_timestamp timestamptznull
last_consistency_check_issues_end_event_timestamp timestamptznull
last_consistency_check_issues_issuable_id bigintnull
last_consistency_check_merge_requests_stage_event_hash_id bigintnull
last_consistency_check_merge_requests_start_event_timestamp timestamptznull
last_consistency_check_merge_requests_end_event_timestamp timestamptznull
last_consistency_check_merge_requests_issuable_id bigintnull

Indexes

  • (last_consistency_check_updated_at) WHERE …(enabled) ca_aggregations_last_consistency_check_updated_at
  • (last_full_run_at) WHERE …(enabled) ca_aggregations_last_full_run_at
  • (last_incremental_run_at) WHERE …(enabled) ca_aggregations_last_incremental_run_at

Referenced by

  • nothing

Table checks: cardinality(incremental_runtimes_in_seconds) <= 10; cardinality(incremental_processed_records) <= 10; cardinality(full_processed_records) <= 10; cardinality(full_runtimes_in_seconds) <= 10

analytics_cycle_analytics_group_stages

14 cols · no RLS · line 13624View in 3D
  • Nullable foreign key stage_event_hash_idanalytics_cycle_analytics_group_stages.stage_event_hash_id may be NULL, so the relationship to analytics_cycle_analytics_stage_event_hashes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key start_event_label_idanalytics_cycle_analytics_group_stages.start_event_label_id may be NULL, so the relationship to labels is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key end_event_label_idanalytics_cycle_analytics_group_stages.end_event_label_id may be NULL, so the relationship to labels is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK stage_event_hash_id, start_event_label_id, end_event_label_idanalytics_cycle_analytics_group_stages has several nullable FKs (stage_event_hash_id, start_event_label_id, end_event_label_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_position integernull
start_event_identifier integerNOT NULL
end_event_identifier integerNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
start_event_label_id bigintnulllabels.id 1:N · CASCADE
end_event_label_id bigintnulllabels.id 1:N · CASCADE
hidden booleanNOT NULLFALSE
custom booleanNOT NULLTRUE
name varchar(255)NOT NULL
group_value_stream_id bigintNOT NULLanalytics_cycle_analytics_group_value_streams.id 1:N · CASCADE
stage_event_hash_id bigintnullanalytics_cycle_analytics_stage_event_hashes.id 1:N · CASCADECHECK stage_event_hash_id IS NOT NULL

Indexes

  • (end_event_label_id) index_analytics_ca_group_stages_on_end_event_label_id
  • (relative_position) index_analytics_ca_group_stages_on_relative_position
  • (start_event_label_id) index_analytics_ca_group_stages_on_start_event_label_id
  • (group_value_stream_id) index_analytics_ca_group_stages_on_value_stream_id
  • (id) WHERE custom = TRUE index_analytics_cycle_analytics_group_stages_custom_only
  • UNIQUE (group_id, group_value_stream_id, name) index_group_stages_on_group_id_group_value_stream_id_and_name
  • (stage_event_hash_id) index_group_stages_on_stage_event_hash_id

Referenced by

Table checks: stage_event_hash_id IS NOT NULL

analytics_cycle_analytics_group_value_streams

5 cols · no RLS · line 13651View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 100

Indexes

  • UNIQUE (group_id, name) index_analytics_ca_group_value_streams_on_group_id_and_name

Referenced by

Table checks: char_length(name) <= 100

analytics_cycle_analytics_stage_aggregations

11 cols · no RLS · line 13669View in 3D
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
stage_id PKbigintNOT NULLanalytics_cycle_analytics_group_stages.id 1:1 · CASCADE
runtimes_in_seconds integer[]NOT NULLCAST('{}' AS integer[])CHECK cardinality(runtimes_in_seconds) <= 10
processed_records integer[]NOT NULLCAST('{}' AS integer[])CHECK cardinality(processed_records) <= 10
last_issues_id bigintnull
last_merge_requests_id bigintnull
last_run_at timestamptznull
last_issues_updated_at timestamptznull
last_merge_requests_updated_at timestamptznull
last_completed_at timestamptznull
enabled booleanNOT NULLTRUE

Indexes

  • (group_id) index_analytics_cycle_analytics_stage_aggregations_on_group_id
  • (last_run_at) WHERE last_completed_at IS NULL AND enabled = TRUE index_ca_enabled_incomplete_aggregation_stages_on_last_run_at

Referenced by

  • nothing

Table checks: cardinality(runtimes_in_seconds) <= 10; cardinality(processed_records) <= 10

analytics_cycle_analytics_stage_event_hashes

3 cols · no RLS · line 13685View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
hash_sha256 byteanull
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE

Indexes

  • UNIQUE (organization_id, hash_sha256) index_cycle_analytics_stage_event_hashes_on_org_id_sha_256

Referenced by

analytics_cycle_analytics_value_stream_settings

3 cols · no RLS · line 13700View in 3D
  • Junction table allows duplicate links namespace_id, value_stream_idanalytics_cycle_analytics_value_stream_settings looks like a many-to-many link table but has no unique constraint across (namespace_id, value_stream_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
value_stream_id PKbigintNOT NULLanalytics_cycle_analytics_group_value_streams.id 1:1 · CASCADE
project_ids_filter bigint[]nullCAST('{}' AS bigint[])CHECK cardinality(project_ids_filter) <= 100 AND array_position(project_ids_filter, CAST(NULL AS bigint)) IS NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • (namespace_id) index_analytics_cycle_analytics_value_stream_settings_on_namesp

Referenced by

  • nothing

Table checks: cardinality(project_ids_filter) <= 100 AND array_position(project_ids_filter, CAST(NULL AS bigint)) IS NULL

analytics_dashboards_pointers

4 cols · no RLS · line 13707View in 3D
  • Nullable foreign key namespace_idanalytics_dashboards_pointers.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idanalytics_dashboards_pointers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintnullnamespaces.id 1:1 · CASCADE
project_id bigintnullprojects.id 1:1 · CASCADE
target_project_id bigintNOT NULLprojects.id 1:N · CASCADE

Indexes

  • UNIQUE (project_id) idx_uniq_analytics_dashboards_pointers_on_project_id
  • UNIQUE (namespace_id) index_analytics_dashboards_pointers_on_namespace_id
  • (target_project_id) index_analytics_dashboards_pointers_on_target_project_id

Referenced by

  • nothing

Table checks: project_id IS NULL <> namespace_id IS NULL

analytics_devops_adoption_segments

6 cols · no RLS · line 13724View in 3D
  • Nullable foreign key display_namespace_idanalytics_devops_adoption_segments.display_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idanalytics_devops_adoption_segments.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK display_namespace_id, namespace_idanalytics_devops_adoption_segments has several nullable FKs (display_namespace_id, namespace_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
last_recorded_at timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL
display_namespace_id bigintnullnamespaces.id 1:N · CASCADE

Indexes

  • (namespace_id) idx_analytics_devops_adoption_segments_on_namespace_id
  • UNIQUE (display_namespace_id, namespace_id) idx_devops_adoption_segments_namespaces_pair

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

analytics_devops_adoption_snapshots

17 cols · no RLS · line 13743View in 3D
  • Nullable foreign key namespace_idanalytics_devops_adoption_snapshots.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
recorded_at timestamptzNOT NULL
issue_opened booleanNOT NULL
merge_request_opened booleanNOT NULL
merge_request_approved booleanNOT NULL
runner_configured booleanNOT NULL
pipeline_succeeded booleanNOT NULL
deploy_succeeded booleanNOT NULL
end_time timestamptzNOT NULL
total_projects_count integernull
code_owners_used_count integernull
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL
sast_enabled_count integernull
dast_enabled_count integernull
dependency_scanning_enabled_count integernull
coverage_fuzzing_enabled_count integernull
vulnerability_management_used_count integernull

Indexes

  • (namespace_id, end_time) WHERE recorded_at >= end_time idx_analytics_devops_adoption_snapshots_finalized
  • (namespace_id, end_time) idx_devops_adoption_segments_namespace_end_time
  • (namespace_id, recorded_at) idx_devops_adoption_segments_namespace_recorded_at

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

issue 74 tables

Tables whose names start with issue_.

Entity-relationship diagram: issue_search_data, issue_search_data_00, issue_search_data_01, issue_search_data_02, issue_search_data_03, issue_search_data_04, issue_search_data_05, issue_search_data_06, issue_search_data_07, issue_search_data_08, issue_search_data_09, issue_search_data_10, issue_search_data_11, issue_search_data_12, issue_search_data_13, issue_search_data_14, issue_search_data_15, issue_search_data_16, issue_search_data_17, issue_search_data_18, issue_search_data_19, issue_search_data_20, issue_search_data_21, issue_search_data_22, issue_search_data_23, issue_search_data_24, issue_search_data_25, issue_search_data_26, issue_search_data_27, issue_search_data_28, issue_search_data_29, issue_search_data_30, issue_search_data_31, issue_search_data_32, issue_search_data_33, issue_search_data_34, issue_search_data_35, issue_search_data_36, issue_search_data_37, issue_search_data_38, issue_search_data_39, issue_search_data_40, issue_search_data_41, issue_search_data_42, issue_search_data_43, issue_search_data_44, issue_search_data_45, issue_search_data_46, issue_search_data_47, issue_search_data_48, issue_search_data_49, issue_search_data_50, issue_search_data_51, issue_search_data_52, issue_search_data_53, issue_search_data_54, issue_search_data_55, issue_search_data_56, issue_search_data_57, issue_search_data_58, issue_search_data_59, issue_search_data_60, issue_search_data_61, issue_search_data_62, issue_search_data_63, issue_assignees, issue_assignment_events, issue_customer_relations_contacts, issue_email_participants, issue_emails, issue_links, issue_metrics, issue_tracker_data, issue_user_mentionsissue_search_dataproject_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_id FKbigintissue_search_data_00project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_01project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_02project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_03project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_04project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_05project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_06project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_07project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_08project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_09project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_10project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_11project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_12project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_13project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_14project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_15project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_16project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_17project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_18project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_19project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_20project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_21project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_22project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_23project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_24project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_25project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_26project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_27project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_28project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_29project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_30project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_31project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_32project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_33project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_34project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_35project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_36project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_37project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_38project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_39project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_40project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_41project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_42project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_43project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_44project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_45project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_46project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_47project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_48project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_49project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_50project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_51project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_52project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_53project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_54project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_55project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_56project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_57project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_58project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_59project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_60project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_61project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_62project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_search_data_63project_id PKbigintissue_id PKbigintcreated_attimestamptzupdated_attimestamptzsearch_vectortsvectornamespace_idbigintissue_assigneesuser_id PKbigintissue_id PKbigintnamespace_id FKbigintissue_assignment_eventsid PKbigintuser_id FKbigintissue_id FKbigintcreated_attimestamptzactionsmallintnamespace_id FKbigintissue_customer_relations_contactsid PKbigintissue_id FKbigintcontact_id FKbigintcreated_attimestamptzupdated_attimestamptznamespace_id FKbigintissue_email_participantsid PKbigintissue_id FKbigintcreated_attimestamptzupdated_attimestamptzemailtextnamespace_id FKbigintissue_emailsid PKbigintissue_id FKbigintemail_message_idtextnamespace_id FKbigintissue_linksid PKbigintsource_id FKbiginttarget_id FKbigintcreated_attimestampupdated_attimestamplink_typesmallintnamespace_id FKbigintissue_metricsid PKbigintissue_id FKbigintfirst_mentioned_in_commit_attimestampfirst_associated_with_milestone_attimestampfirst_added_to_board_attimestampcreated_attimestampupdated_attimestampnamespace_id FKbigintissue_tracker_dataid PKbigintcreated_attimestamptzupdated_attimestamptzencrypted_project_urlvarcharencrypted_project_url_ivvarcharencrypted_issues_urlvarcharencrypted_issues_url_ivvarcharencrypted_new_issue_urlvarcharencrypted_new_issue_url_ivvarcharintegration_id FKbigintproject_id FKbigintgroup_id FKbigintorganization_id FKbigintissue_user_mentionsid PKbigintissue_id FKbigintmentioned_users_idsbigint[]mentioned_projects_idsbigint[]mentioned_groups_idsbigint[]note_id FKbigintnamespace_id FKbigintcustomer_relations_contactsintegrationsissuesnamespacesnotesorganizationsprojectsusersnamespace_iduser_idissue_idnamespace_idissue_iduser_idissue_idnamespace_idcontact_idnamespace_idissue_idnamespace_idissue_idnamespace_idsource_idtarget_idnamespace_idissue_idnamespace_idissue_idproject_idintegration_idgroup_idorganization_idproject_idnamespace_idnote_idissue_id

Relationships

issue_search_data

6 cols · no RLS · line 8168View in 3D
  • Nullable foreign key namespace_idissue_search_data.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:N · CASCADE
issue_id PKbigintNOT NULLissues.id 1:N · CASCADE
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnullnamespaces.id 1:N · CASCADE

Indexes

  • (namespace_id) index_issue_search_data_on_namespace_id
  • (issue_id) index_issue_search_data_on_issue_id
  • (search_vector) index_issue_search_data_on_search_vector

Referenced by

  • nothing

issue_search_data_00

6 cols · no RLS · line 8178View in 3D
  • Isolated tableissue_search_data_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_bcae2cf631
  • (issue_id) issue_search_data_00_issue_id_idx
  • (search_vector) issue_search_data_00_search_vector_idx

Referenced by

  • nothing

issue_search_data_01

6 cols · no RLS · line 8187View in 3D
  • Isolated tableissue_search_data_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_09fe0c1886
  • (issue_id) issue_search_data_01_issue_id_idx
  • (search_vector) issue_search_data_01_search_vector_idx

Referenced by

  • nothing

issue_search_data_02

6 cols · no RLS · line 8196View in 3D
  • Isolated tableissue_search_data_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_77f67bf238
  • (issue_id) issue_search_data_02_issue_id_idx
  • (search_vector) issue_search_data_02_search_vector_idx

Referenced by

  • nothing

issue_search_data_03

6 cols · no RLS · line 8205View in 3D
  • Isolated tableissue_search_data_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_eadcc94c4e
  • (issue_id) issue_search_data_03_issue_id_idx
  • (search_vector) issue_search_data_03_search_vector_idx

Referenced by

  • nothing

issue_search_data_04

6 cols · no RLS · line 8214View in 3D
  • Isolated tableissue_search_data_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_aa92d75d85
  • (issue_id) issue_search_data_04_issue_id_idx
  • (search_vector) issue_search_data_04_search_vector_idx

Referenced by

  • nothing

issue_search_data_05

6 cols · no RLS · line 8223View in 3D
  • Isolated tableissue_search_data_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_b286c595e8
  • (issue_id) issue_search_data_05_issue_id_idx
  • (search_vector) issue_search_data_05_search_vector_idx

Referenced by

  • nothing

issue_search_data_06

6 cols · no RLS · line 8232View in 3D
  • Isolated tableissue_search_data_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_680d7ab4a6
  • (issue_id) issue_search_data_06_issue_id_idx
  • (search_vector) issue_search_data_06_search_vector_idx

Referenced by

  • nothing

issue_search_data_07

6 cols · no RLS · line 8241View in 3D
  • Isolated tableissue_search_data_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_7a0b7ffadf
  • (issue_id) issue_search_data_07_issue_id_idx
  • (search_vector) issue_search_data_07_search_vector_idx

Referenced by

  • nothing

issue_search_data_08

6 cols · no RLS · line 8250View in 3D
  • Isolated tableissue_search_data_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_b6cc38a848
  • (issue_id) issue_search_data_08_issue_id_idx
  • (search_vector) issue_search_data_08_search_vector_idx

Referenced by

  • nothing

issue_search_data_09

6 cols · no RLS · line 8259View in 3D
  • Isolated tableissue_search_data_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_eb5a7f918a
  • (issue_id) issue_search_data_09_issue_id_idx
  • (search_vector) issue_search_data_09_search_vector_idx

Referenced by

  • nothing

issue_search_data_10

6 cols · no RLS · line 8268View in 3D
  • Isolated tableissue_search_data_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_1076a9a98a
  • (issue_id) issue_search_data_10_issue_id_idx
  • (search_vector) issue_search_data_10_search_vector_idx

Referenced by

  • nothing

issue_search_data_11

6 cols · no RLS · line 8277View in 3D
  • Isolated tableissue_search_data_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_a4f5106804
  • (issue_id) issue_search_data_11_issue_id_idx
  • (search_vector) issue_search_data_11_search_vector_idx

Referenced by

  • nothing

issue_search_data_12

6 cols · no RLS · line 8286View in 3D
  • Isolated tableissue_search_data_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_3b09ab5902
  • (issue_id) issue_search_data_12_issue_id_idx
  • (search_vector) issue_search_data_12_search_vector_idx

Referenced by

  • nothing

issue_search_data_13

6 cols · no RLS · line 8295View in 3D
  • Isolated tableissue_search_data_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_f836021e1e
  • (issue_id) issue_search_data_13_issue_id_idx
  • (search_vector) issue_search_data_13_search_vector_idx

Referenced by

  • nothing

issue_search_data_14

6 cols · no RLS · line 8304View in 3D
  • Isolated tableissue_search_data_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_f402f6a388
  • (issue_id) issue_search_data_14_issue_id_idx
  • (search_vector) issue_search_data_14_search_vector_idx

Referenced by

  • nothing

issue_search_data_15

6 cols · no RLS · line 8313View in 3D
  • Isolated tableissue_search_data_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_b748a3e0a6
  • (issue_id) issue_search_data_15_issue_id_idx
  • (search_vector) issue_search_data_15_search_vector_idx

Referenced by

  • nothing

issue_search_data_16

6 cols · no RLS · line 8322View in 3D
  • Isolated tableissue_search_data_16 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_91c432a4bd
  • (issue_id) issue_search_data_16_issue_id_idx
  • (search_vector) issue_search_data_16_search_vector_idx

Referenced by

  • nothing

issue_search_data_17

6 cols · no RLS · line 8331View in 3D
  • Isolated tableissue_search_data_17 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_d3b6418940
  • (issue_id) issue_search_data_17_issue_id_idx
  • (search_vector) issue_search_data_17_search_vector_idx

Referenced by

  • nothing

issue_search_data_18

6 cols · no RLS · line 8340View in 3D
  • Isolated tableissue_search_data_18 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_f415dc2abd
  • (issue_id) issue_search_data_18_issue_id_idx
  • (search_vector) issue_search_data_18_search_vector_idx

Referenced by

  • nothing

issue_search_data_19

6 cols · no RLS · line 8349View in 3D
  • Isolated tableissue_search_data_19 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_3a7d21a6ee
  • (issue_id) issue_search_data_19_issue_id_idx
  • (search_vector) issue_search_data_19_search_vector_idx

Referenced by

  • nothing

issue_search_data_20

6 cols · no RLS · line 8358View in 3D
  • Isolated tableissue_search_data_20 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_b377ac6784
  • (issue_id) issue_search_data_20_issue_id_idx
  • (search_vector) issue_search_data_20_search_vector_idx

Referenced by

  • nothing

issue_search_data_21

6 cols · no RLS · line 8367View in 3D
  • Isolated tableissue_search_data_21 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_9a2eb72a3b
  • (issue_id) issue_search_data_21_issue_id_idx
  • (search_vector) issue_search_data_21_search_vector_idx

Referenced by

  • nothing

issue_search_data_22

6 cols · no RLS · line 8376View in 3D
  • Isolated tableissue_search_data_22 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_6bf2b9282c
  • (issue_id) issue_search_data_22_issue_id_idx
  • (search_vector) issue_search_data_22_search_vector_idx

Referenced by

  • nothing

issue_search_data_23

6 cols · no RLS · line 8385View in 3D
  • Isolated tableissue_search_data_23 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_6b431c9952
  • (issue_id) issue_search_data_23_issue_id_idx
  • (search_vector) issue_search_data_23_search_vector_idx

Referenced by

  • nothing

issue_search_data_24

6 cols · no RLS · line 8394View in 3D
  • Isolated tableissue_search_data_24 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_4ea50d3a5b
  • (issue_id) issue_search_data_24_issue_id_idx
  • (search_vector) issue_search_data_24_search_vector_idx

Referenced by

  • nothing

issue_search_data_25

6 cols · no RLS · line 8403View in 3D
  • Isolated tableissue_search_data_25 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_efa25b26bd
  • (issue_id) issue_search_data_25_issue_id_idx
  • (search_vector) issue_search_data_25_search_vector_idx

Referenced by

  • nothing

issue_search_data_26

6 cols · no RLS · line 8412View in 3D
  • Isolated tableissue_search_data_26 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_c8bbf2b334
  • (issue_id) issue_search_data_26_issue_id_idx
  • (search_vector) issue_search_data_26_search_vector_idx

Referenced by

  • nothing

issue_search_data_27

6 cols · no RLS · line 8421View in 3D
  • Isolated tableissue_search_data_27 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_106d7d97e8
  • (issue_id) issue_search_data_27_issue_id_idx
  • (search_vector) issue_search_data_27_search_vector_idx

Referenced by

  • nothing

issue_search_data_28

6 cols · no RLS · line 8430View in 3D
  • Isolated tableissue_search_data_28 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_db6477916f
  • (issue_id) issue_search_data_28_issue_id_idx
  • (search_vector) issue_search_data_28_search_vector_idx

Referenced by

  • nothing

issue_search_data_29

6 cols · no RLS · line 8439View in 3D
  • Isolated tableissue_search_data_29 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_20c6491c6e
  • (issue_id) issue_search_data_29_issue_id_idx
  • (search_vector) issue_search_data_29_search_vector_idx

Referenced by

  • nothing

issue_search_data_30

6 cols · no RLS · line 8448View in 3D
  • Isolated tableissue_search_data_30 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_f06b4c7a23
  • (issue_id) issue_search_data_30_issue_id_idx
  • (search_vector) issue_search_data_30_search_vector_idx

Referenced by

  • nothing

issue_search_data_31

6 cols · no RLS · line 8457View in 3D
  • Isolated tableissue_search_data_31 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_af8368d587
  • (issue_id) issue_search_data_31_issue_id_idx
  • (search_vector) issue_search_data_31_search_vector_idx

Referenced by

  • nothing

issue_search_data_32

6 cols · no RLS · line 8466View in 3D
  • Isolated tableissue_search_data_32 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_c3a2cf8b3b
  • (issue_id) issue_search_data_32_issue_id_idx
  • (search_vector) issue_search_data_32_search_vector_idx

Referenced by

  • nothing

issue_search_data_33

6 cols · no RLS · line 8475View in 3D
  • Isolated tableissue_search_data_33 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_19f4ed8614
  • (issue_id) issue_search_data_33_issue_id_idx
  • (search_vector) issue_search_data_33_search_vector_idx

Referenced by

  • nothing

issue_search_data_34

6 cols · no RLS · line 8484View in 3D
  • Isolated tableissue_search_data_34 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_bb6defaa27
  • (issue_id) issue_search_data_34_issue_id_idx
  • (search_vector) issue_search_data_34_search_vector_idx

Referenced by

  • nothing

issue_search_data_35

6 cols · no RLS · line 8493View in 3D
  • Isolated tableissue_search_data_35 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_d87775b2e7
  • (issue_id) issue_search_data_35_issue_id_idx
  • (search_vector) issue_search_data_35_search_vector_idx

Referenced by

  • nothing

issue_search_data_36

6 cols · no RLS · line 8502View in 3D
  • Isolated tableissue_search_data_36 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_a016d4ed08
  • (issue_id) issue_search_data_36_issue_id_idx
  • (search_vector) issue_search_data_36_search_vector_idx

Referenced by

  • nothing

issue_search_data_37

6 cols · no RLS · line 8511View in 3D
  • Isolated tableissue_search_data_37 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_f5f0e8eefd
  • (issue_id) issue_search_data_37_issue_id_idx
  • (search_vector) issue_search_data_37_search_vector_idx

Referenced by

  • nothing

issue_search_data_38

6 cols · no RLS · line 8520View in 3D
  • Isolated tableissue_search_data_38 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_2bac9d64a0
  • (issue_id) issue_search_data_38_issue_id_idx
  • (search_vector) issue_search_data_38_search_vector_idx

Referenced by

  • nothing

issue_search_data_39

6 cols · no RLS · line 8529View in 3D
  • Isolated tableissue_search_data_39 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_71c0e45eca
  • (issue_id) issue_search_data_39_issue_id_idx
  • (search_vector) issue_search_data_39_search_vector_idx

Referenced by

  • nothing

issue_search_data_40

6 cols · no RLS · line 8538View in 3D
  • Isolated tableissue_search_data_40 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_34a8b08081
  • (issue_id) issue_search_data_40_issue_id_idx
  • (search_vector) issue_search_data_40_search_vector_idx

Referenced by

  • nothing

issue_search_data_41

6 cols · no RLS · line 8547View in 3D
  • Isolated tableissue_search_data_41 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_08b7071d9b
  • (issue_id) issue_search_data_41_issue_id_idx
  • (search_vector) issue_search_data_41_search_vector_idx

Referenced by

  • nothing

issue_search_data_42

6 cols · no RLS · line 8556View in 3D
  • Isolated tableissue_search_data_42 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_80305b1eed
  • (issue_id) issue_search_data_42_issue_id_idx
  • (search_vector) issue_search_data_42_search_vector_idx

Referenced by

  • nothing

issue_search_data_43

6 cols · no RLS · line 8565View in 3D
  • Isolated tableissue_search_data_43 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_831e7f124f
  • (issue_id) issue_search_data_43_issue_id_idx
  • (search_vector) issue_search_data_43_search_vector_idx

Referenced by

  • nothing

issue_search_data_44

6 cols · no RLS · line 8574View in 3D
  • Isolated tableissue_search_data_44 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_aca42d7cff
  • (issue_id) issue_search_data_44_issue_id_idx
  • (search_vector) issue_search_data_44_search_vector_idx

Referenced by

  • nothing

issue_search_data_45

6 cols · no RLS · line 8583View in 3D
  • Isolated tableissue_search_data_45 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_19aa18ccc9
  • (issue_id) issue_search_data_45_issue_id_idx
  • (search_vector) issue_search_data_45_search_vector_idx

Referenced by

  • nothing

issue_search_data_46

6 cols · no RLS · line 8592View in 3D
  • Isolated tableissue_search_data_46 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_5968e77935
  • (issue_id) issue_search_data_46_issue_id_idx
  • (search_vector) issue_search_data_46_search_vector_idx

Referenced by

  • nothing

issue_search_data_47

6 cols · no RLS · line 8601View in 3D
  • Isolated tableissue_search_data_47 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_beaa329ca0
  • (issue_id) issue_search_data_47_issue_id_idx
  • (search_vector) issue_search_data_47_search_vector_idx

Referenced by

  • nothing

issue_search_data_48

6 cols · no RLS · line 8610View in 3D
  • Isolated tableissue_search_data_48 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_208e7ef042
  • (issue_id) issue_search_data_48_issue_id_idx
  • (search_vector) issue_search_data_48_search_vector_idx

Referenced by

  • nothing

issue_search_data_49

6 cols · no RLS · line 8619View in 3D
  • Isolated tableissue_search_data_49 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_7f8a80dd47
  • (issue_id) issue_search_data_49_issue_id_idx
  • (search_vector) issue_search_data_49_search_vector_idx

Referenced by

  • nothing

issue_search_data_50

6 cols · no RLS · line 8628View in 3D
  • Isolated tableissue_search_data_50 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_927796f71d
  • (issue_id) issue_search_data_50_issue_id_idx
  • (search_vector) issue_search_data_50_search_vector_idx

Referenced by

  • nothing

issue_search_data_51

6 cols · no RLS · line 8637View in 3D
  • Isolated tableissue_search_data_51 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_876145d1d5
  • (issue_id) issue_search_data_51_issue_id_idx
  • (search_vector) issue_search_data_51_search_vector_idx

Referenced by

  • nothing

issue_search_data_52

6 cols · no RLS · line 8646View in 3D
  • Isolated tableissue_search_data_52 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_1b47bbbb6a
  • (issue_id) issue_search_data_52_issue_id_idx
  • (search_vector) issue_search_data_52_search_vector_idx

Referenced by

  • nothing

issue_search_data_53

6 cols · no RLS · line 8655View in 3D
  • Isolated tableissue_search_data_53 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_80a81ac235
  • (issue_id) issue_search_data_53_issue_id_idx
  • (search_vector) issue_search_data_53_search_vector_idx

Referenced by

  • nothing

issue_search_data_54

6 cols · no RLS · line 8664View in 3D
  • Isolated tableissue_search_data_54 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_907e12b7ba
  • (issue_id) issue_search_data_54_issue_id_idx
  • (search_vector) issue_search_data_54_search_vector_idx

Referenced by

  • nothing

issue_search_data_55

6 cols · no RLS · line 8673View in 3D
  • Isolated tableissue_search_data_55 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_837a193bf2
  • (issue_id) issue_search_data_55_issue_id_idx
  • (search_vector) issue_search_data_55_search_vector_idx

Referenced by

  • nothing

issue_search_data_56

6 cols · no RLS · line 8682View in 3D
  • Isolated tableissue_search_data_56 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_7822759674
  • (issue_id) issue_search_data_56_issue_id_idx
  • (search_vector) issue_search_data_56_search_vector_idx

Referenced by

  • nothing

issue_search_data_57

6 cols · no RLS · line 8691View in 3D
  • Isolated tableissue_search_data_57 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_713f462d76
  • (issue_id) issue_search_data_57_issue_id_idx
  • (search_vector) issue_search_data_57_search_vector_idx

Referenced by

  • nothing

issue_search_data_58

6 cols · no RLS · line 8700View in 3D
  • Isolated tableissue_search_data_58 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_3dbde77b8b
  • (issue_id) issue_search_data_58_issue_id_idx
  • (search_vector) issue_search_data_58_search_vector_idx

Referenced by

  • nothing

issue_search_data_59

6 cols · no RLS · line 8709View in 3D
  • Isolated tableissue_search_data_59 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_3bc2eedca5
  • (issue_id) issue_search_data_59_issue_id_idx
  • (search_vector) issue_search_data_59_search_vector_idx

Referenced by

  • nothing

issue_search_data_60

6 cols · no RLS · line 8718View in 3D
  • Isolated tableissue_search_data_60 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_d1c6c67ec1
  • (issue_id) issue_search_data_60_issue_id_idx
  • (search_vector) issue_search_data_60_search_vector_idx

Referenced by

  • nothing

issue_search_data_61

6 cols · no RLS · line 8727View in 3D
  • Isolated tableissue_search_data_61 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_994aa245b7
  • (issue_id) issue_search_data_61_issue_id_idx
  • (search_vector) issue_search_data_61_search_vector_idx

Referenced by

  • nothing

issue_search_data_62

6 cols · no RLS · line 8736View in 3D
  • Isolated tableissue_search_data_62 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_a849f1bbcc
  • (issue_id) issue_search_data_62_issue_id_idx
  • (search_vector) issue_search_data_62_search_vector_idx

Referenced by

  • nothing

issue_search_data_63

6 cols · no RLS · line 8745View in 3D
  • Isolated tableissue_search_data_63 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULL
issue_id PKbigintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
search_vector tsvectornull
namespace_id bigintnull

Indexes

  • (namespace_id) index_81b31eafac
  • (issue_id) issue_search_data_63_issue_id_idx
  • (search_vector) issue_search_data_63_search_vector_idx

Referenced by

  • nothing

issue_assignees

3 cols · no RLS · line 22991View in 3D
  • Nullable foreign key namespace_idissue_assignees.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
user_id PKbigintNOT NULLusers.id 1:N · CASCADE
issue_id PKbigintNOT NULLissues.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (namespace_id) index_issue_assignees_on_namespace_id
  • (user_id, issue_id) index_issue_assignees_on_user_id_and_issue_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

issue_assignment_events

6 cols · no RLS · line 22998View in 3D
  • Nullable foreign key namespace_idissue_assignment_events.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idissue_assignment_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK namespace_id, user_idissue_assignment_events has several nullable FKs (namespace_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintnullusers.id 1:N · SET NULL
issue_id bigintNOT NULLissues.id 1:N · CASCADE
created_at timestamptzNOT NULLnow()
action smallintNOT NULL1
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (namespace_id) index_issue_assignment_events_on_namespace_id
  • (user_id) index_issue_assignment_events_on_user_id
  • (issue_id, action, created_at, id) index_on_issue_assignment_events_issue_id_action_created_at_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

issue_customer_relations_contacts

6 cols · no RLS · line 23017View in 3D
  • Nullable foreign key namespace_idissue_customer_relations_contacts.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
issue_id bigintNOT NULLissues.id 1:N · CASCADE
contact_id bigintNOT NULLcustomer_relations_contacts.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • UNIQUE (issue_id, contact_id) index_issue_crm_contacts_on_issue_id_and_contact_id
  • (contact_id) index_issue_customer_relations_contacts_on_contact_id
  • (namespace_id) index_issue_customer_relations_contacts_on_namespace_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

issue_email_participants

6 cols · no RLS · line 23036View in 3D
  • Nullable foreign key namespace_idissue_email_participants.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
issue_id bigintNOT NULLissues.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
email textNOT NULLCHECK char_length(email) <= 255
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • UNIQUE (issue_id, lower(email)) index_issue_email_participants_on_issue_id_and_lower_email
  • (namespace_id) index_issue_email_participants_on_namespace_id

Referenced by

Table checks: char_length(email) <= 255; namespace_id IS NOT NULL

issue_emails

4 cols · no RLS · line 23056View in 3D
  • Nullable foreign key namespace_idissue_emails.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
issue_id bigintNOT NULLissues.id 1:N · CASCADE
email_message_id textNOT NULLCHECK char_length(email_message_id) <= 1000
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (email_message_id) index_issue_emails_on_email_message_id
  • (issue_id) index_issue_emails_on_issue_id
  • (namespace_id) index_issue_emails_on_namespace_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL; char_length(email_message_id) <= 1000

issue_metrics

8 cols · no RLS · line 23094View in 3D
  • Nullable foreign key namespace_idissue_metrics.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • TIMESTAMP without time zone first_mentioned_in_commit_atfirst_mentioned_in_commit_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone first_associated_with_milestone_atfirst_associated_with_milestone_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone first_added_to_board_atfirst_added_to_board_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
issue_id bigintNOT NULLissues.id 1:1 · CASCADE
first_mentioned_in_commit_at timestampnull
first_associated_with_milestone_at timestampnull
first_added_to_board_at timestampnull
created_at timestampNOT NULL
updated_at timestampNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (issue_id, first_mentioned_in_commit_at, first_associated_with_milestone_at, first_added_to_board_at) index_issue_metrics_on_issue_id_and_timestamps
  • (namespace_id) index_issue_metrics_on_namespace_id
  • UNIQUE (issue_id) index_unique_issue_metrics_issue_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

issue_tracker_data

13 cols · no RLS · line 23115View in 3D
  • Nullable foreign key integration_idissue_tracker_data.integration_id may be NULL, so the relationship to integrations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idissue_tracker_data.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idissue_tracker_data.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idissue_tracker_data.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK integration_id, group_id, organization_id, project_idissue_tracker_data has several nullable FKs (integration_id, group_id, organization_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
encrypted_project_url varcharnull
encrypted_project_url_iv varcharnull
encrypted_issues_url varcharnull
encrypted_issues_url_iv varcharnull
encrypted_new_issue_url varcharnull
encrypted_new_issue_url_iv varcharnull
integration_id bigintnullintegrations.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (group_id) index_issue_tracker_data_on_group_id
  • (integration_id) index_issue_tracker_data_on_integration_id
  • (organization_id) index_issue_tracker_data_on_organization_id
  • (project_id) index_issue_tracker_data_on_project_id

Referenced by

  • nothing

Table checks: num_nonnulls(group_id, organization_id, project_id) = 1

issue_user_mentions

7 cols · no RLS · line 23141View in 3D
  • Nullable foreign key namespace_idissue_user_mentions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key note_idissue_user_mentions.note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK namespace_id, note_idissue_user_mentions has several nullable FKs (namespace_id, note_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
issue_id bigintNOT NULLissues.id 1:N · CASCADE
mentioned_users_ids bigint[]null
mentioned_projects_ids bigint[]null
mentioned_groups_ids bigint[]null
note_id bigintnullnotes.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (namespace_id) index_issue_user_mentions_on_namespace_id
  • UNIQUE (note_id) WHERE note_id IS NOT NULL index_issue_user_mentions_on_note_id
  • UNIQUE (issue_id, note_id) issue_user_mentions_on_issue_id_and_note_id_index
  • UNIQUE (issue_id) WHERE note_id IS NULL issue_user_mentions_on_issue_id_index

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

namespace 54 tables

Tables whose names start with namespace_.

Entity-relationship diagram: namespace_descendants, namespace_descendants_00, namespace_descendants_01, namespace_descendants_02, namespace_descendants_03, namespace_descendants_04, namespace_descendants_05, namespace_descendants_06, namespace_descendants_07, namespace_descendants_08, namespace_descendants_09, namespace_descendants_10, namespace_descendants_11, namespace_descendants_12, namespace_descendants_13, namespace_descendants_14, namespace_descendants_15, namespace_descendants_16, namespace_descendants_17, namespace_descendants_18, namespace_descendants_19, namespace_descendants_20, namespace_descendants_21, namespace_descendants_22, namespace_descendants_23, namespace_descendants_24, namespace_descendants_25, namespace_descendants_26, namespace_descendants_27, namespace_descendants_28, namespace_descendants_29, namespace_descendants_30, namespace_descendants_31, namespace_admin_notes, namespace_aggregation_schedules, namespace_ai_settings, namespace_bans, namespace_ci_cd_settings, namespace_cluster_agent_mappings, namespace_commit_emails, namespace_details, namespace_foundational_agent_statuses, namespace_import_users, namespace_isolations, namespace_ldap_settings, namespace_limits, namespace_package_settings, namespace_root_storage_statistics, namespace_secret_counts, namespace_settings, namespace_state_propagations, namespace_statistics, namespace_template_settings, namespace_uploadsnamespace_descendantsnamespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_00namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_01namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_02namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_03namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_04namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_05namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_06namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_07namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_08namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_09namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_10namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_11namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_12namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_13namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_14namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_15namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_16namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_17namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_18namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_19namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_20namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_21namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_22namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_23namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_24namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_25namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_26namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_27namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_28namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_29namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_30namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_descendants_31namespace_id PKbigintself_and_descendant_group_idsbigint[]all_project_idsbigint[]traversal_idsbigint[]outdated_attimestamptzcalculated_attimestamptzall_active_project_idsbigint[]all_unarchived_project_idsbigint[]self_and_descendant_idsbigint[]namespace_admin_notesid PKbigintcreated_attimestamptzupdated_attimestamptznamespace_id FKbigintnotetextnamespace_aggregation_schedulesnamespace_id PKbigintnamespace_ai_settingsnamespace_id PKbigintduo_workflow_mcp_enabledbooleanfoundational_agents_default_enabledbooleanminimum_access_level_executesmallintminimum_access_level_managesmallintminimum_access_level_enable_on_projectssmallintminimum_access_level_execute_asyncsmallintfeature_settingsjsonbprompt_injection_protection_levelsmallintai_usage_data_collection_enabledbooleaninclude_recommended_allowedbooleanallow_all_unix_socketsbooleanenforce_on_local_clientsbooleanallow_project_extensionbooleanallowed_domainstext[]denied_domainstext[]ai_catalog_restricted_to_group_hierarchybooleannamespace_bansid PKbigintnamespace_id FKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptznamespace_ci_cd_settingsnamespace_id PKbigintallow_stale_runner_pruningbooleannamespace_cluster_agent_mappingsid PKbigintcreated_attimestamptzupdated_attimestamptznamespace_id FKbigintcluster_agent_id FKbigintcreator_id FKbigintnamespace_commit_emailsid PKbigintuser_id FKbigintnamespace_id FKbigintemail_id FKbigintcreated_attimestamptzupdated_attimestamptznamespace_detailsnamespace_id PKbigintcreated_attimestamptzupdated_attimestamptzcached_markdown_versionintegerdescriptiontextdescription_htmltextcreator_idbigintstate_metadatajsonbdeletion_scheduled_attimestamptznamespace_foundational_agent_statusesid PKbigintnamespace_id FKbigintreferencetextenabledbooleancreated_attimestamptzupdated_attimestamptznamespace_import_usersid PKbigintuser_id FKbigintnamespace_id FKbigintnamespace_isolationsid PKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzisolatedbooleannamespace_ldap_settingsnamespace_id PKbigintcreated_attimestamptzupdated_attimestamptzsync_last_start_attimestamptzsync_last_update_attimestamptzsync_last_successful_attimestamptzsync_statussmallintsync_errortextnamespace_limitsadditional_purchased_storage_sizebigintadditional_purchased_storage_ends_ondatenamespace_id PKbigintpre_enforcement_notification_attimestamptzfirst_enforced_attimestamptzlast_enforced_attimestamptzlast_seat_all_used_seats_notification_attimestamptzmax_number_of_vulnerabilities_per_projectintegernamespace_package_settingsnamespace_id PKbigintmaven_duplicates_allowedbooleanmaven_duplicate_exception_regextextgeneric_duplicates_allowedbooleangeneric_duplicate_exception_regextextmaven_package_requests_forwardingbooleanlock_maven_package_requests_forwardingbooleanpypi_package_requests_forwardingbooleanlock_pypi_package_requests_forwardingbooleannpm_package_requests_forwardingbooleanlock_npm_package_requests_forwardingbooleannuget_duplicates_allowedbooleannuget_duplicate_exception_regextextnuget_symbol_server_enabledbooleanterraform_module_duplicates_allowedbooleanterraform_module_duplicate_exception_regextextaudit_events_enabledbooleanrubygems_package_requests_forwardingbooleanlock_rubygems_package_requests_forwardingbooleannamespace_root_storage_statisticsnamespace_id PKbigintupdated_attimestamptzrepository_sizebigintlfs_objects_sizebigintwiki_sizebigintbuild_artifacts_sizebigintstorage_sizebigintpackages_sizebigintsnippets_sizebigintpipeline_artifacts_sizebigintuploads_sizebigintdependency_proxy_sizebigintnotification_levelsmallintcontainer_registry_sizebigintregistry_size_estimatedbooleanpublic_forks_storage_sizebigintinternal_forks_storage_sizebigintprivate_forks_storage_sizebigintnamespace_secret_countsnamespace_id PKbigintroot_namespace_id FKbigintcreated_attimestamptzupdated_attimestamptzcountintegernamespace_settingscreated_attimestamptzupdated_attimestamptznamespace_id PKbigintprevent_forking_outside_groupbooleanallow_mfa_for_subgroupsbooleandefault_branch_nametextrepository_read_onlybooleanresource_access_token_creation_allowedbooleanprevent_sharing_groups_outside_hierarchybooleannew_user_signups_capintegersetup_for_companybooleanjobs_to_be_donesmallintrunner_token_expiration_intervalintegersubgroup_runner_token_expiration_intervalintegerproject_runner_token_expiration_intervalintegershow_diff_preview_in_emailbooleanenabled_git_access_protocolsmallintunique_project_download_limitsmallintunique_project_download_limit_interval_in_secondsintegerunique_project_download_limit_allowlisttext[]auto_ban_user_on_excessive_projects_downloadbooleanonly_allow_merge_if_pipeline_succeedsbooleanallow_merge_on_skipped_pipelinebooleanonly_allow_merge_if_all_discussions_are_resolvedbooleandefault_compliance_framework_id FKbigintrunner_registration_enabledbooleanallow_runner_registration_tokenbooleanunique_project_download_limit_alertlistinteger[]emails_enabledbooleanexperiment_features_enabledbooleandefault_branch_protection_defaultsjsonbservice_access_tokens_expiration_enforcedbooleanproduct_analytics_enabledbooleanallow_merge_without_pipelinebooleanenforce_ssh_certificatesbooleanmath_rendering_limits_enabledbooleanlock_math_rendering_limits_enabledbooleanduo_features_enabledbooleanlock_duo_features_enabledbooleandisable_personal_access_tokensbooleanearly_access_program_participantbooleanremove_dormant_membersbooleanremove_dormant_members_periodintegerearly_access_program_joined_by_idbigintseat_controlsmallintlast_dormant_member_review_attimestamptzenterprise_users_extensions_marketplace_opt_in_statussmallintspp_repository_pipeline_accessbooleanlock_spp_repository_pipeline_accessbooleanarchivedbooleantoken_expiry_notify_inheritedbooleanresource_access_token_notify_inheritedbooleanlock_resource_access_token_notify_inheritedbooleanpipeline_variables_default_rolesmallintforce_pages_access_controlbooleanextended_grat_expiry_webhooks_executebooleanjwt_ci_cd_job_token_enabledbooleanjwt_ci_cd_job_token_opted_outbooleanrequire_dpop_for_manage_api_endpointsbooleanjob_token_policies_enabledbooleansecurity_policiesjsonbduo_nano_features_enabledbooleanmodel_prompt_cache_enabledbooleanlock_model_prompt_cache_enabledbooleandisable_invite_membersbooleanweb_based_commit_signing_enabledbooleanlock_web_based_commit_signing_enabledbooleanallow_enterprise_bypass_placeholder_confirmationbooleanenterprise_bypass_expires_attimestamptzhide_email_on_profilebooleanallow_personal_snippetsbooleanauto_duo_code_review_enabledbooleanlock_auto_duo_code_review_enabledbooleanstep_up_auth_required_oauth_providertextduo_remote_flows_enabledbooleanlock_duo_remote_flows_enabledbooleandisable_ssh_keysbooleanduo_foundational_flows_enabledbooleanlock_duo_foundational_flows_enabledbooleanusage_billingjsonbbuilt_in_project_templates_enabledbooleanlock_built_in_project_templates_enabledbooleantool_approval_for_session_enabledbooleanlock_tool_approval_for_session_enabledbooleanduo_custom_flows_enabledbooleanlock_duo_custom_flows_enabledbooleanduo_custom_agents_enabledbooleanlock_duo_custom_agents_enabledbooleanmcp_server_enabledbooleanduo_external_agents_enabledbooleanlock_duo_external_agents_enabledbooleanenable_duo_code_review_by_defaultsmallintpersonal_access_token_settingsjsonbrequire_sha_for_mergebooleanlock_require_sha_for_mergebooleanadmin_locked_duo_features_enabledbooleanai_audit_events_storage_enabledbooleanlock_ai_audit_events_storage_enabledbooleandependency_firewall_enabledbooleanpolicy_store_experiment_enabledbooleanenterprise_user_settingsjsonbnamespace_state_propagationsid PKbigintnamespace_id FKbigintstarted_attimestamptzcreated_attimestamptzupdated_attimestamptzsource_statesmallinttarget_statesmallintstatussmallintnamespace_statisticsid PKbigintnamespace_id FKbigintshared_runners_secondsintegershared_runners_seconds_last_resettimestampstorage_sizebigintwiki_sizebigintdependency_proxy_sizebigintnamespace_template_settingsnamespace_id PKbigintfile_template_project_id FKbigintcustom_project_templates_group_id FKbigintcreated_attimestamptzupdated_attimestamptzduo_template_project_id FKbigintnamespace_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextcluster_agentscompliance_management_frameworksemailsnamespacesprojectsusersnamespace_idnamespace_idnamespace_iduser_idnamespace_idnamespace_idnamespace_idcreator_idcluster_agent_idnamespace_idemail_iduser_idnamespace_idnamespace_idnamespace_iduser_idnamespace_idnamespace_idnamespace_idnamespace_idnamespace_idnamespace_idroot_namespace_iddefault_compliance_framework_idnamespace_idnamespace_idnamespace_idcustom_project_templates_group_idfile_template_project_idduo_template_project_idnamespace_id

Relationships

namespace_descendants

9 cols · no RLS · line 8754View in 3D
  • Isolated tablenamespace_descendants references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL index_on_namespace_descendants_outdated

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_00

9 cols · no RLS · line 8768View in 3D
  • Isolated tablenamespace_descendants_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_00_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_01

9 cols · no RLS · line 8781View in 3D
  • Isolated tablenamespace_descendants_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_01_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_02

9 cols · no RLS · line 8794View in 3D
  • Isolated tablenamespace_descendants_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_02_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_03

9 cols · no RLS · line 8807View in 3D
  • Isolated tablenamespace_descendants_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_03_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_04

9 cols · no RLS · line 8820View in 3D
  • Isolated tablenamespace_descendants_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_04_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_05

9 cols · no RLS · line 8833View in 3D
  • Isolated tablenamespace_descendants_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_05_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_06

9 cols · no RLS · line 8846View in 3D
  • Isolated tablenamespace_descendants_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_06_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_07

9 cols · no RLS · line 8859View in 3D
  • Isolated tablenamespace_descendants_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_07_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_08

9 cols · no RLS · line 8872View in 3D
  • Isolated tablenamespace_descendants_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_08_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_09

9 cols · no RLS · line 8885View in 3D
  • Isolated tablenamespace_descendants_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_09_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_10

9 cols · no RLS · line 8898View in 3D
  • Isolated tablenamespace_descendants_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_10_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_11

9 cols · no RLS · line 8911View in 3D
  • Isolated tablenamespace_descendants_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_11_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_12

9 cols · no RLS · line 8924View in 3D
  • Isolated tablenamespace_descendants_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_12_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_13

9 cols · no RLS · line 8937View in 3D
  • Isolated tablenamespace_descendants_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_13_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_14

9 cols · no RLS · line 8950View in 3D
  • Isolated tablenamespace_descendants_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_14_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_15

9 cols · no RLS · line 8963View in 3D
  • Isolated tablenamespace_descendants_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_15_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_16

9 cols · no RLS · line 8976View in 3D
  • Isolated tablenamespace_descendants_16 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_16_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_17

9 cols · no RLS · line 8989View in 3D
  • Isolated tablenamespace_descendants_17 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_17_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_18

9 cols · no RLS · line 9002View in 3D
  • Isolated tablenamespace_descendants_18 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_18_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_19

9 cols · no RLS · line 9015View in 3D
  • Isolated tablenamespace_descendants_19 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_19_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_20

9 cols · no RLS · line 9028View in 3D
  • Isolated tablenamespace_descendants_20 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_20_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_21

9 cols · no RLS · line 9041View in 3D
  • Isolated tablenamespace_descendants_21 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_21_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_22

9 cols · no RLS · line 9054View in 3D
  • Isolated tablenamespace_descendants_22 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_22_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_23

9 cols · no RLS · line 9067View in 3D
  • Isolated tablenamespace_descendants_23 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_23_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_24

9 cols · no RLS · line 9080View in 3D
  • Isolated tablenamespace_descendants_24 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_24_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_25

9 cols · no RLS · line 9093View in 3D
  • Isolated tablenamespace_descendants_25 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_25_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_26

9 cols · no RLS · line 9106View in 3D
  • Isolated tablenamespace_descendants_26 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_26_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_27

9 cols · no RLS · line 9119View in 3D
  • Isolated tablenamespace_descendants_27 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_27_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_28

9 cols · no RLS · line 9132View in 3D
  • Isolated tablenamespace_descendants_28 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_28_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_29

9 cols · no RLS · line 9145View in 3D
  • Isolated tablenamespace_descendants_29 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_29_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_30

9 cols · no RLS · line 9158View in 3D
  • Isolated tablenamespace_descendants_30 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_30_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_descendants_31

9 cols · no RLS · line 9171View in 3D
  • Isolated tablenamespace_descendants_31 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULL
self_and_descendant_group_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
all_project_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
traversal_ids bigint[]NOT NULLCAST(ARRAY[] AS bigint[])
outdated_at timestamptznull
calculated_at timestamptznull
all_active_project_ids bigint[]NOT NULLCAST('{}' AS bigint[])
all_unarchived_project_ids bigint[]nullCAST('{}' AS bigint[])CHECK all_unarchived_project_ids IS NOT NULL
self_and_descendant_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • (namespace_id) WHERE outdated_at IS NOT NULL namespace_descendants_31_namespace_id_idx

Referenced by

  • nothing

Table checks: all_unarchived_project_ids IS NOT NULL

namespace_admin_notes

5 cols · no RLS · line 24755View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
note textnullCHECK char_length(note) <= 1000

Indexes

  • (namespace_id) index_namespace_admin_notes_on_namespace_id

Referenced by

  • nothing

Table checks: char_length(note) <= 1000

namespace_aggregation_schedules

1 cols · no RLS · line 24773View in 3D
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE

Indexes

  • UNIQUE (namespace_id) index_namespace_aggregation_schedules_on_namespace_id

Referenced by

  • nothing

namespace_ai_settings

17 cols · no RLS · line 24777View in 3D
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
duo_workflow_mcp_enabled booleanNOT NULLFALSE
foundational_agents_default_enabled booleannullTRUE
minimum_access_level_execute smallintnull
minimum_access_level_manage smallintnull
minimum_access_level_enable_on_projects smallintnull
minimum_access_level_execute_async smallintnull
feature_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(feature_settings) = CAST('object' AS text)
prompt_injection_protection_level smallintNOT NULL0
ai_usage_data_collection_enabled booleanNOT NULLFALSE
include_recommended_allowed booleanNOT NULLFALSE
allow_all_unix_sockets booleanNOT NULLFALSE
enforce_on_local_clients booleanNOT NULLFALSE
allow_project_extension booleanNOT NULLTRUE
allowed_domains text[]NOT NULLCAST('{}' AS text[])
denied_domains text[]NOT NULLCAST('{}' AS text[])
ai_catalog_restricted_to_group_hierarchy booleanNOT NULLFALSE

Indexes

  • (prompt_injection_protection_level) idx_namespace_ai_settings_on_prompt_injection_protection_level
  • UNIQUE (namespace_id) index_namespace_ai_settings_on_namespace_id

Referenced by

  • nothing

Table checks: jsonb_typeof(feature_settings) = CAST('object' AS text)

namespace_bans

5 cols · no RLS · line 24798View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (namespace_id, user_id) index_namespace_bans_on_namespace_id_and_user_id
  • (user_id) index_namespace_bans_on_user_id

Referenced by

  • nothing

namespace_ci_cd_settings

2 cols · no RLS · line 24815View in 3D
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
allow_stale_runner_pruning booleanNOT NULLFALSE

Indexes

  • (namespace_id) WHERE allow_stale_runner_pruning = TRUE index_cicd_settings_on_namespace_id_where_stale_pruning_enabled

Referenced by

  • nothing

namespace_cluster_agent_mappings

6 cols · no RLS · line 24820View in 3D
  • Nullable foreign key creator_idnamespace_cluster_agent_mappings.creator_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
cluster_agent_id bigintNOT NULLcluster_agents.id 1:N · CASCADE
creator_id bigintnullusers.id 1:N · SET NULL

Indexes

  • (cluster_agent_id) i_namespace_cluster_agent_mappings_on_cluster_agent_id
  • (creator_id) i_namespace_cluster_agent_mappings_on_creator_id
  • UNIQUE (namespace_id, cluster_agent_id) unique_namespace_cluster_agent_mappings_for_agent_association

Referenced by

  • nothing

namespace_commit_emails

6 cols · no RLS · line 24838View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
email_id bigintNOT NULLemails.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (email_id) index_namespace_commit_emails_on_email_id
  • (namespace_id) index_namespace_commit_emails_on_namespace_id
  • UNIQUE (user_id, namespace_id) index_namespace_commit_emails_on_user_id_and_namespace_id

Referenced by

  • nothing

namespace_details

9 cols · no RLS · line 24856View in 3D
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
created_at timestamptznull
updated_at timestamptznull
cached_markdown_version integernull
description textnull
description_html textnull
creator_id bigintnull
state_metadata jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(state_metadata) = CAST('object' AS text)
deletion_scheduled_at timestamptznull

Indexes

  • (creator_id) index_namespace_details_on_creator_id
  • (namespace_id, deletion_scheduled_at) WHERE deletion_scheduled_at IS NOT NULL index_namespace_details_on_id_and_deletion_scheduled_at

Referenced by

  • nothing

Table checks: jsonb_typeof(state_metadata) = CAST('object' AS text)

namespace_foundational_agent_statuses

6 cols · no RLS · line 24869View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
reference textNOT NULLCHECK char_length(reference) <= 255
enabled booleanNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (namespace_id, reference) index_nfas_on_namespaced_id_on_reference

Referenced by

  • nothing

Table checks: char_length(reference) <= 255

namespace_import_users

3 cols · no RLS · line 24888View in 3D
  • Junction table allows duplicate links namespace_id, user_idnamespace_import_users looks like a many-to-many link table but has no unique constraint across (namespace_id, user_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:1 · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:1 · CASCADE

Indexes

  • UNIQUE (namespace_id) index_namespace_import_users_on_namespace_id
  • UNIQUE (user_id) index_namespace_import_users_on_user_id

Referenced by

  • nothing

namespace_isolations

5 cols · no RLS · line 24903View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
isolated booleanNOT NULLFALSE

Indexes

  • UNIQUE (namespace_id) index_namespace_isolations_on_namespace_id

Referenced by

  • nothing

namespace_ldap_settings

8 cols · no RLS · line 24920View in 3D
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
sync_last_start_at timestamptznull
sync_last_update_at timestamptznull
sync_last_successful_at timestamptznull
sync_status smallintNOT NULL0
sync_error textnullCHECK char_length(sync_error) <= 255

Indexes

  • none

Referenced by

  • nothing

Table checks: char_length(sync_error) <= 255

namespace_limits

8 cols · no RLS · line 24932View in 3D
ColumnTypeNullDefaultReferencesNotes
additional_purchased_storage_size bigintNOT NULL0
additional_purchased_storage_ends_on datenull
namespace_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
pre_enforcement_notification_at timestamptznull
first_enforced_at timestamptznull
last_enforced_at timestamptznull
last_seat_all_used_seats_notification_at timestamptznull
max_number_of_vulnerabilities_per_project integernull

Indexes

  • none

Referenced by

  • nothing

namespace_package_settings

19 cols · no RLS · line 24943View in 3D
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
maven_duplicates_allowed booleanNOT NULLTRUE
maven_duplicate_exception_regex textNOT NULLCAST('' AS text)CHECK char_length(maven_duplicate_exception_regex) <= 255
generic_duplicates_allowed booleanNOT NULLTRUE
generic_duplicate_exception_regex textNOT NULLCAST('' AS text)CHECK char_length(generic_duplicate_exception_regex) <= 255
maven_package_requests_forwarding booleannull
lock_maven_package_requests_forwarding booleanNOT NULLFALSE
pypi_package_requests_forwarding booleannull
lock_pypi_package_requests_forwarding booleanNOT NULLFALSE
npm_package_requests_forwarding booleannull
lock_npm_package_requests_forwarding booleanNOT NULLFALSE
nuget_duplicates_allowed booleanNOT NULLTRUE
nuget_duplicate_exception_regex textNOT NULLCAST('' AS text)CHECK char_length(nuget_duplicate_exception_regex) <= 255
nuget_symbol_server_enabled booleanNOT NULLFALSE
terraform_module_duplicates_allowed booleanNOT NULLFALSE
terraform_module_duplicate_exception_regex textNOT NULLCAST('' AS text)CHECK char_length(terraform_module_duplicate_exception_regex) <= 255
audit_events_enabled booleanNOT NULLFALSE
rubygems_package_requests_forwarding booleannull
lock_rubygems_package_requests_forwarding booleanNOT NULLFALSE

Indexes

  • none

Referenced by

  • nothing

Table checks: char_length(generic_duplicate_exception_regex) <= 255; char_length(maven_duplicate_exception_regex) <= 255; char_length(nuget_duplicate_exception_regex) <= 255; char_length(terraform_module_duplicate_exception_regex) <= 255

namespace_root_storage_statistics

18 cols · no RLS · line 24969View in 3D
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
updated_at timestamptzNOT NULL
repository_size bigintNOT NULL0
lfs_objects_size bigintNOT NULL0
wiki_size bigintNOT NULL0
build_artifacts_size bigintNOT NULL0
storage_size bigintNOT NULL0
packages_size bigintNOT NULL0
snippets_size bigintNOT NULL0
pipeline_artifacts_size bigintNOT NULL0
uploads_size bigintNOT NULL0
dependency_proxy_size bigintNOT NULL0
notification_level smallintNOT NULL100
container_registry_size bigintNOT NULL0
registry_size_estimated booleanNOT NULLFALSE
public_forks_storage_size bigintNOT NULL0
internal_forks_storage_size bigintNOT NULL0
private_forks_storage_size bigintNOT NULL0

Indexes

  • UNIQUE (namespace_id) index_namespace_root_storage_statistics_on_namespace_id
  • (registry_size_estimated) index_ns_root_stor_stats_on_registry_size_estimated

Referenced by

  • nothing

namespace_secret_counts

5 cols · no RLS · line 24990View in 3D
  • Junction table allows duplicate links namespace_id, root_namespace_idnamespace_secret_counts looks like a many-to-many link table but has no unique constraint across (namespace_id, root_namespace_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
root_namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
count integerNOT NULL0

Indexes

  • (root_namespace_id) index_namespace_secret_counts_on_root_namespace_id

Referenced by

  • nothing

namespace_settings

101 cols · no RLS · line 24998View in 3D
  • Nullable foreign key default_compliance_framework_idnamespace_settings.default_compliance_framework_id may be NULL, so the relationship to compliance_management_frameworks is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Wide table (101 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
prevent_forking_outside_group booleanNOT NULLFALSE
allow_mfa_for_subgroups booleanNOT NULLTRUE
default_branch_name textnullCHECK char_length(default_branch_name) <= 255
repository_read_only booleanNOT NULLFALSE
resource_access_token_creation_allowed booleanNOT NULLTRUE
prevent_sharing_groups_outside_hierarchy booleanNOT NULLFALSE
new_user_signups_cap integernull
setup_for_company booleannull
jobs_to_be_done smallintnull
runner_token_expiration_interval integernull
subgroup_runner_token_expiration_interval integernull
project_runner_token_expiration_interval integernull
show_diff_preview_in_email booleanNOT NULLTRUE
enabled_git_access_protocol smallintNOT NULL0
unique_project_download_limit smallintNOT NULL0
unique_project_download_limit_interval_in_seconds integerNOT NULL0
unique_project_download_limit_allowlist text[]NOT NULLCAST('{}' AS text[])CHECK cardinality(unique_project_download_limit_allowlist) <= 100
auto_ban_user_on_excessive_projects_download booleanNOT NULLFALSE
only_allow_merge_if_pipeline_succeeds booleanNOT NULLFALSE
allow_merge_on_skipped_pipeline booleanNOT NULLFALSE
only_allow_merge_if_all_discussions_are_resolved booleanNOT NULLFALSE
default_compliance_framework_id bigintnullcompliance_management_frameworks.id 1:1 · SET NULL
runner_registration_enabled booleannullTRUE
allow_runner_registration_token booleanNOT NULLTRUE
unique_project_download_limit_alertlist integer[]NOT NULLCAST('{}' AS integer[])CHECK cardinality(unique_project_download_limit_alertlist) <= 100
emails_enabled booleanNOT NULLTRUE
experiment_features_enabled booleanNOT NULLFALSE
default_branch_protection_defaults jsonbNOT NULLCAST('{}' AS jsonb)CHECK octet_length(CAST(default_branch_protection_defaults AS text)) <= 1024
service_access_tokens_expiration_enforced booleanNOT NULLTRUE
product_analytics_enabled booleanNOT NULLFALSE
allow_merge_without_pipeline booleanNOT NULLFALSE
enforce_ssh_certificates booleanNOT NULLFALSE
math_rendering_limits_enabled booleannull
lock_math_rendering_limits_enabled booleanNOT NULLFALSE
duo_features_enabled booleannull
lock_duo_features_enabled booleanNOT NULLFALSE
disable_personal_access_tokens booleanNOT NULLFALSE
early_access_program_participant booleanNOT NULLFALSE
remove_dormant_members booleanNOT NULLFALSE
remove_dormant_members_period integerNOT NULL90
early_access_program_joined_by_id bigintnull
seat_control smallintNOT NULL0
last_dormant_member_review_at timestamptznull
enterprise_users_extensions_marketplace_opt_in_status smallintNOT NULL0
spp_repository_pipeline_access booleannull
lock_spp_repository_pipeline_access booleanNOT NULLFALSE
archived booleanNOT NULLFALSE
token_expiry_notify_inherited booleanNOT NULLTRUE
resource_access_token_notify_inherited booleannull
lock_resource_access_token_notify_inherited booleanNOT NULLFALSE
pipeline_variables_default_role smallintNOT NULL2
force_pages_access_control booleanNOT NULLFALSE
extended_grat_expiry_webhooks_execute booleanNOT NULLFALSE
jwt_ci_cd_job_token_enabled booleanNOT NULLFALSE
jwt_ci_cd_job_token_opted_out booleanNOT NULLFALSE
require_dpop_for_manage_api_endpoints booleanNOT NULLFALSE
job_token_policies_enabled booleanNOT NULLFALSE
security_policies jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(security_policies) = CAST('object' AS text)
duo_nano_features_enabled booleannull
model_prompt_cache_enabled booleannull
lock_model_prompt_cache_enabled booleanNOT NULLFALSE
disable_invite_members booleanNOT NULLFALSE
web_based_commit_signing_enabled booleannull
lock_web_based_commit_signing_enabled booleanNOT NULLFALSE
allow_enterprise_bypass_placeholder_confirmation booleanNOT NULLFALSE
enterprise_bypass_expires_at timestamptznull
hide_email_on_profile booleanNOT NULLFALSE
allow_personal_snippets booleanNOT NULLTRUE
auto_duo_code_review_enabled booleannull
lock_auto_duo_code_review_enabled booleanNOT NULLFALSE
step_up_auth_required_oauth_provider textnullCHECK char_length(step_up_auth_required_oauth_provider) <= 255
duo_remote_flows_enabled booleannull
lock_duo_remote_flows_enabled booleanNOT NULLFALSE
disable_ssh_keys booleanNOT NULLFALSE
duo_foundational_flows_enabled booleannull
lock_duo_foundational_flows_enabled booleanNOT NULLFALSE
usage_billing jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(usage_billing) = CAST('object' AS text)
built_in_project_templates_enabled booleannull
lock_built_in_project_templates_enabled booleanNOT NULLFALSE
tool_approval_for_session_enabled booleannull
lock_tool_approval_for_session_enabled booleanNOT NULLFALSE
duo_custom_flows_enabled booleannull
lock_duo_custom_flows_enabled booleanNOT NULLFALSE
duo_custom_agents_enabled booleannull
lock_duo_custom_agents_enabled booleanNOT NULLFALSE
mcp_server_enabled booleannull
duo_external_agents_enabled booleannull
lock_duo_external_agents_enabled booleanNOT NULLFALSE
enable_duo_code_review_by_default smallintNOT NULL0
personal_access_token_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(personal_access_token_settings) = CAST('object' AS text)
require_sha_for_merge booleannull
lock_require_sha_for_merge booleanNOT NULLFALSE
admin_locked_duo_features_enabled booleanNOT NULLFALSE
ai_audit_events_storage_enabled booleannull
lock_ai_audit_events_storage_enabled booleanNOT NULLFALSE
dependency_firewall_enabled booleanNOT NULLFALSE
policy_store_experiment_enabled booleanNOT NULLFALSE
enterprise_user_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(enterprise_user_settings) = CAST('object' AS text)

Indexes

  • UNIQUE (default_compliance_framework_id) idx_namespace_settings_on_default_compliance_framework_id
  • (last_dormant_member_review_at) WHERE remove_dormant_members = TRUE idx_namespace_settings_on_last_dormant_members_review_at
  • (duo_features_enabled, lock_duo_features_enabled) WHERE duo_features_enabled IS NOT NULL index_namespace_settings_on_duo_features
  • (namespace_id) WHERE archived = TRUE index_namespace_settings_on_namespace_id_where_archived_true
  • (namespace_id) WHERE …(experiment_features_enabled) tmp_index_namespace_settings_on_experiment_features_enabled

Referenced by

  • nothing

Table checks: char_length(default_branch_name) <= 255; char_length(step_up_auth_required_oauth_provider) <= 255; jsonb_typeof(enterprise_user_settings) = CAST('object' AS text); jsonb_typeof(personal_access_token_settings) = CAST('object' AS text); jsonb_typeof(security_policies) = CAST('object' AS text); jsonb_typeof(usage_billing) = CAST('object' AS text); cardinality(unique_project_download_limit_alertlist) <= 100; cardinality(unique_project_download_limit_allowlist) <= 100; octet_length(CAST(default_branch_protection_defaults AS text)) <= 1024

namespace_state_propagations

8 cols · no RLS · line 25110View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
started_at timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
source_state smallintNOT NULL
target_state smallintNOT NULL
status smallintNOT NULL0

Indexes

  • (namespace_id) idx_namespace_state_propagations_on_namespace_id
  • (status, created_at) idx_namespace_state_propagations_on_status_created_at
  • UNIQUE (namespace_id, target_state) WHERE status = ANY(ARRAY[0, 1]) idx_namespace_state_propagations_unique_pending_processing

Referenced by

  • nothing

namespace_statistics

7 cols · no RLS · line 25130View in 3D
  • TIMESTAMP without time zone shared_runners_seconds_last_resetshared_runners_seconds_last_reset stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:1 · CASCADE
shared_runners_seconds integerNOT NULL0
shared_runners_seconds_last_reset timestampnull
storage_size bigintNOT NULL0
wiki_size bigintNOT NULL0
dependency_proxy_size bigintNOT NULL0

Indexes

  • UNIQUE (namespace_id) index_namespace_statistics_on_namespace_id

Referenced by

  • nothing

namespace_template_settings

6 cols · no RLS · line 25149View in 3D
  • Nullable foreign key custom_project_templates_group_idnamespace_template_settings.custom_project_templates_group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key file_template_project_idnamespace_template_settings.file_template_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key duo_template_project_idnamespace_template_settings.duo_template_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK custom_project_templates_group_id, file_template_project_id, duo_template_project_idnamespace_template_settings has several nullable FKs (custom_project_templates_group_id, file_template_project_id, duo_template_project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
file_template_project_id bigintnullprojects.id 1:N · SET NULL
custom_project_templates_group_id bigintnullnamespaces.id 1:N · SET NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
duo_template_project_id bigintnullprojects.id 1:N · SET NULL

Indexes

  • (file_template_project_id) index_namespace_template_settings_on_file_template_project_id
  • (custom_project_templates_group_id) WHERE custom_project_templates_group_id IS NOT NULL index_ns_template_settings_on_custom_project_templates_group_id
  • (duo_template_project_id) WHERE duo_template_project_id IS NOT NULL index_ns_template_settings_on_duo_template_project_id

Referenced by

  • nothing

namespace_uploads

16 cols · no RLS · line 25158View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnull
namespace_id bigintnullCHECK namespace_id IS NOT NULL
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • UNIQUE (id) index_namespace_uploads_on_id
  • (checksum) namespace_uploads_checksum_idx
  • (model_id, model_type, uploader, created_at) namespace_uploads_model_id_model_type_uploader_created_at_idx
  • (namespace_id) namespace_uploads_namespace_id_idx
  • (organization_id) namespace_uploads_organization_id_idx
  • (project_id) namespace_uploads_project_id_idx
  • (store) namespace_uploads_store_idx
  • (uploaded_by_user_id) namespace_uploads_uploaded_by_user_id_idx
  • (uploader, path) namespace_uploads_uploader_path_idx

Referenced by

Table checks: char_length(path) <= 511; char_length(checksum) <= 64; namespace_id IS NOT NULL

virtual 133 tables

Tables whose names start with virtual_.

Entity-relationship diagram: virtual_registries_container_cache_entries, virtual_registries_container_cache_entries_00, virtual_registries_container_cache_entries_01, virtual_registries_container_cache_entries_02, virtual_registries_container_cache_entries_03, virtual_registries_container_cache_entries_04, virtual_registries_container_cache_entries_05, virtual_registries_container_cache_entries_06, virtual_registries_container_cache_entries_07, virtual_registries_container_cache_entries_08, virtual_registries_container_cache_entries_09, virtual_registries_container_cache_entries_10, virtual_registries_container_cache_entries_11, virtual_registries_container_cache_entries_12, virtual_registries_container_cache_entries_13, virtual_registries_container_cache_entries_14, virtual_registries_container_cache_entries_15, virtual_registries_container_cache_remote_entries, virtual_registries_container_cache_remote_entries_00, virtual_registries_container_cache_remote_entries_01, virtual_registries_container_cache_remote_entries_02, virtual_registries_container_cache_remote_entries_03, virtual_registries_container_cache_remote_entries_04, virtual_registries_container_cache_remote_entries_05, virtual_registries_container_cache_remote_entries_06, virtual_registries_container_cache_remote_entries_07, virtual_registries_container_cache_remote_entries_08, virtual_registries_container_cache_remote_entries_09, virtual_registries_container_cache_remote_entries_10, virtual_registries_container_cache_remote_entries_11, virtual_registries_container_cache_remote_entries_12, virtual_registries_container_cache_remote_entries_13, virtual_registries_container_cache_remote_entries_14, virtual_registries_container_cache_remote_entries_15, virtual_registries_packages_maven_cache_entries, virtual_registries_packages_maven_cache_entries_00, virtual_registries_packages_maven_cache_entries_01, virtual_registries_packages_maven_cache_entries_02, virtual_registries_packages_maven_cache_entries_03, virtual_registries_packages_maven_cache_entries_04, virtual_registries_packages_maven_cache_entries_05, virtual_registries_packages_maven_cache_entries_06, virtual_registries_packages_maven_cache_entries_07, virtual_registries_packages_maven_cache_entries_08, virtual_registries_packages_maven_cache_entries_09, virtual_registries_packages_maven_cache_entries_10, virtual_registries_packages_maven_cache_entries_11, virtual_registries_packages_maven_cache_entries_12, virtual_registries_packages_maven_cache_entries_13, virtual_registries_packages_maven_cache_entries_14, virtual_registries_packages_maven_cache_entries_15, virtual_registries_packages_maven_cache_local_entries, virtual_registries_packages_maven_cache_local_entries_00, virtual_registries_packages_maven_cache_local_entries_01, virtual_registries_packages_maven_cache_local_entries_02, virtual_registries_packages_maven_cache_local_entries_03, virtual_registries_packages_maven_cache_local_entries_04, virtual_registries_packages_maven_cache_local_entries_05, virtual_registries_packages_maven_cache_local_entries_06, virtual_registries_packages_maven_cache_local_entries_07, virtual_registries_packages_maven_cache_local_entries_08, virtual_registries_packages_maven_cache_local_entries_09, virtual_registries_packages_maven_cache_local_entries_10, virtual_registries_packages_maven_cache_local_entries_11, virtual_registries_packages_maven_cache_local_entries_12, virtual_registries_packages_maven_cache_local_entries_13, virtual_registries_packages_maven_cache_local_entries_14, virtual_registries_packages_maven_cache_local_entries_15, virtual_registries_packages_maven_cache_remote_entries, virtual_registries_packages_maven_cache_remote_entries_00, virtual_registries_packages_maven_cache_remote_entries_01, virtual_registries_packages_maven_cache_remote_entries_02, virtual_registries_packages_maven_cache_remote_entries_03, virtual_registries_packages_maven_cache_remote_entries_04, virtual_registries_packages_maven_cache_remote_entries_05, virtual_registries_packages_maven_cache_remote_entries_06, virtual_registries_packages_maven_cache_remote_entries_07, virtual_registries_packages_maven_cache_remote_entries_08, virtual_registries_packages_maven_cache_remote_entries_09, virtual_registries_packages_maven_cache_remote_entries_10, virtual_registries_packages_maven_cache_remote_entries_11, virtual_registries_packages_maven_cache_remote_entries_12, virtual_registries_packages_maven_cache_remote_entries_13, virtual_registries_packages_maven_cache_remote_entries_14, virtual_registries_packages_maven_cache_remote_entries_15, virtual_registries_packages_npm_cache_local_entries, virtual_registries_packages_npm_cache_local_entries_00, virtual_registries_packages_npm_cache_local_entries_01, virtual_registries_packages_npm_cache_local_entries_02, virtual_registries_packages_npm_cache_local_entries_03, virtual_registries_packages_npm_cache_local_entries_04, virtual_registries_packages_npm_cache_local_entries_05, virtual_registries_packages_npm_cache_local_entries_06, virtual_registries_packages_npm_cache_local_entries_07, virtual_registries_packages_npm_cache_local_entries_08, virtual_registries_packages_npm_cache_local_entries_09, virtual_registries_packages_npm_cache_local_entries_10, virtual_registries_packages_npm_cache_local_entries_11, virtual_registries_packages_npm_cache_local_entries_12, virtual_registries_packages_npm_cache_local_entries_13, virtual_registries_packages_npm_cache_local_entries_14, virtual_registries_packages_npm_cache_local_entries_15, virtual_registries_packages_npm_cache_remote_entries, virtual_registries_packages_npm_cache_remote_entries_00, virtual_registries_packages_npm_cache_remote_entries_01, virtual_registries_packages_npm_cache_remote_entries_02, virtual_registries_packages_npm_cache_remote_entries_03, virtual_registries_packages_npm_cache_remote_entries_04, virtual_registries_packages_npm_cache_remote_entries_05, virtual_registries_packages_npm_cache_remote_entries_06, virtual_registries_packages_npm_cache_remote_entries_07, virtual_registries_packages_npm_cache_remote_entries_08, virtual_registries_packages_npm_cache_remote_entries_09, virtual_registries_packages_npm_cache_remote_entries_10, virtual_registries_packages_npm_cache_remote_entries_11, virtual_registries_packages_npm_cache_remote_entries_12, virtual_registries_packages_npm_cache_remote_entries_13, virtual_registries_packages_npm_cache_remote_entries_14, virtual_registries_packages_npm_cache_remote_entries_15, virtual_registries_cleanup_policies, virtual_registries_container_registries, virtual_registries_container_registry_upstreams, virtual_registries_container_upstreams, virtual_registries_packages_maven_cache_remote_entry_states, virtual_registries_packages_maven_local_upstreams, virtual_registries_packages_maven_registries, virtual_registries_packages_maven_registry_upstreams, virtual_registries_packages_maven_upstream_rules, virtual_registries_packages_maven_upstreams, virtual_registries_packages_npm_registries, virtual_registries_packages_npm_registry_upstreams, virtual_registries_packages_npm_upstreams, virtual_registries_settingsvirtual_registries_container_cache_entriesgroup_id FKbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_00group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_01group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_02group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_03group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_04group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_05group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_06group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_07group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_08group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_09group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_10group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_11group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_12group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_13group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_14group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_entries_15group_idbigintupstream_id PKbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintfile_sha1byteaupstream_etagtextcontent_typetextrelative_path PKtextfiletextobject_storage_keytextvirtual_registries_container_cache_remote_entriescreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_00created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_01created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_02created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_03created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_04created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_05created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_06created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_07created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_08created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_09created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_10created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_11created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_12created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_13created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_14created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_container_cache_remote_entries_15created_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptziid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintfile_storesmallintstatussmallintfile_sha1bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextdigesttextsizebigintvirtual_registries_packages_maven_cache_entriesgroup_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_00group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_01group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_02group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_03group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_04group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_05group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_06group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_07group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_08group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_09group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_10group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_11group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_12group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_13group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_14group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_entries_15group_idbigintupstream_id PKbigintupstream_checked_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatus PKsmallintrelative_path PKtextfiletextobject_storage_keytextupstream_etagtextcontent_typetextfile_md5byteafile_sha1byteadownloads_countbigintdownloaded_attimestamptzvirtual_registries_packages_maven_cache_local_entriesiid PKbigintgroup_id PKbigintupstream_id FKbigintpackage_file_id FKbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_00iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_01iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_02iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_03iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_04iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_05iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_06iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_07iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_08iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_09iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_10iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_11iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_12iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_13iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_14iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_local_entries_15iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzrelative_pathtextvirtual_registries_packages_maven_cache_remote_entriesiid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_00iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_01iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_02iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_03iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_04iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_05iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_06iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_07iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_08iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_09iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_10iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_11iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_12iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_13iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_14iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_maven_cache_remote_entries_15iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintcreated_attimestamptzupdated_attimestamptzupstream_checked_attimestamptzdownloaded_attimestamptzsizeintegerfile_storesmallintstatussmallintfile_sha1byteafile_md5bytearelative_pathtextobject_storage_keytextupstream_etagtextcontent_typetextfiletextvirtual_registries_packages_npm_cache_local_entriesiid PKbigintgroup_id PKbigintupstream_id FKbigintpackage_file_id FKbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_00iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_01iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_02iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_03iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_04iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_05iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_06iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_07iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_08iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_09iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_10iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_11iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_12iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_13iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_14iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_local_entries_15iid PKbigintgroup_id PKbigintupstream_idbigintpackage_file_idbigintcreated_attimestamptzupdated_attimestamptzrelative_pathtextvirtual_registries_packages_npm_cache_remote_entriesiid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_00iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_01iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_02iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_03iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_04iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_05iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_06iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_07iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_08iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_09iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_10iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_11iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_12iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_13iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_14iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_packages_npm_cache_remote_entries_15iid PKbigintgroup_id PKbigintupstream_idbigintdownloads_countbigintupstream_checked_attimestamptzdownloaded_attimestamptzcreated_attimestamptzupdated_attimestamptzfile_storeintegersizeintegerstatussmallintfile_md5byteafile_sha1byteaupstream_etagtextcontent_typetextrelative_pathtextfiletextobject_storage_keytextvirtual_registries_cleanup_policiesid PKbigintgroup_id FKbigintnext_run_attimestamptzlast_run_attimestamptzlast_run_deleted_sizebigintcreated_attimestamptzupdated_attimestamptzkeep_n_days_after_downloadintegerlast_run_deleted_entries_countintegerstatussmallintcadencesmallintenabledbooleannotify_on_successbooleannotify_on_failurebooleanfailure_messagetextlast_run_detailed_metricsjsonbvirtual_registries_container_registriesid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptznametextdescriptiontextvirtual_registries_container_registry_upstreamsid PKbigintgroup_id FKbigintregistry_id FKbigintupstream_id FKbigintcreated_attimestamptzupdated_attimestamptzpositionsmallintvirtual_registries_container_upstreamsid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzcache_validity_hourssmallintusernamejsonbpasswordjsonburltextnametextdescriptiontextauth_urltextvirtual_registries_packages_maven_cache_remote_entry_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzvirtual_registries_packages_maven_cache_remote_entry_iid FKbigintgroup_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextvirtual_registries_packages_maven_local_upstreamsid PKbigintgroup_id FKbigintlocal_group_idbigintlocal_project_idbigintcreated_attimestamptzupdated_attimestamptzmetadata_cache_validity_hourssmallintcache_validity_hourssmallintnametextdescriptiontextvirtual_registries_packages_maven_registriesid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptznametextdescriptiontextvirtual_registries_packages_maven_registry_upstreamsid PKbigintgroup_id FKbigintregistry_id FKbigintupstream_id FKbigintcreated_attimestamptzupdated_attimestamptzpositionsmallintlocal_upstream_id FKbigintvirtual_registries_packages_maven_upstream_rulesid PKbigintremote_upstream_id FKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzpattern_typesmallintrule_typesmallinttarget_coordinatesmallintpatterntextvirtual_registries_packages_maven_upstreamsid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzurltextcache_validity_hourssmallintusernamejsonbpasswordjsonbnametextdescriptiontextmetadata_cache_validity_hourssmallintvirtual_registries_packages_npm_registriesid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptznametextdescriptiontextvirtual_registries_packages_npm_registry_upstreamsid PKbigintgroup_id FKbigintregistry_id FKbigintupstream_id FKbigintcreated_attimestamptzupdated_attimestamptzpositionsmallintvirtual_registries_packages_npm_upstreamsid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzcache_validity_hourssmallintmetadata_cache_validity_hourssmallintusernamejsonbpasswordjsonburltextnametextdescriptiontextauth_tokenjsonbvirtual_registries_settingsid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzenabledbooleannamespacespackages_package_filesgroup_idgroup_idgroup_idgroup_idgroup_idgroup_idgroup_idgroup_idgroup_idgroup_idgroup_idgroup_idgroup_idregistry_idgroup_idupstream_idpackage_file_idgroup_idupstream_idgroup_id, virtual_registries_packages_maven_cache_remote_entry_iidgroup_idupstream_idgroup_idlocal_upstream_idregistry_idremote_upstream_idgroup_idupstream_idgroup_idpackage_file_idupstream_idregistry_idgroup_id

Relationships

virtual_registries_container_cache_entries

16 cols · no RLS · line 9535View in 3D
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULLnamespaces.id 1:N
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • (upstream_id, created_at) WHERE status = 0 idx_vregs_container_cache_entries_on_pending_upt_id_created_at
  • UNIQUE (relative_path, object_storage_key, group_id) i_v_container_cache_entries_on_uniq_object_storage_key_group_id
  • (group_id, upstream_etag) idx_vregs_container_cache_entries_on_group_id_upstream_etag
  • (upstream_id, relative_path) WHERE status = 2 idx_vregs_container_cache_entries_on_upt_id_relpath
  • (relative_path) idx_vregs_container_cache_entries_on_relative_path_trigram

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_00

16 cols · no RLS · line 9561View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) index_2cafcd1df7
  • (upstream_id, created_at) WHERE status = 0 index_a88013d9e0
  • (group_id, upstream_etag) index_c402fa3c8f
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_cach_upstream_id_relative_path_idx
  • (relative_path) virtual_registries_container_cache_entries_00_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_01

16 cols · no RLS · line 9586View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) index_6a678be4ab
  • (group_id, upstream_etag) index_737197bd05
  • (upstream_id, created_at) WHERE status = 0 index_f48efb3442
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_cac_upstream_id_relative_path_idx1
  • (relative_path) virtual_registries_container_cache_entries_01_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_02

16 cols · no RLS · line 9611View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • (upstream_id, created_at) WHERE status = 0 index_2dbe9ab5c7
  • UNIQUE (relative_path, object_storage_key, group_id) index_372ba7ffcb
  • (group_id, upstream_etag) index_b72ed34d9d
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_cac_upstream_id_relative_path_idx2
  • (relative_path) virtual_registries_container_cache_entries_02_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_03

16 cols · no RLS · line 9636View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • (group_id, upstream_etag) index_820ee4d83a
  • (upstream_id, created_at) WHERE status = 0 index_bb0abfe72f
  • UNIQUE (relative_path, object_storage_key, group_id) index_becd174d94
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_cac_upstream_id_relative_path_idx3
  • (relative_path) virtual_registries_container_cache_entries_03_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_04

16 cols · no RLS · line 9661View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • (group_id, upstream_etag) index_41472ff7dc
  • UNIQUE (relative_path, object_storage_key, group_id) index_5079dc225c
  • (upstream_id, created_at) WHERE status = 0 index_b88fe7a7c4
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_cac_upstream_id_relative_path_idx4
  • (relative_path) virtual_registries_container_cache_entries_04_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_05

16 cols · no RLS · line 9686View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) index_ae0e0018e1
  • (upstream_id, created_at) WHERE status = 0 index_bdfff5cecb
  • (group_id, upstream_etag) index_c64159b734
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_cac_upstream_id_relative_path_idx5
  • (relative_path) virtual_registries_container_cache_entries_05_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_06

16 cols · no RLS · line 9711View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) index_161d562e07
  • (upstream_id, created_at) WHERE status = 0 index_328a0412fd
  • (group_id, upstream_etag) index_8a35052565
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_cac_upstream_id_relative_path_idx6
  • (relative_path) virtual_registries_container_cache_entries_06_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_07

16 cols · no RLS · line 9736View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) index_1004c7b0c8
  • (group_id, upstream_etag) index_607e2bd4ad
  • (upstream_id, created_at) WHERE status = 0 index_6c08054aaa
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_cac_upstream_id_relative_path_idx7
  • (relative_path) virtual_registries_container_cache_entries_07_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_08

16 cols · no RLS · line 9761View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) index_76d4378747
  • (upstream_id, created_at) WHERE status = 0 index_c676c698e9
  • (group_id, upstream_etag) index_c73ae997aa
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_cac_upstream_id_relative_path_idx8
  • (relative_path) virtual_registries_container_cache_entries_08_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_09

16 cols · no RLS · line 9786View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • (upstream_id, created_at) WHERE status = 0 index_08b889e694
  • UNIQUE (relative_path, object_storage_key, group_id) index_1714ba4053
  • (group_id, upstream_etag) index_8673a5775d
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_cac_upstream_id_relative_path_idx9
  • (relative_path) virtual_registries_container_cache_entries_09_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_10

16 cols · no RLS · line 9811View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • (group_id, upstream_etag) index_4a3f58d2b5
  • (upstream_id, created_at) WHERE status = 0 index_b1835b5295
  • UNIQUE (relative_path, object_storage_key, group_id) index_de3cae661c
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_ca_upstream_id_relative_path_idx10
  • (relative_path) virtual_registries_container_cache_entries_10_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_11

16 cols · no RLS · line 9836View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • (upstream_id, created_at) WHERE status = 0 index_605f4ef732
  • (group_id, upstream_etag) index_614e1f91ae
  • UNIQUE (relative_path, object_storage_key, group_id) index_c96ec742ff
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_ca_upstream_id_relative_path_idx11
  • (relative_path) virtual_registries_container_cache_entries_11_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_12

16 cols · no RLS · line 9861View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • (group_id, upstream_etag) index_1106f883b6
  • (upstream_id, created_at) WHERE status = 0 index_360e4ca212
  • UNIQUE (relative_path, object_storage_key, group_id) index_7f5fb2e7be
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_ca_upstream_id_relative_path_idx12
  • (relative_path) virtual_registries_container_cache_entries_12_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_13

16 cols · no RLS · line 9886View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • (group_id, upstream_etag) index_7f2722013e
  • (upstream_id, created_at) WHERE status = 0 index_c2cd6c0784
  • UNIQUE (relative_path, object_storage_key, group_id) index_cfc222ccc5
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_ca_upstream_id_relative_path_idx13
  • (relative_path) virtual_registries_container_cache_entries_13_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_14

16 cols · no RLS · line 9911View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • (upstream_id, created_at) WHERE status = 0 index_27371c023a
  • (group_id, upstream_etag) index_635b2ee9bf
  • UNIQUE (relative_path, object_storage_key, group_id) index_a8b625e865
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_ca_upstream_id_relative_path_idx14
  • (relative_path) virtual_registries_container_cache_entries_14_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_entries_15

16 cols · no RLS · line 9936View in 3D
  • Isolated tablevirtual_registries_container_cache_entries_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • (upstream_id, created_at) WHERE status = 0 index_322d0b5a4b
  • UNIQUE (relative_path, object_storage_key, group_id) index_845848dc7f
  • (group_id, upstream_etag) index_c041c4bec7
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_container_ca_upstream_id_relative_path_idx15
  • (relative_path) virtual_registries_container_cache_entries_15_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(object_storage_key) <= 1024; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries

18 cols · no RLS · line 9968View in 3D
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULLnamespaces.id 1:N
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (upstream_id, group_id, created_at) WHERE status = 0 idx_vreg_cont_cache_remote_lookup
  • (digest) idx_vregs_container_cache_remote_entries_on_digest
  • (group_id, iid, downloaded_at) WHERE status = 0 index_vr_cont_cache_rem_entries_on_requiring_cleanup
  • UNIQUE (group_id, relative_path, object_storage_key) idx_uniq_vreg_cont_cache_remote_rel_path_key
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 idx_uniq_vreg_cont_cache_remote_upstream_rel_path
  • (upstream_id, status) idx_vreg_cont_cache_remote_upstream_status
  • (relative_path) idx_vreg_cont_cache_remote_rel_path_trigram

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_00

18 cols · no RLS · line 9999View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (digest) index_6d81e95e7a
  • (upstream_id, group_id, created_at) WHERE status = 0 index_ed5ccdc4cd
  • (group_id, iid, downloaded_at) WHERE status = 0 index_f25c287606
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container__group_id_relative_path_object_idx
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container__group_id_upstream_id_relative_idx
  • (upstream_id, status) virtual_registries_container_cache_remot_upstream_id_status_idx
  • (relative_path) virtual_registries_container_cache_remote_ent_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_01

18 cols · no RLS · line 10029View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (digest) index_284ac91299
  • (upstream_id, group_id, created_at) WHERE status = 0 index_8d1d9cd2cb
  • (group_id, iid, downloaded_at) WHERE status = 0 index_9f804f9636
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container__group_id_relative_path_objec_idx1
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container__group_id_upstream_id_relativ_idx1
  • (upstream_id, status) virtual_registries_container_cache_remo_upstream_id_status_idx1
  • (relative_path) virtual_registries_container_cache_remote_en_relative_path_idx1

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_02

18 cols · no RLS · line 10059View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (digest) index_16977b62b3
  • (group_id, iid, downloaded_at) WHERE status = 0 index_7cfe703df0
  • (upstream_id, group_id, created_at) WHERE status = 0 index_7e851ceff6
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container__group_id_relative_path_objec_idx2
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container__group_id_upstream_id_relativ_idx2
  • (upstream_id, status) virtual_registries_container_cache_remo_upstream_id_status_idx2
  • (relative_path) virtual_registries_container_cache_remote_en_relative_path_idx2

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_03

18 cols · no RLS · line 10089View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (upstream_id, group_id, created_at) WHERE status = 0 index_0586981065
  • (group_id, iid, downloaded_at) WHERE status = 0 index_3d578831b2
  • (digest) index_e71cd0a814
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container__group_id_relative_path_objec_idx3
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container__group_id_upstream_id_relativ_idx3
  • (upstream_id, status) virtual_registries_container_cache_remo_upstream_id_status_idx3
  • (relative_path) virtual_registries_container_cache_remote_en_relative_path_idx3

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_04

18 cols · no RLS · line 10119View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (upstream_id, group_id, created_at) WHERE status = 0 index_9eb022c7ea
  • (digest) index_c134936666
  • (group_id, iid, downloaded_at) WHERE status = 0 index_db4f6a9088
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container__group_id_relative_path_objec_idx4
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container__group_id_upstream_id_relativ_idx4
  • (upstream_id, status) virtual_registries_container_cache_remo_upstream_id_status_idx4
  • (relative_path) virtual_registries_container_cache_remote_en_relative_path_idx4

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_05

18 cols · no RLS · line 10149View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_230e63a655
  • (digest) index_b2a9c23ded
  • (upstream_id, group_id, created_at) WHERE status = 0 index_d40c2d7e7d
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container__group_id_relative_path_objec_idx5
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container__group_id_upstream_id_relativ_idx5
  • (upstream_id, status) virtual_registries_container_cache_remo_upstream_id_status_idx5
  • (relative_path) virtual_registries_container_cache_remote_en_relative_path_idx5

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_06

18 cols · no RLS · line 10179View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_2669d36368
  • (digest) index_3c08969144
  • (upstream_id, group_id, created_at) WHERE status = 0 index_97ea88d542
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container__group_id_relative_path_objec_idx6
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container__group_id_upstream_id_relativ_idx6
  • (upstream_id, status) virtual_registries_container_cache_remo_upstream_id_status_idx6
  • (relative_path) virtual_registries_container_cache_remote_en_relative_path_idx6

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_07

18 cols · no RLS · line 10209View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (upstream_id, group_id, created_at) WHERE status = 0 index_6ee4c2760a
  • (digest) index_7c115bb7b7
  • (group_id, iid, downloaded_at) WHERE status = 0 index_c13656fec7
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container__group_id_relative_path_objec_idx7
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container__group_id_upstream_id_relativ_idx7
  • (upstream_id, status) virtual_registries_container_cache_remo_upstream_id_status_idx7
  • (relative_path) virtual_registries_container_cache_remote_en_relative_path_idx7

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_08

18 cols · no RLS · line 10239View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (upstream_id, group_id, created_at) WHERE status = 0 index_1b7c5225c3
  • (group_id, iid, downloaded_at) WHERE status = 0 index_527048280a
  • (digest) index_9e179fb2b0
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container__group_id_relative_path_objec_idx8
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container__group_id_upstream_id_relativ_idx8
  • (upstream_id, status) virtual_registries_container_cache_remo_upstream_id_status_idx8
  • (relative_path) virtual_registries_container_cache_remote_en_relative_path_idx8

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_09

18 cols · no RLS · line 10269View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_a587887746
  • (digest) index_b1e7a97375
  • (upstream_id, group_id, created_at) WHERE status = 0 index_d7a5d3faf2
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container__group_id_relative_path_objec_idx9
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container__group_id_upstream_id_relativ_idx9
  • (upstream_id, status) virtual_registries_container_cache_remo_upstream_id_status_idx9
  • (relative_path) virtual_registries_container_cache_remote_en_relative_path_idx9

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_10

18 cols · no RLS · line 10299View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (digest) index_107e505187
  • (upstream_id, group_id, created_at) WHERE status = 0 index_70a74a41e7
  • (group_id, iid, downloaded_at) WHERE status = 0 index_9c5f8f615f
  • (upstream_id, status) virtual_registries_container_cache_rem_upstream_id_status_idx10
  • (relative_path) virtual_registries_container_cache_remote_e_relative_path_idx10
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container_group_id_relative_path_objec_idx10
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container_group_id_upstream_id_relativ_idx10

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_11

18 cols · no RLS · line 10329View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (digest) index_3b647bf06d
  • (upstream_id, group_id, created_at) WHERE status = 0 index_c03c3c5941
  • (group_id, iid, downloaded_at) WHERE status = 0 index_f32ef53c6f
  • (upstream_id, status) virtual_registries_container_cache_rem_upstream_id_status_idx11
  • (relative_path) virtual_registries_container_cache_remote_e_relative_path_idx11
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container_group_id_relative_path_objec_idx11
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container_group_id_upstream_id_relativ_idx11

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_12

18 cols · no RLS · line 10359View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (digest) index_3f49a99d8f
  • (upstream_id, group_id, created_at) WHERE status = 0 index_788d2c6465
  • (group_id, iid, downloaded_at) WHERE status = 0 index_a5701f6698
  • (upstream_id, status) virtual_registries_container_cache_rem_upstream_id_status_idx12
  • (relative_path) virtual_registries_container_cache_remote_e_relative_path_idx12
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container_group_id_relative_path_objec_idx12
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container_group_id_upstream_id_relativ_idx12

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_13

18 cols · no RLS · line 10389View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (digest) index_29c9223a63
  • (group_id, iid, downloaded_at) WHERE status = 0 index_3954ae28dd
  • (upstream_id, group_id, created_at) WHERE status = 0 index_53184a1801
  • (upstream_id, status) virtual_registries_container_cache_rem_upstream_id_status_idx13
  • (relative_path) virtual_registries_container_cache_remote_e_relative_path_idx13
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container_group_id_relative_path_objec_idx13
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container_group_id_upstream_id_relativ_idx13

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_14

18 cols · no RLS · line 10419View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_2b154c3219
  • (upstream_id, group_id, created_at) WHERE status = 0 index_3db5021697
  • (digest) index_a3dae5a646
  • (upstream_id, status) virtual_registries_container_cache_rem_upstream_id_status_idx14
  • (relative_path) virtual_registries_container_cache_remote_e_relative_path_idx14
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container_group_id_relative_path_objec_idx14
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container_group_id_upstream_id_relativ_idx14

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_container_cache_remote_entries_15

18 cols · no RLS · line 10449View in 3D
  • Isolated tablevirtual_registries_container_cache_remote_entries_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
iid PKbigintNOT NULLnextval(CAST('virtual_registries_container_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024
digest textnullCHECK char_length(digest) <= 71
size bigintnullCHECK size IS NOT NULL

Indexes

  • (digest) index_b739d5ff94
  • (upstream_id, group_id, created_at) WHERE status = 0 index_bb408e6818
  • (group_id, iid, downloaded_at) WHERE status = 0 index_db5aa5426d
  • (upstream_id, status) virtual_registries_container_cache_rem_upstream_id_status_idx15
  • (relative_path) virtual_registries_container_cache_remote_e_relative_path_idx15
  • UNIQUE (group_id, relative_path, object_storage_key) virtual_registries_container_group_id_relative_path_objec_idx15
  • UNIQUE (group_id, upstream_id, relative_path) WHERE status = 0 virtual_registries_container_group_id_upstream_id_relativ_idx15

Referenced by

  • nothing

Table checks: char_length(digest) <= 71; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; digest IS NULL OR char_length(digest) = 71; size IS NOT NULL; char_length(content_type) <= 255; char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; octet_length(file_sha1) = 20

virtual_registries_packages_maven_cache_entries

17 cols · no RLS · line 10479View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • (upstream_id, status, relative_path, downloaded_at) idx_maven_cache_entries_requiring_cleanup_columns
  • UNIQUE (relative_path, object_storage_key, group_id) i_v_pkgs_mvn_cache_entries_on_uniq_object_storage_key_group_id
  • (upstream_id, relative_path) WHERE status = 2 idx_vregs_pkgs_mvn_cache_entries_on_pending_upt_id_relpath
  • (upstream_id, created_at) WHERE status = 0 idx_vregs_pkgs_mvn_cache_entries_on_pending_upt_id_created_at
  • (group_id, status) idx_vreg_pkgs_maven_cache_entries_on_group_id_status
  • (relative_path) idx_vreg_pkgs_maven_cache_entries_on_relative_path_trigram

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_00

17 cols · no RLS · line 10507View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • (upstream_id, status, relative_path, downloaded_at) index_4537e7023a
  • UNIQUE (relative_path, object_storage_key, group_id) index_73c6743a62
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven_ca_upstream_id_created_at_idx
  • (group_id, status) virtual_registries_packages_maven_cache_ent_group_id_status_idx
  • (relative_path) virtual_registries_packages_maven_cache_entri_relative_path_idx
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_maven_upstream_id_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_01

17 cols · no RLS · line 10534View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) index_1a1e457d1b
  • (upstream_id, status, relative_path, downloaded_at) index_aef9b335d9
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mave_upstream_id_relative_path_idx1
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven_c_upstream_id_created_at_idx1
  • (group_id, status) virtual_registries_packages_maven_cache_en_group_id_status_idx1
  • (relative_path) virtual_registries_packages_maven_cache_entr_relative_path_idx1

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_02

17 cols · no RLS · line 10561View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) index_279f94d0b8
  • (upstream_id, status, relative_path, downloaded_at) index_c5456b9b5a
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mave_upstream_id_relative_path_idx2
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven_c_upstream_id_created_at_idx2
  • (group_id, status) virtual_registries_packages_maven_cache_en_group_id_status_idx2
  • (relative_path) virtual_registries_packages_maven_cache_entr_relative_path_idx2

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_03

17 cols · no RLS · line 10588View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • (upstream_id, status, relative_path, downloaded_at) index_037bb33380
  • UNIQUE (relative_path, object_storage_key, group_id) index_a7b7e68ef5
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mave_upstream_id_relative_path_idx3
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven_c_upstream_id_created_at_idx3
  • (group_id, status) virtual_registries_packages_maven_cache_en_group_id_status_idx3
  • (relative_path) virtual_registries_packages_maven_cache_entr_relative_path_idx3

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_04

17 cols · no RLS · line 10615View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) index_a739a82eb4
  • (upstream_id, status, relative_path, downloaded_at) index_b8d2e51e2a
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mave_upstream_id_relative_path_idx4
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven_c_upstream_id_created_at_idx4
  • (group_id, status) virtual_registries_packages_maven_cache_en_group_id_status_idx4
  • (relative_path) virtual_registries_packages_maven_cache_entr_relative_path_idx4

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_05

17 cols · no RLS · line 10642View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) index_2947f5803e
  • (upstream_id, status, relative_path, downloaded_at) index_7c0398954a
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mave_upstream_id_relative_path_idx5
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven_c_upstream_id_created_at_idx5
  • (group_id, status) virtual_registries_packages_maven_cache_en_group_id_status_idx5
  • (relative_path) virtual_registries_packages_maven_cache_entr_relative_path_idx5

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_06

17 cols · no RLS · line 10669View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) index_89972e21ab
  • (upstream_id, status, relative_path, downloaded_at) index_ff740d3db5
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mave_upstream_id_relative_path_idx6
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven_c_upstream_id_created_at_idx6
  • (group_id, status) virtual_registries_packages_maven_cache_en_group_id_status_idx6
  • (relative_path) virtual_registries_packages_maven_cache_entr_relative_path_idx6

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_07

17 cols · no RLS · line 10696View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • (upstream_id, status, relative_path, downloaded_at) index_187704fbce
  • UNIQUE (relative_path, object_storage_key, group_id) index_67a713b7f9
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mave_upstream_id_relative_path_idx7
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven_c_upstream_id_created_at_idx7
  • (group_id, status) virtual_registries_packages_maven_cache_en_group_id_status_idx7
  • (relative_path) virtual_registries_packages_maven_cache_entr_relative_path_idx7

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_08

17 cols · no RLS · line 10723View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • (upstream_id, status, relative_path, downloaded_at) index_7f637a7968
  • UNIQUE (relative_path, object_storage_key, group_id) index_d995318a2f
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mave_upstream_id_relative_path_idx8
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven_c_upstream_id_created_at_idx8
  • (group_id, status) virtual_registries_packages_maven_cache_en_group_id_status_idx8
  • (relative_path) virtual_registries_packages_maven_cache_entr_relative_path_idx8

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_09

17 cols · no RLS · line 10750View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • (upstream_id, status, relative_path, downloaded_at) index_27b89bcb0e
  • UNIQUE (relative_path, object_storage_key, group_id) index_ead39ac5ee
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mave_upstream_id_relative_path_idx9
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven_c_upstream_id_created_at_idx9
  • (group_id, status) virtual_registries_packages_maven_cache_en_group_id_status_idx9
  • (relative_path) virtual_registries_packages_maven_cache_entr_relative_path_idx9

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_10

17 cols · no RLS · line 10777View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) index_48e60d4565
  • (upstream_id, status, relative_path, downloaded_at) index_8b2b4831b9
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mav_upstream_id_relative_path_idx10
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven__upstream_id_created_at_idx10
  • (group_id, status) virtual_registries_packages_maven_cache_e_group_id_status_idx10
  • (relative_path) virtual_registries_packages_maven_cache_ent_relative_path_idx10

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_11

17 cols · no RLS · line 10804View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • (upstream_id, status, relative_path, downloaded_at) index_00ee0cafc3
  • UNIQUE (relative_path, object_storage_key, group_id) index_eda8228089
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mav_upstream_id_relative_path_idx11
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven__upstream_id_created_at_idx11
  • (group_id, status) virtual_registries_packages_maven_cache_e_group_id_status_idx11
  • (relative_path) virtual_registries_packages_maven_cache_ent_relative_path_idx11

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_12

17 cols · no RLS · line 10831View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) index_3a131ac229
  • (upstream_id, status, relative_path, downloaded_at) index_e184323900
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mav_upstream_id_relative_path_idx12
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven__upstream_id_created_at_idx12
  • (group_id, status) virtual_registries_packages_maven_cache_e_group_id_status_idx12
  • (relative_path) virtual_registries_packages_maven_cache_ent_relative_path_idx12

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_13

17 cols · no RLS · line 10858View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • (upstream_id, status, relative_path, downloaded_at) index_787bb61f6f
  • UNIQUE (relative_path, object_storage_key, group_id) index_8236aea2c0
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mav_upstream_id_relative_path_idx13
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven__upstream_id_created_at_idx13
  • (group_id, status) virtual_registries_packages_maven_cache_e_group_id_status_idx13
  • (relative_path) virtual_registries_packages_maven_cache_ent_relative_path_idx13

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_14

17 cols · no RLS · line 10885View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • (upstream_id, status, relative_path, downloaded_at) index_1fcb51adf9
  • UNIQUE (relative_path, object_storage_key, group_id) index_f0b2f2ff30
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mav_upstream_id_relative_path_idx14
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven__upstream_id_created_at_idx14
  • (group_id, status) virtual_registries_packages_maven_cache_e_group_id_status_idx14
  • (relative_path) virtual_registries_packages_maven_cache_ent_relative_path_idx14

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_entries_15

17 cols · no RLS · line 10912View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_entries_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
group_id bigintNOT NULL
upstream_id PKbigintNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status PKsmallintNOT NULL0
relative_path PKtextNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
downloads_count bigintNOT NULL0
downloaded_at timestamptznull

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) index_56f47ebb4d
  • (upstream_id, status, relative_path, downloaded_at) index_66023186f7
  • (upstream_id, relative_path) WHERE status = 2 virtual_registries_packages_mav_upstream_id_relative_path_idx15
  • (upstream_id, created_at) WHERE status = 0 virtual_registries_packages_maven__upstream_id_created_at_idx15
  • (group_id, status) virtual_registries_packages_maven_cache_e_group_id_status_idx15
  • (relative_path) virtual_registries_packages_maven_cache_ent_relative_path_idx15

Referenced by

  • nothing

Table checks: char_length(content_type) <= 255; char_length(file) <= 1024; char_length(object_storage_key) <= 1024; char_length(relative_path) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20; char_length(upstream_etag) <= 255

virtual_registries_packages_maven_cache_local_entries

8 cols · no RLS · line 10946View in 3D
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULLnamespaces.id 1:N · CASCADE
upstream_id bigintNOT NULLvirtual_registries_packages_maven_local_upstreams.id 1:N · CASCADE
package_file_id bigintNOT NULLpackages_package_files.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) idx_uniq_vreg_mvn_cache_local_entries_on_upstream_id_rel_path
  • (package_file_id) idx_vreg_pkgs_maven_cache_local_entries_on_package_file_id

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_00

8 cols · no RLS · line 10959View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx38
  • (package_file_id) virtual_registries_packages_maven_cache_loc_package_file_id_idx

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_01

8 cols · no RLS · line 10971View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx39
  • (package_file_id) virtual_registries_packages_maven_cache_lo_package_file_id_idx1

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_02

8 cols · no RLS · line 10983View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx40
  • (package_file_id) virtual_registries_packages_maven_cache_lo_package_file_id_idx2

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_03

8 cols · no RLS · line 10995View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx41
  • (package_file_id) virtual_registries_packages_maven_cache_lo_package_file_id_idx3

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_04

8 cols · no RLS · line 11007View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx42
  • (package_file_id) virtual_registries_packages_maven_cache_lo_package_file_id_idx4

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_05

8 cols · no RLS · line 11019View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx43
  • (package_file_id) virtual_registries_packages_maven_cache_lo_package_file_id_idx5

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_06

8 cols · no RLS · line 11031View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx44
  • (package_file_id) virtual_registries_packages_maven_cache_lo_package_file_id_idx6

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_07

8 cols · no RLS · line 11043View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx45
  • (package_file_id) virtual_registries_packages_maven_cache_lo_package_file_id_idx7

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_08

8 cols · no RLS · line 11055View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx46
  • (package_file_id) virtual_registries_packages_maven_cache_lo_package_file_id_idx8

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_09

8 cols · no RLS · line 11067View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx47
  • (package_file_id) virtual_registries_packages_maven_cache_lo_package_file_id_idx9

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_10

8 cols · no RLS · line 11079View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx48
  • (package_file_id) virtual_registries_packages_maven_cache_l_package_file_id_idx10

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_11

8 cols · no RLS · line 11091View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx49
  • (package_file_id) virtual_registries_packages_maven_cache_l_package_file_id_idx11

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_12

8 cols · no RLS · line 11103View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx50
  • (package_file_id) virtual_registries_packages_maven_cache_l_package_file_id_idx12

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_13

8 cols · no RLS · line 11115View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx51
  • (package_file_id) virtual_registries_packages_maven_cache_l_package_file_id_idx13

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_14

8 cols · no RLS · line 11127View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx52
  • (package_file_id) virtual_registries_packages_maven_cache_l_package_file_id_idx14

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_local_entries_15

8 cols · no RLS · line 11139View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_local_entries_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx53
  • (package_file_id) virtual_registries_packages_maven_cache_l_package_file_id_idx15

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_maven_cache_remote_entries

18 cols · no RLS · line 11158View in 3D
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULLnamespaces.id 1:N
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_vr_pkg_maven_cache_rem_entries_on_requiring_cleanup
  • UNIQUE (relative_path, object_storage_key, group_id) idx_uniq_vreg_pkgs_mvn_cache_remote_entries_on_rel_path_and_key
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 idx_uniq_vreg_mvn_cache_remote_entries_on_upstream_id_rel_path
  • (upstream_id, status) idx_vreg_pkgs_mvn_cache_remote_entries_upstream_id_and_status
  • (relative_path) idx_vregs_pkgs_maven_cache_remote_entries_on_rel_path_trigram

Referenced by

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_00

18 cols · no RLS · line 11187View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_ff3e09d808
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_m_relative_path_object_storage__idx
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages_m_upstream_id_group_id_relative_idx
  • (upstream_id, status) virtual_registries_packages_maven_cache__upstream_id_status_idx
  • (relative_path) virtual_registries_packages_maven_cache_remot_relative_path_idx

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_01

18 cols · no RLS · line 11215View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_7f4901535d
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_m_relative_path_object_storage_idx1
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages_m_upstream_id_group_id_relativ_idx1
  • (relative_path) virtual_registries_packages_maven_cache_remo_relative_path_idx1
  • (upstream_id, status) virtual_registries_packages_maven_cache_upstream_id_status_idx1

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_02

18 cols · no RLS · line 11243View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_30764715b9
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_m_relative_path_object_storage_idx2
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages_m_upstream_id_group_id_relativ_idx2
  • (relative_path) virtual_registries_packages_maven_cache_remo_relative_path_idx2
  • (upstream_id, status) virtual_registries_packages_maven_cache_upstream_id_status_idx2

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_03

18 cols · no RLS · line 11271View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_5a527bd324
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_m_relative_path_object_storage_idx3
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages_m_upstream_id_group_id_relativ_idx3
  • (relative_path) virtual_registries_packages_maven_cache_remo_relative_path_idx3
  • (upstream_id, status) virtual_registries_packages_maven_cache_upstream_id_status_idx3

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_04

18 cols · no RLS · line 11299View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_1718fc2cc6
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_m_relative_path_object_storage_idx4
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages_m_upstream_id_group_id_relativ_idx4
  • (relative_path) virtual_registries_packages_maven_cache_remo_relative_path_idx4
  • (upstream_id, status) virtual_registries_packages_maven_cache_upstream_id_status_idx4

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_05

18 cols · no RLS · line 11327View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_d384a99971
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_m_relative_path_object_storage_idx5
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages_m_upstream_id_group_id_relativ_idx5
  • (relative_path) virtual_registries_packages_maven_cache_remo_relative_path_idx5
  • (upstream_id, status) virtual_registries_packages_maven_cache_upstream_id_status_idx5

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_06

18 cols · no RLS · line 11355View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_0fc6617161
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_m_relative_path_object_storage_idx6
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages_m_upstream_id_group_id_relativ_idx6
  • (relative_path) virtual_registries_packages_maven_cache_remo_relative_path_idx6
  • (upstream_id, status) virtual_registries_packages_maven_cache_upstream_id_status_idx6

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_07

18 cols · no RLS · line 11383View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_4585d1a955
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_m_relative_path_object_storage_idx7
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages_m_upstream_id_group_id_relativ_idx7
  • (relative_path) virtual_registries_packages_maven_cache_remo_relative_path_idx7
  • (upstream_id, status) virtual_registries_packages_maven_cache_upstream_id_status_idx7

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_08

18 cols · no RLS · line 11411View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_2680cdd4ec
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_m_relative_path_object_storage_idx8
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages_m_upstream_id_group_id_relativ_idx8
  • (relative_path) virtual_registries_packages_maven_cache_remo_relative_path_idx8
  • (upstream_id, status) virtual_registries_packages_maven_cache_upstream_id_status_idx8

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_09

18 cols · no RLS · line 11439View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_5f9468d857
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_m_relative_path_object_storage_idx9
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages_m_upstream_id_group_id_relativ_idx9
  • (relative_path) virtual_registries_packages_maven_cache_remo_relative_path_idx9
  • (upstream_id, status) virtual_registries_packages_maven_cache_upstream_id_status_idx9

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_10

18 cols · no RLS · line 11467View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_e12e0bea20
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages__relative_path_object_storage_idx10
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx10
  • (upstream_id, status) virtual_registries_packages_maven_cach_upstream_id_status_idx10
  • (relative_path) virtual_registries_packages_maven_cache_rem_relative_path_idx10

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_11

18 cols · no RLS · line 11495View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_fe07d85fc4
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages__relative_path_object_storage_idx11
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx11
  • (upstream_id, status) virtual_registries_packages_maven_cach_upstream_id_status_idx11
  • (relative_path) virtual_registries_packages_maven_cache_rem_relative_path_idx11

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_12

18 cols · no RLS · line 11523View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_5051c3468f
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages__relative_path_object_storage_idx12
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx12
  • (upstream_id, status) virtual_registries_packages_maven_cach_upstream_id_status_idx12
  • (relative_path) virtual_registries_packages_maven_cache_rem_relative_path_idx12

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_13

18 cols · no RLS · line 11551View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_a54c7a846a
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages__relative_path_object_storage_idx13
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx13
  • (upstream_id, status) virtual_registries_packages_maven_cach_upstream_id_status_idx13
  • (relative_path) virtual_registries_packages_maven_cache_rem_relative_path_idx13

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_14

18 cols · no RLS · line 11579View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_72c169b8b9
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages__relative_path_object_storage_idx14
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx14
  • (upstream_id, status) virtual_registries_packages_maven_cach_upstream_id_status_idx14
  • (relative_path) virtual_registries_packages_maven_cache_rem_relative_path_idx14

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_maven_cache_remote_entries_15

18 cols · no RLS · line 11607View in 3D
  • Isolated tablevirtual_registries_packages_maven_cache_remote_entries_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_maven_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
size integerNOT NULL
file_store smallintNOT NULL1
status smallintNOT NULL0
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
file textNOT NULLCHECK char_length(file) <= 1024

Indexes

  • (group_id, iid, downloaded_at) WHERE status = 0 index_c23ed308be
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages__relative_path_object_storage_idx15
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx15
  • (upstream_id, status) virtual_registries_packages_maven_cach_upstream_id_status_idx15
  • (relative_path) virtual_registries_packages_maven_cache_rem_relative_path_idx15

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024; char_length(file) <= 1024; char_length(upstream_etag) <= 255; char_length(object_storage_key) <= 1024; char_length(content_type) <= 255; octet_length(file_sha1) = 20; file_md5 IS NULL OR octet_length(file_md5) = 16

virtual_registries_packages_npm_cache_local_entries

7 cols · no RLS · line 11642View in 3D
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULLnamespaces.id 1:N · CASCADE
upstream_id bigintNOT NULLvirtual_registries_packages_npm_upstreams.id 1:N · CASCADE
package_file_id bigintNOT NULLpackages_package_files.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) i_uniq_v_pkg_npm_cache_loc_entrs_on_upstr_id_group_id_rel_path
  • (package_file_id) idx_vreg_pkgs_npm_cache_local_entries_on_package_file_id

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_00

7 cols · no RLS · line 11654View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages_n_upstream_id_group_id_relative_idx
  • (package_file_id) virtual_registries_packages_npm_cache_local_package_file_id_idx

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_01

7 cols · no RLS · line 11665View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages_n_upstream_id_group_id_relativ_idx1
  • (package_file_id) virtual_registries_packages_npm_cache_loca_package_file_id_idx1

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_02

7 cols · no RLS · line 11676View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages_n_upstream_id_group_id_relativ_idx2
  • (package_file_id) virtual_registries_packages_npm_cache_loca_package_file_id_idx2

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_03

7 cols · no RLS · line 11687View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages_n_upstream_id_group_id_relativ_idx3
  • (package_file_id) virtual_registries_packages_npm_cache_loca_package_file_id_idx3

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_04

7 cols · no RLS · line 11698View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages_n_upstream_id_group_id_relativ_idx4
  • (package_file_id) virtual_registries_packages_npm_cache_loca_package_file_id_idx4

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_05

7 cols · no RLS · line 11709View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages_n_upstream_id_group_id_relativ_idx5
  • (package_file_id) virtual_registries_packages_npm_cache_loca_package_file_id_idx5

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_06

7 cols · no RLS · line 11720View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages_n_upstream_id_group_id_relativ_idx6
  • (package_file_id) virtual_registries_packages_npm_cache_loca_package_file_id_idx6

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_07

7 cols · no RLS · line 11731View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages_n_upstream_id_group_id_relativ_idx7
  • (package_file_id) virtual_registries_packages_npm_cache_loca_package_file_id_idx7

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_08

7 cols · no RLS · line 11742View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages_n_upstream_id_group_id_relativ_idx8
  • (package_file_id) virtual_registries_packages_npm_cache_loca_package_file_id_idx8

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_09

7 cols · no RLS · line 11753View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages_n_upstream_id_group_id_relativ_idx9
  • (package_file_id) virtual_registries_packages_npm_cache_loca_package_file_id_idx9

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_10

7 cols · no RLS · line 11764View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx16
  • (package_file_id) virtual_registries_packages_npm_cache_loc_package_file_id_idx10

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_11

7 cols · no RLS · line 11775View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx17
  • (package_file_id) virtual_registries_packages_npm_cache_loc_package_file_id_idx11

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_12

7 cols · no RLS · line 11786View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx18
  • (package_file_id) virtual_registries_packages_npm_cache_loc_package_file_id_idx12

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_13

7 cols · no RLS · line 11797View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx19
  • (package_file_id) virtual_registries_packages_npm_cache_loc_package_file_id_idx13

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_14

7 cols · no RLS · line 11808View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx20
  • (package_file_id) virtual_registries_packages_npm_cache_loc_package_file_id_idx14

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_local_entries_15

7 cols · no RLS · line 11819View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_local_entries_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_local_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
package_file_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) virtual_registries_packages__upstream_id_group_id_relativ_idx21
  • (package_file_id) virtual_registries_packages_npm_cache_loc_package_file_id_idx15

Referenced by

  • nothing

Table checks: char_length(relative_path) <= 1024

virtual_registries_packages_npm_cache_remote_entries

18 cols · no RLS · line 11837View in 3D
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULLnamespaces.id 1:N
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) i_uniq_v_pkgs_npm_cache_rem_entrs_on_rel_path_obj_key_group_id
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 i_uniq_v_pkg_npm_cache_rem_entrs_on_upstr_id_group_id_rel_path
  • (upstream_id, status) i_vreg_pkgs_npm_cache_remote_entries_upstream_id_and_status
  • (relative_path) i_vreg_pkgs_npm_cache_remote_entries_on_relative_path_trigram

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_00

18 cols · no RLS · line 11866View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_00 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx22
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_n_relative_path_object_storage__idx
  • (upstream_id, status) virtual_registries_packages_npm_cache_re_upstream_id_status_idx
  • (relative_path) virtual_registries_packages_npm_cache_remote__relative_path_idx

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_01

18 cols · no RLS · line 11894View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_01 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx23
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_n_relative_path_object_storage_idx1
  • (upstream_id, status) virtual_registries_packages_npm_cache_r_upstream_id_status_idx1
  • (relative_path) virtual_registries_packages_npm_cache_remote_relative_path_idx1

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_02

18 cols · no RLS · line 11922View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_02 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx24
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_n_relative_path_object_storage_idx2
  • (upstream_id, status) virtual_registries_packages_npm_cache_r_upstream_id_status_idx2
  • (relative_path) virtual_registries_packages_npm_cache_remote_relative_path_idx2

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_03

18 cols · no RLS · line 11950View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_03 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx25
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_n_relative_path_object_storage_idx3
  • (upstream_id, status) virtual_registries_packages_npm_cache_r_upstream_id_status_idx3
  • (relative_path) virtual_registries_packages_npm_cache_remote_relative_path_idx3

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_04

18 cols · no RLS · line 11978View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_04 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx26
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_n_relative_path_object_storage_idx4
  • (upstream_id, status) virtual_registries_packages_npm_cache_r_upstream_id_status_idx4
  • (relative_path) virtual_registries_packages_npm_cache_remote_relative_path_idx4

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_05

18 cols · no RLS · line 12006View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_05 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx27
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_n_relative_path_object_storage_idx5
  • (upstream_id, status) virtual_registries_packages_npm_cache_r_upstream_id_status_idx5
  • (relative_path) virtual_registries_packages_npm_cache_remote_relative_path_idx5

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_06

18 cols · no RLS · line 12034View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_06 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx28
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_n_relative_path_object_storage_idx6
  • (upstream_id, status) virtual_registries_packages_npm_cache_r_upstream_id_status_idx6
  • (relative_path) virtual_registries_packages_npm_cache_remote_relative_path_idx6

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_07

18 cols · no RLS · line 12062View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_07 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx29
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_n_relative_path_object_storage_idx7
  • (upstream_id, status) virtual_registries_packages_npm_cache_r_upstream_id_status_idx7
  • (relative_path) virtual_registries_packages_npm_cache_remote_relative_path_idx7

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_08

18 cols · no RLS · line 12090View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_08 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx30
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_n_relative_path_object_storage_idx8
  • (upstream_id, status) virtual_registries_packages_npm_cache_r_upstream_id_status_idx8
  • (relative_path) virtual_registries_packages_npm_cache_remote_relative_path_idx8

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_09

18 cols · no RLS · line 12118View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_09 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx31
  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages_n_relative_path_object_storage_idx9
  • (upstream_id, status) virtual_registries_packages_npm_cache_r_upstream_id_status_idx9
  • (relative_path) virtual_registries_packages_npm_cache_remote_relative_path_idx9

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_10

18 cols · no RLS · line 12146View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_10 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages__relative_path_object_storage_idx16
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx32
  • (upstream_id, status) virtual_registries_packages_npm_cache__upstream_id_status_idx10
  • (relative_path) virtual_registries_packages_npm_cache_remot_relative_path_idx10

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_11

18 cols · no RLS · line 12174View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_11 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages__relative_path_object_storage_idx17
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx33
  • (upstream_id, status) virtual_registries_packages_npm_cache__upstream_id_status_idx11
  • (relative_path) virtual_registries_packages_npm_cache_remot_relative_path_idx11

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_12

18 cols · no RLS · line 12202View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_12 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages__relative_path_object_storage_idx18
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx34
  • (upstream_id, status) virtual_registries_packages_npm_cache__upstream_id_status_idx12
  • (relative_path) virtual_registries_packages_npm_cache_remot_relative_path_idx12

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_13

18 cols · no RLS · line 12230View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_13 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages__relative_path_object_storage_idx19
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx35
  • (upstream_id, status) virtual_registries_packages_npm_cache__upstream_id_status_idx13
  • (relative_path) virtual_registries_packages_npm_cache_remot_relative_path_idx13

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_14

18 cols · no RLS · line 12258View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_14 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages__relative_path_object_storage_idx20
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx36
  • (upstream_id, status) virtual_registries_packages_npm_cache__upstream_id_status_idx14
  • (relative_path) virtual_registries_packages_npm_cache_remot_relative_path_idx14

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_packages_npm_cache_remote_entries_15

18 cols · no RLS · line 12286View in 3D
  • Isolated tablevirtual_registries_packages_npm_cache_remote_entries_15 references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
iid PKbigintNOT NULLnextval(CAST('virtual_registries_packages_npm_cache_remote_entries_iid_seq' AS regclass))
group_id PKbigintNOT NULL
upstream_id bigintNOT NULL
downloads_count bigintNOT NULL0
upstream_checked_at timestamptzNOT NULLnow()
downloaded_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integerNOT NULL1
size integerNOT NULL
status smallintNOT NULL0
file_md5 byteanullCHECK file_md5 IS NULL OR octet_length(file_md5) = 16
file_sha1 byteaNOT NULLCHECK octet_length(file_sha1) = 20
upstream_etag textnullCHECK char_length(upstream_etag) <= 255
content_type textNOT NULLCAST('application/octet-stream' AS text)CHECK char_length(content_type) <= 255
relative_path textNOT NULLCHECK char_length(relative_path) <= 1024
file textNOT NULLCHECK char_length(file) <= 1024
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 1024

Indexes

  • UNIQUE (relative_path, object_storage_key, group_id) virtual_registries_packages__relative_path_object_storage_idx21
  • UNIQUE (upstream_id, group_id, relative_path) WHERE status = 0 virtual_registries_packages__upstream_id_group_id_relativ_idx37
  • (upstream_id, status) virtual_registries_packages_npm_cache__upstream_id_status_idx15
  • (relative_path) virtual_registries_packages_npm_cache_remot_relative_path_idx15

Referenced by

  • nothing

Table checks: char_length(upstream_etag) <= 255; char_length(relative_path) <= 1024; char_length(content_type) <= 255; char_length(object_storage_key) <= 1024; char_length(file) <= 1024; file_md5 IS NULL OR octet_length(file_md5) = 16; octet_length(file_sha1) = 20

virtual_registries_cleanup_policies

16 cols · no RLS · line 33143View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:1 · CASCADE
next_run_at timestamptznull
last_run_at timestamptznull
last_run_deleted_size bigintnull0CHECK last_run_deleted_size >= 0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
keep_n_days_after_download integerNOT NULL30CHECK keep_n_days_after_download > 0
last_run_deleted_entries_count integernull0CHECK last_run_deleted_entries_count >= 0
status smallintNOT NULL0
cadence smallintNOT NULL7CHECK cadence = ANY(ARRAY[1, 7, 14, 30, 90])
enabled booleanNOT NULLFALSE
notify_on_success booleanNOT NULLFALSE
notify_on_failure booleanNOT NULLFALSE
failure_message textnullCHECK char_length(failure_message) <= 255
last_run_detailed_metrics jsonbnullCAST('{}' AS jsonb)

Indexes

  • (next_run_at) WHERE enabled = TRUE AND status = ANY(ARRAY[0, 2]) idx_vr_cleanup_policies_on_next_run_at_when_runnable
  • UNIQUE (group_id) index_virtual_registries_cleanup_policies_on_group_id

Referenced by

  • nothing

Table checks: char_length(failure_message) <= 255; last_run_deleted_size >= 0; cadence = ANY(ARRAY[1, 7, 14, 30, 90]); keep_n_days_after_download > 0; last_run_deleted_entries_count >= 0

virtual_registries_container_registries

6 cols · no RLS · line 33176View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 1024

Indexes

  • UNIQUE (group_id, name) virtual_registries_container_registries_on_unique_group_ids

Referenced by

Table checks: char_length(description) <= 1024; char_length(name) <= 255

virtual_registries_container_registry_upstreams

7 cols · no RLS · line 33196View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
registry_id bigintNOT NULLvirtual_registries_container_registries.id 1:N · CASCADE
upstream_id bigintNOT NULLvirtual_registries_container_upstreams.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
position smallintNOT NULL1CHECK 1 <= position AND position <= 5

Indexes

  • (group_id) idx_vreg_container_reg_upst_on_group
  • UNIQUE (upstream_id, registry_id) virtual_reg_cont_reg_upstreams_on_upstream_and_registry_ids

Referenced by

  • nothing

Table checks: 1 <= position AND position <= 5

virtual_registries_container_upstreams

11 cols · no RLS · line 33216View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
cache_validity_hours smallintNOT NULL24CHECK cache_validity_hours >= 0
username jsonbnull
password jsonbnull
url textNOT NULLCHECK char_length(url) <= 255
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 1024
auth_url textnullCHECK char_length(auth_url) <= 512

Indexes

  • (group_id) virtual_registries_container_upstreams_on_group_id

Referenced by

Table checks: char_length(description) <= 1024; cache_validity_hours >= 0; char_length(name) <= 255; num_nonnulls(username, password) = 2 OR num_nulls(username, password) = 2; char_length(auth_url) <= 512; char_length(url) <= 255

virtual_registries_packages_maven_cache_remote_entry_states

10 cols · no RLS · line 33245View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
virtual_registries_packages_maven_cache_remote_entry_iid bigintNOT NULLvirtual_registries_packages_maven_cache_remote_entries.group_id 1:N · CASCADE
group_id bigintNOT NULLnamespaces.id 1:N
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_vreg_mvn_cache_remote_entry_states_failed_verification
  • (virtual_registries_packages_maven_cache_remote_entry_iid) WHERE verification_state = 0 OR verification_state = 3 idx_vreg_mvn_cache_remote_entry_states_needs_verification
  • UNIQUE (virtual_registries_packages_maven_cache_remote_entry_iid) idx_vreg_mvn_cache_remote_entry_states_on_entry_iid
  • (group_id, virtual_registries_packages_maven_cache_remote_entry_iid) idx_vreg_mvn_cache_remote_entry_states_on_group_id_and_iid
  • (virtual_registries_packages_maven_cache_remote_entry_iid, verification_started_at) WHERE verification_state = 1 idx_vreg_mvn_cache_remote_entry_states_on_verification_started
  • (verification_state) idx_vreg_mvn_cache_remote_entry_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_vreg_mvn_cache_remote_entry_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

virtual_registries_packages_maven_local_upstreams

10 cols · no RLS · line 33268View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
local_group_id bigintnull
local_project_id bigintnull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
metadata_cache_validity_hours smallintNOT NULL1CHECK metadata_cache_validity_hours > 0
cache_validity_hours smallintNOT NULL24CHECK cache_validity_hours >= 0
name textNOT NULLCAST('' AS text)CHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 1024

Indexes

  • UNIQUE (local_group_id, group_id) WHERE local_group_id IS NOT NULL idx_uniq_vreg_pkgs_mvn_local_upstr_on_loc_group_id_group_id
  • UNIQUE (local_project_id, group_id) WHERE local_project_id IS NOT NULL idx_uniq_vreg_pkgs_mvn_local_upstr_on_loc_proj_id_group_id
  • (name) idx_vreg_pkgs_mvn_local_upstreams_on_name_trigram
  • (group_id) index_virtual_reg_pkgs_maven_local_upstreams_on_group_id

Referenced by

Table checks: metadata_cache_validity_hours > 0; char_length(description) <= 1024; char_length(name) <= 255; num_nonnulls(local_group_id, local_project_id) = 1; cache_validity_hours >= 0

virtual_registries_packages_maven_registries

6 cols · no RLS · line 33295View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCAST('' AS text)CHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 1024

Indexes

  • UNIQUE (group_id, name) virtual_reg_pkgs_mvn_registries_on_unique_group_id_and_name

Referenced by

Table checks: char_length(name) <= 255; char_length(description) <= 1024

virtual_registries_packages_maven_registry_upstreams

8 cols · no RLS · line 33315View in 3D
  • Nullable foreign key upstream_idvirtual_registries_packages_maven_registry_upstreams.upstream_id may be NULL, so the relationship to virtual_registries_packages_maven_upstreams is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key local_upstream_idvirtual_registries_packages_maven_registry_upstreams.local_upstream_id may be NULL, so the relationship to virtual_registries_packages_maven_local_upstreams is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
registry_id bigintNOT NULLvirtual_registries_packages_maven_registries.id 1:N · CASCADE
upstream_id bigintnullvirtual_registries_packages_maven_upstreams.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
position smallintNOT NULL1CHECK 1 <= position AND position <= 20
local_upstream_id bigintnullvirtual_registries_packages_maven_local_upstreams.id 1:N · CASCADE

Indexes

  • UNIQUE (local_upstream_id, registry_id) WHERE local_upstream_id IS NOT NULL idx_mvn_reg_upstreams_on_local_upstream_and_registry_ids
  • UNIQUE (upstream_id, registry_id) WHERE upstream_id IS NOT NULL idx_mvn_reg_upstreams_on_upstream_and_registry_ids
  • (group_id) index_virtual_reg_pkgs_maven_reg_upstreams_on_group_id

Referenced by

  • nothing

Table checks: num_nonnulls(upstream_id, local_upstream_id) = 1; 1 <= position AND position <= 20

virtual_registries_packages_maven_upstream_rules

9 cols · no RLS · line 33337View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
remote_upstream_id bigintNOT NULLvirtual_registries_packages_maven_upstreams.id 1:N · CASCADE
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
pattern_type smallintNOT NULL0
rule_type smallintNOT NULL0
target_coordinate smallintNOT NULL0
pattern textNOT NULLCHECK char_length(pattern) <= 255

Indexes

  • (group_id) index_maven_upstream_rules_on_group_id
  • UNIQUE (remote_upstream_id, target_coordinate, pattern, pattern_type, rule_type) unique_idx_mvn_upstream_rules_on_remote_upstream_target_pattern

Referenced by

  • nothing

Table checks: char_length(pattern) <= 255

virtual_registries_packages_maven_upstreams

11 cols · no RLS · line 33359View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
url textNOT NULLCHECK char_length(url) <= 255
cache_validity_hours smallintNOT NULL24CHECK cache_validity_hours >= 0
username jsonbnull
password jsonbnull
name textNOT NULLCAST('' AS text)CHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 1024
metadata_cache_validity_hours smallintNOT NULL24CHECK metadata_cache_validity_hours > 0

Indexes

  • (group_id) index_virtual_reg_pkgs_maven_upstreams_on_group_id
  • (url) index_virtual_registries_packages_maven_upstreams_on_url
  • (name) virtual_registries_packages_maven_upstreams_on_name_trigram

Referenced by

Table checks: char_length(url) <= 255; num_nonnulls(username, password) = 2 OR num_nulls(username, password) = 2; metadata_cache_validity_hours > 0; cache_validity_hours >= 0; char_length(description) <= 1024; char_length(name) <= 255

virtual_registries_packages_npm_registries

6 cols · no RLS · line 33388View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 1024

Indexes

  • UNIQUE (group_id, name) virtual_reg_pkgs_npm_registries_on_unique_group_id_and_name

Referenced by

Table checks: char_length(name) <= 255; char_length(description) <= 1024

virtual_registries_packages_npm_registry_upstreams

7 cols · no RLS · line 33408View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
registry_id bigintNOT NULLvirtual_registries_packages_npm_registries.id 1:N · CASCADE
upstream_id bigintNOT NULLvirtual_registries_packages_npm_upstreams.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
position smallintNOT NULL1CHECK 1 <= position AND position <= 20

Indexes

  • (group_id) index_virtual_reg_pkgs_npm_reg_upstreams_on_group_id
  • UNIQUE (upstream_id, registry_id) v_reg_pkgs_npm_regs_upstreams_on_upstream_and_registry_ids

Referenced by

  • nothing

Table checks: 1 <= position AND position <= 20

virtual_registries_packages_npm_upstreams

12 cols · no RLS · line 33428View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
cache_validity_hours smallintNOT NULL24CHECK cache_validity_hours >= 0
metadata_cache_validity_hours smallintNOT NULL24CHECK metadata_cache_validity_hours > 0
username jsonbnull
password jsonbnull
url textNOT NULLCHECK char_length(url) <= 255
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 1024
auth_token jsonbnull

Indexes

  • (group_id) index_virtual_reg_pkgs_npm_upstreams_on_group_id

Referenced by

Table checks: char_length(name) <= 255; char_length(description) <= 1024; cache_validity_hours >= 0; char_length(url) <= 255; metadata_cache_validity_hours > 0

virtual_registries_settings

5 cols · no RLS · line 33457View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
enabled booleanNOT NULLTRUE

Indexes

  • UNIQUE (group_id) index_virtual_registries_settings_on_group_id

Referenced by

  • nothing

abuse 6 tables

Tables whose names start with abuse_.

Entity-relationship diagram: abuse_events, abuse_report_events, abuse_report_upload_states, abuse_report_uploads, abuse_report_user_mentions, abuse_reportsabuse_eventsid PKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptzabuse_report_id FKbigintsourcesmallintcategorysmallintmetadatajsonborganization_id FKbigintabuse_report_eventsid PKbigintabuse_report_id FKbigintuser_id FKbigintcreated_attimestamptzactionsmallintreasonsmallintcommenttextorganization_id FKbigintabuse_report_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzabuse_report_upload_id FKbigintorganization_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextabuse_report_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextabuse_report_user_mentionsid PKbigintabuse_report_id FKbigintnote_id FKbigintmentioned_users_idsbigint[]mentioned_projects_idsbigint[]mentioned_groups_idsbigint[]organization_id FKbigintabuse_reportsid PKbigintreporter_id FKbigintuser_idbigintmessagetextcreated_attimestampupdated_attimestampmessage_htmltextcached_markdown_versionintegercategorysmallintreported_from_urltextlinks_to_spamtext[]statussmallintresolved_attimestamptzscreenshottextresolved_by_id FKbigintassignee_id FKbigintmitigation_stepstextevidencejsonbassignee_id_convert_to_bigintbigintid_convert_to_bigintbigintreporter_id_convert_to_bigintbigintresolved_by_id_convert_to_bigintbigintuser_id_convert_to_bigintbigintorganization_id FKbigintnotesorganizationsusersorganization_idabuse_report_upload_idassignee_idreporter_idresolved_by_idorganization_idorganization_iduser_idabuse_report_iduser_idorganization_idabuse_report_idabuse_report_idnote_idorganization_id

Relationships

abuse_events

9 cols · no RLS · line 12314View in 3D
  • Nullable foreign key organization_idabuse_events.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idabuse_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key abuse_report_idabuse_events.abuse_report_id may be NULL, so the relationship to abuse_reports is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK organization_id, user_id, abuse_report_idabuse_events has several nullable FKs (organization_id, user_id, abuse_report_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintnullusers.id 1:N · SET NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
abuse_report_id bigintnullabuse_reports.id 1:N
source smallintNOT NULL
category smallintnull
metadata jsonbnull
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • (abuse_report_id) index_abuse_events_on_abuse_report_id
  • (category, source) index_abuse_events_on_category_and_source
  • (organization_id) index_abuse_events_on_organization_id
  • (user_id) index_abuse_events_on_user_id

Referenced by

  • nothing

Table checks: organization_id IS NOT NULL

abuse_report_events

8 cols · no RLS · line 12336View in 3D
  • Nullable foreign key user_idabuse_report_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idabuse_report_events.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK user_id, organization_idabuse_report_events has several nullable FKs (user_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
abuse_report_id bigintNOT NULLabuse_reports.id 1:N · CASCADE
user_id bigintnullusers.id 1:N · SET NULL
created_at timestamptzNOT NULL
action smallintNOT NULL1
reason smallintnull
comment textnullCHECK char_length(comment) <= 1024
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • (abuse_report_id) index_abuse_report_events_on_abuse_report_id
  • (organization_id) index_abuse_report_events_on_organization_id
  • (user_id) index_abuse_report_events_on_user_id

Referenced by

  • nothing

Table checks: char_length(comment) <= 1024; organization_id IS NOT NULL

abuse_report_upload_states

10 cols · no RLS · line 12358View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
abuse_report_upload_id bigintNOT NULLabuse_report_uploads.id 1:1 · CASCADE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_abuse_report_upload_states_failed_verification
  • (abuse_report_upload_id) WHERE verification_state = 0 OR verification_state = 3 index_abuse_report_upload_states_needs_verification_id
  • UNIQUE (abuse_report_upload_id) index_abuse_report_upload_states_on_abuse_report_upload_id
  • (organization_id) index_abuse_report_upload_states_on_organization_id
  • (abuse_report_upload_id, verification_started_at) WHERE verification_state = 1 index_abuse_report_upload_states_on_verification_started
  • (verification_state) index_abuse_report_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_abuse_report_upload_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

abuse_report_uploads

16 cols · no RLS · line 12412View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnullCHECK organization_id IS NOT NULL
namespace_id bigintnull
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • (checksum) abuse_report_uploads_checksum_idx
  • (model_id, model_type, uploader, created_at) abuse_report_uploads_model_id_model_type_uploader_created_a_idx
  • (namespace_id) abuse_report_uploads_namespace_id_idx
  • (organization_id) abuse_report_uploads_organization_id_idx
  • (project_id) abuse_report_uploads_project_id_idx
  • (store) abuse_report_uploads_store_idx
  • (uploaded_by_user_id) abuse_report_uploads_uploaded_by_user_id_idx
  • (uploader, path) abuse_report_uploads_uploader_path_idx
  • UNIQUE (id) index_abuse_report_uploads_on_id

Referenced by

Table checks: char_length(path) <= 511; organization_id IS NOT NULL; char_length(checksum) <= 64

abuse_report_user_mentions

7 cols · no RLS · line 12434View in 3D
  • Nullable foreign key organization_idabuse_report_user_mentions.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
abuse_report_id bigintNOT NULLabuse_reports.id 1:N · CASCADE
note_id bigintNOT NULLnotes.id 1:N · CASCADE
mentioned_users_ids bigint[]null
mentioned_projects_ids bigint[]null
mentioned_groups_ids bigint[]null
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • UNIQUE (abuse_report_id, note_id) index_abuse_report_user_mentions_on_abuse_report_id_and_note_id
  • (note_id) index_abuse_report_user_mentions_on_note_id
  • (organization_id) index_abuse_report_user_mentions_on_organization_id

Referenced by

  • nothing

Table checks: organization_id IS NOT NULL

abuse_reports

24 cols · no RLS · line 12454View in 3D
  • Nullable foreign key assignee_idabuse_reports.assignee_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key reporter_idabuse_reports.reporter_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key resolved_by_idabuse_reports.resolved_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idabuse_reports.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK assignee_id, reporter_id, resolved_by_id, organization_idabuse_reports has several nullable FKs (assignee_id, reporter_id, resolved_by_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
reporter_id bigintnullusers.id 1:N · CASCADECHECK reporter_id IS NOT NULL
user_id bigintnull
message textnullCHECK char_length(message) <= 2048
created_at timestampnull
updated_at timestampnull
message_html textnull
cached_markdown_version integernull
category smallintNOT NULL1
reported_from_url textNOT NULLCAST('' AS text)CHECK char_length(reported_from_url) <= 512
links_to_spam text[]NOT NULLCAST('{}' AS text[])CHECK cardinality(links_to_spam) <= 20
status smallintNOT NULL1
resolved_at timestamptznull
screenshot textnullCHECK char_length(screenshot) <= 255
resolved_by_id bigintnullusers.id 1:N · SET NULL
assignee_id bigintnullusers.id 1:N · SET NULL
mitigation_steps textnullCHECK char_length(mitigation_steps) <= 1000
evidence jsonbnull
assignee_id_convert_to_bigint bigintnull
id_convert_to_bigint bigintNOT NULL0
reporter_id_convert_to_bigint bigintnull
resolved_by_id_convert_to_bigint bigintnull
user_id_convert_to_bigint bigintnull
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • (user_id, status, category) idx_abuse_reports_user_id_status_and_category
  • (assignee_id) index_abuse_reports_on_assignee_id
  • (organization_id) index_abuse_reports_on_organization_id
  • (reporter_id) index_abuse_reports_on_reporter_id
  • (resolved_by_id) index_abuse_reports_on_resolved_by_id
  • (status, created_at) index_abuse_reports_on_status_and_created_at
  • (status, id) index_abuse_reports_on_status_and_id
  • (status, updated_at) index_abuse_reports_on_status_and_updated_at
  • (status, category, id) index_abuse_reports_on_status_category_and_id
  • (status, reporter_id, id) index_abuse_reports_on_status_reporter_id_and_id

Referenced by

Table checks: cardinality(links_to_spam) <= 20; organization_id IS NOT NULL; char_length(screenshot) <= 255; char_length(reported_from_url) <= 512; char_length(mitigation_steps) <= 1000; reporter_id IS NOT NULL; char_length(message) <= 2048

achievement 2 tables

Tables whose names start with achievement_.

Entity-relationship diagram: achievement_upload_states, achievement_uploadsachievement_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzachievement_upload_id FKbigintnamespace_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextachievement_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextnamespacesnamespace_idachievement_upload_id

Relationships

achievement_upload_states

10 cols · no RLS · line 12496View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
achievement_upload_id bigintNOT NULLachievement_uploads.id 1:1 · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_achievement_upload_states_failed_verification
  • (achievement_upload_id) WHERE verification_state = 0 OR verification_state = 3 index_achievement_upload_states_needs_verification_id
  • UNIQUE (achievement_upload_id) index_achievement_upload_states_on_achievement_upload_id
  • (namespace_id) index_achievement_upload_states_on_namespace_id
  • (achievement_upload_id, verification_started_at) WHERE verification_state = 1 index_achievement_upload_states_on_verification_started
  • (verification_state) index_achievement_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_achievement_upload_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

achievement_uploads

16 cols · no RLS · line 12519View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnull
namespace_id bigintnullCHECK namespace_id IS NOT NULL
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • (checksum) achievement_uploads_checksum_idx
  • (model_id, model_type, uploader, created_at) achievement_uploads_model_id_model_type_uploader_created_at_idx
  • (namespace_id) achievement_uploads_namespace_id_idx
  • (organization_id) achievement_uploads_organization_id_idx
  • (project_id) achievement_uploads_project_id_idx
  • (store) achievement_uploads_store_idx
  • (uploaded_by_user_id) achievement_uploads_uploaded_by_user_id_idx
  • (uploader, path) achievement_uploads_uploader_path_idx
  • UNIQUE (id) index_achievement_uploads_on_id

Referenced by

Table checks: char_length(path) <= 511; namespace_id IS NOT NULL; char_length(checksum) <= 64

agent 6 tables

Tables whose names start with agent_.

Entity-relationship diagram: agent_activity_events, agent_group_authorizations, agent_organization_authorizations, agent_project_authorizations, agent_user_access_group_authorizations, agent_user_access_project_authorizationsagent_activity_eventsid PKbigintagent_id FKbigintuser_id FKbigintproject_id FKbigintmerge_request_id FKbigintagent_token_id FKbigintrecorded_attimestamptzkindsmallintlevelsmallintdetailtextagent_project_id FKbigintagent_group_authorizationsid PKbigintgroup_id FKbigintagent_id FKbigintconfigjsonbagent_organization_authorizationsid PKbigintorganization_id FKbigintagent_id FKbigintconfigjsonbagent_project_authorizationsid PKbigintproject_id FKbigintagent_id FKbigintconfigjsonbagent_user_access_group_authorizationsid PKbigintgroup_id FKbigintagent_id FKbigintconfigjsonbagent_user_access_project_authorizationsid PKbigintproject_id FKbigintagent_id FKbigintconfigjsonbcluster_agent_tokenscluster_agentsmerge_requestsnamespacesorganizationsprojectsusersproject_idmerge_request_idagent_project_idagent_idagent_token_iduser_idgroup_idagent_idorganization_idagent_idproject_idagent_idgroup_idagent_idagent_idproject_id

Relationships

agent_activity_events

11 cols · no RLS · line 12627View in 3D
  • Nullable foreign key project_idagent_activity_events.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key merge_request_idagent_activity_events.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key agent_project_idagent_activity_events.agent_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key agent_token_idagent_activity_events.agent_token_id may be NULL, so the relationship to cluster_agent_tokens is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idagent_activity_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, merge_request_id, agent_project_id, agent_token_id, user_idagent_activity_events has several nullable FKs (project_id, merge_request_id, agent_project_id, agent_token_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
agent_id bigintNOT NULLcluster_agents.id 1:N · CASCADE
user_id bigintnullusers.id 1:N · SET NULL
project_id bigintnullprojects.id 1:N · SET NULL
merge_request_id bigintnullmerge_requests.id 1:N · SET NULL
agent_token_id bigintnullcluster_agent_tokens.id 1:N · SET NULL
recorded_at timestamptzNOT NULL
kind smallintNOT NULL
level smallintNOT NULL
detail textnullCHECK char_length(detail) <= 255
agent_project_id bigintnullprojects.id 1:N · CASCADECHECK agent_project_id IS NOT NULL

Indexes

  • (agent_id, recorded_at, id) index_agent_activity_events_on_agent_id_and_recorded_at_and_id
  • (agent_project_id) index_agent_activity_events_on_agent_project_id
  • (agent_token_id) WHERE agent_token_id IS NOT NULL index_agent_activity_events_on_agent_token_id
  • (merge_request_id) WHERE merge_request_id IS NOT NULL index_agent_activity_events_on_merge_request_id
  • (project_id) WHERE project_id IS NOT NULL index_agent_activity_events_on_project_id
  • (user_id) WHERE user_id IS NOT NULL index_agent_activity_events_on_user_id

Referenced by

  • nothing

Table checks: char_length(detail) <= 255; agent_project_id IS NOT NULL

agent_group_authorizations

4 cols · no RLS · line 12652View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
agent_id bigintNOT NULLcluster_agents.id 1:N · CASCADE
config jsonbNOT NULL

Indexes

  • UNIQUE (agent_id, group_id) index_agent_group_authorizations_on_agent_id_and_group_id
  • (group_id) index_agent_group_authorizations_on_group_id

Referenced by

  • nothing

agent_organization_authorizations

4 cols · no RLS · line 12668View in 3D
  • Junction table allows duplicate links agent_id, organization_idagent_organization_authorizations looks like a many-to-many link table but has no unique constraint across (agent_id, organization_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
agent_id bigintNOT NULLcluster_agents.id 1:1 · CASCADE
config jsonbNOT NULL

Indexes

  • UNIQUE (agent_id) index_agent_organization_authorizations_on_agent_id
  • (organization_id) index_agent_organization_authorizations_on_organization_id

Referenced by

  • nothing

agent_project_authorizations

4 cols · no RLS · line 12684View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
agent_id bigintNOT NULLcluster_agents.id 1:N · CASCADE
config jsonbNOT NULL

Indexes

  • UNIQUE (agent_id, project_id) index_agent_project_authorizations_on_agent_id_and_project_id
  • (project_id) index_agent_project_authorizations_on_project_id

Referenced by

  • nothing

agent_user_access_group_authorizations

4 cols · no RLS · line 12700View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
agent_id bigintNOT NULLcluster_agents.id 1:N · CASCADE
config jsonbNOT NULL

Indexes

  • UNIQUE (agent_id, group_id) index_agent_user_access_on_agent_id_and_group_id
  • (group_id) index_agent_user_access_on_group_id

Referenced by

  • nothing

agent_user_access_project_authorizations

4 cols · no RLS · line 12716View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
agent_id bigintNOT NULLcluster_agents.id 1:N · CASCADE
config jsonbNOT NULL

Indexes

  • UNIQUE (agent_id, project_id) index_agent_user_access_on_agent_id_and_project_id
  • (project_id) index_agent_user_access_on_project_id

Referenced by

  • nothing

alert 7 tables

Tables whose names start with alert_.

Entity-relationship diagram: alert_management_alert_assignees, alert_management_alert_metric_image_uploads, alert_management_alert_metric_images, alert_management_alert_user_mentions, alert_management_alerts, alert_management_http_integrations, alert_management_metric_image_upload_statesalert_management_alert_assigneesid PKbigintuser_id FKbigintalert_id FKbigintproject_id FKbigintalert_management_alert_metric_image_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextalert_management_alert_metric_imagesid PKbigintalert_id FKbigintcreated_attimestamptzupdated_attimestamptzfile_storesmallintfiletexturltexturl_texttextproject_id FKbigintalert_management_alert_user_mentionsid PKbigintalert_management_alert_id FKbigintnote_id FKbigintmentioned_users_idsbigint[]mentioned_projects_idsbigint[]mentioned_groups_idsbigint[]project_id FKbigintalert_management_alertsid PKbigintcreated_attimestamptzupdated_attimestamptzstarted_attimestamptzended_attimestamptzeventsintegeriidintegerseveritysmallintstatussmallintfingerprintbyteaissue_id FKbigintproject_id FKbiginttitletextdescriptiontextservicetextmonitoring_tooltexthoststext[]payloadjsonbenvironment_id FKbigintdomainsmallintalert_management_http_integrationsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintactivebooleanencrypted_tokentextencrypted_token_ivtextendpoint_identifiertextnametextpayload_examplejsonbpayload_attribute_mappingjsonbtype_identifiersmallintalert_management_metric_image_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzalert_management_metric_image_upload_id FKbigintproject_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextenvironmentsissuesnotesprojectsusersissue_idproject_idenvironment_idproject_idproject_idalert_management_metric_image_upload_idproject_idalert_iduser_idproject_idalert_idproject_idalert_management_alert_idnote_id

Relationships

alert_management_alert_assignees

4 cols · no RLS · line 13404View in 3D
  • Nullable foreign key project_idalert_management_alert_assignees.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
alert_id bigintNOT NULLalert_management_alerts.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (alert_id) index_alert_assignees_on_alert_id
  • UNIQUE (user_id, alert_id) index_alert_assignees_on_user_id_and_alert_id
  • (project_id) index_alert_management_alert_assignees_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

alert_management_alert_metric_image_uploads

16 cols · no RLS · line 13421View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnull
namespace_id bigintnull
project_id bigintnullCHECK project_id IS NOT NULL
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • (uploaded_by_user_id) alert_management_alert_metric_image_upl_uploaded_by_user_id_idx
  • (checksum) alert_management_alert_metric_image_uploads_checksum_idx
  • (namespace_id) alert_management_alert_metric_image_uploads_namespace_id_idx
  • (organization_id) alert_management_alert_metric_image_uploads_organization_id_idx
  • (project_id) alert_management_alert_metric_image_uploads_project_id_idx
  • (store) alert_management_alert_metric_image_uploads_store_idx
  • (uploader, path) alert_management_alert_metric_image_uploads_uploader_path_idx
  • (model_id, model_type, uploader, created_at) alert_management_alert_metric_model_id_model_type_uploader__idx
  • UNIQUE (id) idx_alert_management_alert_metric_image_uploads_on_id

Referenced by

Table checks: char_length(path) <= 511; project_id IS NOT NULL; char_length(checksum) <= 64

alert_management_alert_metric_images

9 cols · no RLS · line 13443View in 3D
  • Nullable foreign key project_idalert_management_alert_metric_images.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
alert_id bigintNOT NULLalert_management_alerts.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store smallintnull
file textNOT NULLCHECK char_length(file) <= 255
url textnullCHECK char_length(url) <= 255
url_text textnullCHECK char_length(url_text) <= 128
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (alert_id) index_alert_management_alert_metric_images_on_alert_id
  • (project_id) index_alert_management_alert_metric_images_on_project_id

Referenced by

  • nothing

Table checks: char_length(url_text) <= 128; char_length(url) <= 255; char_length(file) <= 255; project_id IS NOT NULL

alert_management_alert_user_mentions

7 cols · no RLS · line 13468View in 3D
  • Nullable foreign key project_idalert_management_alert_user_mentions.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key note_idalert_management_alert_user_mentions.note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, note_idalert_management_alert_user_mentions has several nullable FKs (project_id, note_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
alert_management_alert_id bigintNOT NULLalert_management_alerts.id 1:N · CASCADE
note_id bigintnullnotes.id 1:N · CASCADE
mentioned_users_ids bigint[]null
mentioned_projects_ids bigint[]null
mentioned_groups_ids bigint[]null
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_alert_management_alert_user_mentions_on_project_id
  • UNIQUE (alert_management_alert_id) WHERE note_id IS NULL index_alert_user_mentions_on_alert_id
  • UNIQUE (alert_management_alert_id, note_id) index_alert_user_mentions_on_alert_id_and_note_id
  • UNIQUE (note_id) WHERE note_id IS NOT NULL index_alert_user_mentions_on_note_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

alert_management_alerts

20 cols · no RLS · line 13488View in 3D
  • Nullable foreign key issue_idalert_management_alerts.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key environment_idalert_management_alerts.environment_id may be NULL, so the relationship to environments is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK issue_id, environment_idalert_management_alerts has several nullable FKs (issue_id, environment_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
started_at timestamptzNOT NULL
ended_at timestamptznull
events integerNOT NULL1
iid integerNOT NULL
severity smallintNOT NULL0
status smallintNOT NULL0
fingerprint byteanull
issue_id bigintnullissues.id 1:N · SET NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
title textNOT NULLCHECK char_length(title) <= 200
description textnullCHECK char_length(description) <= 1000
service textnullCHECK char_length(service) <= 100
monitoring_tool textnullCHECK char_length(monitoring_tool) <= 100
hosts text[]NOT NULLCAST('{}' AS text[])
payload jsonbNOT NULLCAST('{}' AS jsonb)
environment_id bigintnullenvironments.id 1:N · SET NULL
domain smallintnull0

Indexes

  • (created_at, project_id) WHERE issue_id IS NOT NULL idx_alert_management_alerts_on_created_at_project_id_with_issue
  • (domain) index_alert_management_alerts_on_domain
  • (environment_id) WHERE environment_id IS NOT NULL index_alert_management_alerts_on_environment_id
  • (issue_id) index_alert_management_alerts_on_issue_id
  • UNIQUE (project_id, iid) index_alert_management_alerts_on_project_id_and_iid
  • (project_id, domain, status) index_alerts_on_project_id_domain_status
  • UNIQUE (project_id, fingerprint) WHERE fingerprint IS NOT NULL AND status <> 2 index_unresolved_alerts_on_project_id_and_fingerprint

Referenced by

Table checks: char_length(monitoring_tool) <= 100; char_length(description) <= 1000; char_length(service) <= 100; char_length(title) <= 200

alert_management_http_integrations

12 cols · no RLS · line 13524View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
active booleanNOT NULLFALSE
encrypted_token textNOT NULLCHECK char_length(encrypted_token) <= 255
encrypted_token_iv textNOT NULLCHECK char_length(encrypted_token_iv) <= 255
endpoint_identifier textNOT NULLCHECK char_length(endpoint_identifier) <= 255
name textNOT NULLCHECK char_length(name) <= 255
payload_example jsonbNOT NULLCAST('{}' AS jsonb)
payload_attribute_mapping jsonbNOT NULLCAST('{}' AS jsonb)
type_identifier smallintNOT NULL0

Indexes

  • UNIQUE (project_id, endpoint_identifier) index_http_integrations_on_project_and_endpoint

Referenced by

  • nothing

Table checks: char_length(encrypted_token_iv) <= 255; char_length(name) <= 255; char_length(endpoint_identifier) <= 255; char_length(encrypted_token) <= 255

alert_management_metric_image_upload_states

10 cols · no RLS · line 13552View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
alert_management_metric_image_upload_id bigintNOT NULLalert_management_alert_metric_image_uploads.id 1:1 · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_amm_upload_states_failed_verification
  • (alert_management_metric_image_upload_id) WHERE verification_state = 0 OR verification_state = 3 idx_amm_upload_states_needs_verification_id
  • UNIQUE (alert_management_metric_image_upload_id) idx_amm_upload_states_on_amm_upload_id
  • (project_id) idx_amm_upload_states_on_project_id
  • (verification_state) idx_amm_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_amm_upload_states_pending_verification
  • (alert_management_metric_image_upload_id, verification_started_at) WHERE verification_state = 1 idx_amm_upload_states_verification_started

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

analyzer 2 tables

Tables whose names start with analyzer_.

Entity-relationship diagram: analyzer_namespace_statuses, analyzer_project_statusesanalyzer_namespace_statusesid PKbigintcreated_attimestamptzupdated_attimestamptznamespace_idbigintanalyzer_typesmallintsuccessbigintfailurebiginttraversal_idsbigint[]stalebigintanalyzer_project_statusesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintanalyzer_typesmallintstatussmallintlast_calltimestamptztraversal_idsbigint[]build_idbigintarchivedbooleanconsecutive_absence_countinteger

Relationships

No foreign keys in this domain.

analyzer_namespace_statuses

9 cols · no RLS · line 13789View in 3D
  • Isolated tableanalyzer_namespace_statuses references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintNOT NULL
analyzer_type smallintNOT NULL
success bigintNOT NULL0
failure bigintNOT NULL0
traversal_ids bigint[]NOT NULLCAST('{}' AS bigint[])
stale bigintNOT NULL0

Indexes

  • UNIQUE (namespace_id, analyzer_type) index_analyzer_namespace_statuses_status
  • (traversal_ids) index_analyzer_namespace_statuses_traversal_ids

Referenced by

  • nothing

analyzer_project_statuses

11 cols · no RLS · line 13810View in 3D
  • Isolated tableanalyzer_project_statuses references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
analyzer_type smallintNOT NULL
status smallintNOT NULL
last_call timestamptzNOT NULL
traversal_ids bigint[]NOT NULLCAST('{}' AS bigint[])
build_id bigintnull
archived booleanNOT NULLFALSE
consecutive_absence_count integerNOT NULL0

Indexes

  • (build_id) index_analyzer_project_statuses_build_id
  • UNIQUE (project_id, analyzer_type) index_analyzer_project_statuses_status
  • (traversal_ids) index_analyzer_project_statuses_traversal_ids

Referenced by

  • nothing

appearance 2 tables

Tables whose names start with appearance_.

Entity-relationship diagram: appearance_upload_states, appearance_uploadsappearance_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzappearance_upload_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextappearance_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextappearance_upload_id

Relationships

appearance_upload_states

9 cols · no RLS · line 13833View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
appearance_upload_id bigintNOT NULLappearance_uploads.id 1:1 · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_appearance_upload_states_failed_verification
  • (appearance_upload_id) WHERE verification_state = 0 OR verification_state = 3 index_appearance_upload_states_needs_verification_id
  • UNIQUE (appearance_upload_id) index_appearance_upload_states_on_appearance_upload_id
  • (appearance_upload_id, verification_started_at) WHERE verification_state = 1 index_appearance_upload_states_on_verification_started
  • (verification_state) index_appearance_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_appearance_upload_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

appearance_uploads

16 cols · no RLS · line 13855View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnull
namespace_id bigintnull
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • (checksum) appearance_uploads_checksum_idx
  • (model_id, model_type, uploader, created_at) appearance_uploads_model_id_model_type_uploader_created_at_idx
  • (namespace_id) appearance_uploads_namespace_id_idx
  • (organization_id) appearance_uploads_organization_id_idx
  • (project_id) appearance_uploads_project_id_idx
  • (store) appearance_uploads_store_idx
  • (uploaded_by_user_id) appearance_uploads_uploaded_by_user_id_idx
  • (uploader, path) appearance_uploads_uploader_path_idx
  • UNIQUE (id) idx_appearance_uploads_on_id

Referenced by

Table checks: char_length(path) <= 511; num_nonnulls(namespace_id, organization_id, project_id) = 0; char_length(checksum) <= 64

application 2 tables

Tables whose names start with application_.

Entity-relationship diagram: application_setting_terms, application_settingsapplication_setting_termsid PKbigintcached_markdown_versionintegertermstextterms_htmltextapplication_settingsid PKbigintdefault_projects_limitintegersignup_enabledbooleangravatar_enabledbooleancreated_attimestampupdated_attimestamphome_page_urlvarchardefault_branch_protectionintegerrestricted_visibility_levelstextversion_check_enabledbooleanmax_attachment_sizeintegerdefault_project_visibilityintegerdefault_snippet_visibilityintegeruser_oauth_applicationsbooleanafter_sign_out_pathvarcharsession_expire_delayintegerimport_sourcestexthelp_page_texttextrequire_admin_two_factor_authenticationbooleanshared_runners_enabledbooleanmax_artifacts_sizeintegermax_pages_sizeintegerrequire_two_factor_authenticationbooleantwo_factor_grace_periodintegermetrics_enabledbooleanmetrics_hostvarcharmetrics_pool_sizeintegermetrics_timeoutintegermetrics_method_call_thresholdintegerrecaptcha_enabledbooleanmetrics_portintegerakismet_enabledbooleanmetrics_sample_intervalintegeremail_author_in_bodybooleandefault_group_visibilityintegerrepository_checks_enabledbooleanshared_runners_texttextmetrics_packet_sizeintegerdisabled_oauth_sign_in_sourcestexthealth_check_access_tokenvarcharcontainer_registry_token_expire_delayintegerafter_sign_up_texttextuser_default_externalbooleanrepository_storagesvarcharenabled_git_access_protocolvarcharusage_ping_enabledbooleanhelp_page_text_htmltextshared_runners_text_htmltextafter_sign_up_text_htmltextrsa_key_restrictionintegerdsa_key_restrictionintegerecdsa_key_restrictionintegered25519_key_restrictionintegerhousekeeping_enabledbooleanhousekeeping_bitmaps_enabledbooleanhousekeeping_incremental_repack_periodintegerhousekeeping_full_repack_periodintegerhousekeeping_gc_periodintegerhtml_emails_enabledbooleanplantuml_urlvarcharplantuml_enabledbooleanshared_runners_minutesintegerrepository_size_limitbigintterminal_max_session_timeintegerunique_ips_limit_per_userintegerunique_ips_limit_time_windowintegerunique_ips_limit_enabledbooleandefault_artifacts_expire_invarcharelasticsearch_urlvarchargeo_status_timeoutintegeruuidvarcharpolling_interval_multipliernumericcached_markdown_versionintegercheck_namespace_planbooleanmirror_max_delayintegermirror_max_capacityintegermirror_capacity_thresholdintegerprometheus_metrics_enabledbooleanauthorized_keys_enabledbooleanhelp_page_hide_commercial_contentbooleanhelp_page_support_urlvarcharslack_app_enabledbooleanslack_app_idvarcharperformance_bar_allowed_group_idbigintallow_group_owners_to_manage_ldapbooleanhashed_storage_enabledbooleanproject_export_enabledbooleanauto_devops_enabledbooleanthrottle_unauthenticated_enabledbooleanthrottle_unauthenticated_requests_per_periodintegerthrottle_unauthenticated_period_in_secondsintegerthrottle_authenticated_api_enabledbooleanthrottle_authenticated_api_requests_per_periodintegerthrottle_authenticated_api_period_in_secondsintegerthrottle_authenticated_web_enabledbooleanthrottle_authenticated_web_requests_per_periodintegerthrottle_authenticated_web_period_in_secondsintegergitaly_timeout_defaultintegergitaly_timeout_mediumintegergitaly_timeout_fastintegermirror_availablebooleanpassword_authentication_enabled_for_webbooleanpassword_authentication_enabled_for_gitbooleanauto_devops_domainvarcharexternal_authorization_service_enabledbooleanexternal_authorization_service_urlvarcharexternal_authorization_service_default_labelvarcharpages_domain_verification_enabledbooleanuser_default_internal_regexvarcharexternal_authorization_service_timeoutdouble precisionexternal_auth_client_certtextencrypted_external_auth_client_keytextencrypted_external_auth_client_key_ivvarcharencrypted_external_auth_client_key_passvarcharencrypted_external_auth_client_key_pass_ivvarcharemail_additional_textvarcharenforce_termsbooleanfile_template_project_idbigintpseudonymizer_enabledbooleanhide_third_party_offersbooleansnowplow_enabledbooleansnowplow_collector_hostnamevarcharsnowplow_cookie_domainvarcharuser_show_add_ssh_key_messagebooleancustom_project_templates_group_idbigintusage_stats_set_by_user_idbigintreceive_max_input_sizeintegerdiff_max_patch_bytesintegerarchive_builds_in_secondsintegercommit_email_hostnamevarcharprotected_ci_variablesbooleanrunners_registration_token_encryptedvarcharlocal_markdown_versionintegerfirst_day_of_weekintegerdefault_project_creationintegerlets_encrypt_notification_emailvarcharlets_encrypt_terms_of_service_acceptedbooleangeo_node_allowed_ipsvarcharencrypted_lets_encrypt_private_keytextencrypted_lets_encrypt_private_key_ivtextdns_rebinding_protection_enabledbooleandefault_project_deletion_protectionbooleangrafana_enabledbooleanlock_memberships_to_ldapbooleantime_tracking_limit_to_hoursbooleangrafana_urlvarcharlogin_recaptcha_protection_enabledbooleanoutbound_local_requests_whitelistvarchar(255)[]raw_blob_request_limitintegerallow_local_requests_from_web_hooks_and_servicesbooleanallow_local_requests_from_system_hooksbooleanasset_proxy_enabledbooleanasset_proxy_urlvarcharencrypted_asset_proxy_secret_keytextencrypted_asset_proxy_secret_key_ivvarcharstatic_objects_external_storage_urlvarchar(255)max_personal_access_token_lifetimeintegerthrottle_protected_paths_enabledbooleanthrottle_protected_paths_requests_per_periodintegerthrottle_protected_paths_period_in_secondsintegerprotected_pathsvarchar(255)[]throttle_incident_management_notification_enabledbooleanthrottle_incident_management_notification_period_in_secondsintegerthrottle_incident_management_notification_per_periodintegerpush_event_hooks_limitintegerpush_event_activities_limitintegercustom_http_clone_url_rootvarchar(511)deletion_adjourned_periodintegerlicense_trial_ends_ondateeks_integration_enabledbooleaneks_account_idvarchar(128)eks_access_key_idvarchar(128)encrypted_eks_secret_access_key_ivvarchar(255)encrypted_eks_secret_access_keytextsnowplow_app_idvarcharproductivity_analytics_start_datetimestamptzdefault_ci_config_pathvarchar(255)sourcegraph_enabledbooleansourcegraph_urlvarchar(255)sourcegraph_public_onlybooleansnippet_size_limitbigintminimum_password_lengthintegerencrypted_akismet_api_keytextencrypted_akismet_api_key_ivvarchar(255)encrypted_elasticsearch_aws_secret_access_keytextencrypted_elasticsearch_aws_secret_access_key_ivvarchar(255)encrypted_recaptcha_private_keytextencrypted_recaptcha_private_key_ivvarchar(255)encrypted_recaptcha_site_keytextencrypted_recaptcha_site_key_ivvarchar(255)encrypted_slack_app_secrettextencrypted_slack_app_secret_ivvarchar(255)encrypted_slack_app_verification_tokentextencrypted_slack_app_verification_token_ivvarchar(255)force_pages_access_controlbooleanupdating_name_disabled_for_usersbooleandisable_overriding_approvers_per_merge_requestbooleanprevent_merge_requests_author_approvalbooleanprevent_merge_requests_committers_approvalbooleanemail_restrictions_enabledbooleanemail_restrictionstextcontainer_expiration_policies_enable_historic_entriesbooleanissues_create_limitintegerpush_rule_idbigintgroup_owners_can_manage_default_branch_protectionbooleancontainer_registry_vendortextcontainer_registry_versiontextcontainer_registry_featurestext[]spam_check_endpoint_urltextspam_check_endpoint_enabledbooleanrepository_storages_weightedjsonbmax_import_sizeintegercompliance_frameworkssmallint[]notify_on_unknown_sign_inbooleandefault_branch_nametextproject_import_limitintegerproject_export_limitintegerproject_download_export_limitintegergroup_import_limitintegergroup_export_limitintegergroup_download_export_limitintegermaintenance_modebooleanmaintenance_mode_messagetextwiki_page_max_content_bytesbigintenforce_namespace_storage_limitbooleancontainer_registry_delete_tags_service_timeoutintegerkroki_urlvarcharkroki_enabledbooleangitpod_enabledbooleangitpod_urltextabuse_notification_emailvarcharrequire_admin_approval_after_user_signupbooleanhelp_page_documentation_base_urltextautomatic_purchased_storage_allocationbooleanencrypted_ci_jwt_signing_keytextencrypted_ci_jwt_signing_key_ivtextcontainer_registry_expiration_policies_worker_capacityintegersecret_detection_token_revocation_enabledbooleansecret_detection_token_revocation_urltextencrypted_secret_detection_token_revocation_tokentextencrypted_secret_detection_token_revocation_token_ivtextdomain_denylist_enabledbooleandomain_denylisttextdomain_allowlisttextnew_user_signups_capintegerencrypted_cloud_license_auth_tokentextencrypted_cloud_license_auth_token_ivtextsecret_detection_revocation_token_types_urltextdisable_feed_tokenbooleanpersonal_access_token_prefixtextrate_limiting_response_texttextinvisible_captcha_enabledbooleancontainer_registry_cleanup_tags_service_max_list_sizeintegergit_two_factor_session_expiryintegerkeep_latest_artifactbooleannotes_create_limitintegernotes_create_limit_allowlisttext[]kroki_formatsjsonbasset_proxy_whitelisttextadmin_modebooleanexternal_pipeline_validation_service_timeoutintegerencrypted_external_pipeline_validation_service_tokentextencrypted_external_pipeline_validation_service_token_ivtextexternal_pipeline_validation_service_urltextthrottle_unauthenticated_packages_api_requests_per_periodintegerthrottle_unauthenticated_packages_api_period_in_secondsintegerthrottle_authenticated_packages_api_requests_per_periodintegerthrottle_authenticated_packages_api_period_in_secondsintegerthrottle_unauthenticated_packages_api_enabledbooleanthrottle_authenticated_packages_api_enabledbooleandeactivate_dormant_usersbooleanwhats_new_variantsmallintencrypted_spam_check_api_keybyteaencrypted_spam_check_api_key_ivbyteafloc_enabledbooleanencrypted_elasticsearch_passwordbyteaencrypted_elasticsearch_password_ivbyteadiff_max_linesintegerdiff_max_filesintegervalid_runner_registrarsvarchar[]encrypted_mailgun_signing_keybyteaencrypted_mailgun_signing_key_ivbyteamailgun_events_enabledbooleanusage_ping_features_enabledbooleanencrypted_customers_dot_jwt_signing_keybyteaencrypted_customers_dot_jwt_signing_key_ivbyteathrottle_unauthenticated_files_api_requests_per_periodintegerthrottle_unauthenticated_files_api_period_in_secondsintegerthrottle_authenticated_files_api_requests_per_periodintegerthrottle_authenticated_files_api_period_in_secondsintegerthrottle_unauthenticated_files_api_enabledbooleanthrottle_authenticated_files_api_enabledbooleanmax_yaml_size_bytesbigintmax_yaml_depthintegerthrottle_authenticated_git_lfs_requests_per_periodintegerthrottle_authenticated_git_lfs_period_in_secondsintegerthrottle_authenticated_git_lfs_enabledbooleanuser_deactivation_emails_enabledbooleanthrottle_unauthenticated_api_enabledbooleanthrottle_unauthenticated_api_requests_per_periodintegerthrottle_unauthenticated_api_period_in_secondsintegerjobs_per_stage_page_sizeintegersidekiq_job_limiter_modesmallintsidekiq_job_limiter_compression_threshold_bytesintegersidekiq_job_limiter_limit_bytesintegersuggest_pipeline_enabledbooleanthrottle_unauthenticated_deprecated_api_requests_per_periodintegerthrottle_unauthenticated_deprecated_api_period_in_secondsintegerthrottle_unauthenticated_deprecated_api_enabledbooleanthrottle_authenticated_deprecated_api_requests_per_periodintegerthrottle_authenticated_deprecated_api_period_in_secondsintegerthrottle_authenticated_deprecated_api_enabledbooleandependency_proxy_ttl_group_policy_worker_capacitysmallintcontent_validation_endpoint_urltextencrypted_content_validation_api_keybyteaencrypted_content_validation_api_key_ivbyteacontent_validation_endpoint_enabledbooleansentry_enabledbooleansentry_dsntextsentry_clientside_dsntextsentry_environmenttextmax_ssh_key_lifetimeintegerstatic_objects_external_storage_auth_token_encryptedtextfuture_subscriptionsjsonbrunner_token_expiration_intervalintegergroup_runner_token_expiration_intervalintegerproject_runner_token_expiration_intervalintegerecdsa_sk_key_restrictionintegered25519_sk_key_restrictionintegerusers_get_by_id_limitintegerusers_get_by_id_limit_allowlisttext[]container_registry_expiration_policies_cachingbooleansearch_rate_limitintegersearch_rate_limit_unauthenticatedintegerencrypted_database_grafana_api_keybyteaencrypted_database_grafana_api_key_ivbyteadatabase_grafana_api_urltextdatabase_grafana_tagtextpublic_runner_releases_urltextpassword_uppercase_requiredbooleanpassword_lowercase_requiredbooleanpassword_number_requiredbooleanpassword_symbol_requiredbooleanencrypted_arkose_labs_public_api_keybyteaencrypted_arkose_labs_public_api_key_ivbyteaencrypted_arkose_labs_private_api_keybyteaencrypted_arkose_labs_private_api_key_ivbyteadelete_inactive_projectsbooleaninactive_projects_delete_after_monthsintegerinactive_projects_min_size_mbintegerinactive_projects_send_warning_email_after_monthsintegerarkose_labs_namespacetextmax_export_sizeintegerencrypted_slack_app_signing_secretbyteaencrypted_slack_app_signing_secret_ivbyteapipeline_limit_per_project_user_shaintegerdingtalk_integration_enabledbooleanencrypted_dingtalk_corpidbyteaencrypted_dingtalk_corpid_ivbyteaencrypted_dingtalk_app_keybyteaencrypted_dingtalk_app_key_ivbyteaencrypted_dingtalk_app_secretbyteaencrypted_dingtalk_app_secret_ivbyteajira_connect_application_keytextglobally_allowed_ipstextlicense_usage_data_exportedbooleanphone_verification_code_enabledbooleanmax_number_of_repository_downloadssmallintmax_number_of_repository_downloads_within_time_periodintegerfeishu_integration_enabledbooleanencrypted_feishu_app_keybyteaencrypted_feishu_app_key_ivbyteaencrypted_feishu_app_secretbyteaencrypted_feishu_app_secret_ivbyteaerror_tracking_enabledbooleanerror_tracking_api_urltextgit_rate_limit_users_allowlisttext[]error_tracking_access_token_encryptedtextinvitation_flow_enforcementbooleandeactivate_dormant_users_periodintegerauto_ban_user_on_excessive_projects_downloadbooleanmax_pages_custom_domains_per_projectintegercube_api_base_urltextencrypted_cube_api_keybyteaencrypted_cube_api_key_ivbyteadashboard_limit_enabledbooleandashboard_limitintegercan_create_groupbooleanjira_connect_proxy_urltextpassword_expiration_enabledbooleanpassword_expires_in_daysintegerpassword_expires_notice_before_daysintegerproduct_analytics_enabledbooleanemail_confirmation_settingsmallintdisable_admin_oauth_scopesbooleandefault_preferred_languagetextdisable_download_buttonbooleanencrypted_telesign_customer_xidbyteaencrypted_telesign_customer_xid_ivbyteaencrypted_telesign_api_keybyteaencrypted_telesign_api_key_ivbyteadisable_personal_access_tokensbooleanmax_terraform_state_size_bytesintegerbulk_import_enabledbooleanallow_runner_registration_tokenbooleanuser_defaults_to_private_profilebooleanallow_possible_spambooleandefault_syntax_highlighting_themeintegersearch_max_shard_size_gbintegersearch_max_docs_denominatorintegersearch_min_docs_before_rolloverintegerdeactivation_email_additional_texttextjira_connect_public_key_storage_enabledbooleangit_rate_limit_users_alertlistinteger[]allow_deploy_tokens_and_keys_with_external_authnbooleansecurity_policy_global_group_approvers_enabledbooleanprojects_api_rate_limit_unauthenticatedintegerdeny_all_requests_except_allowedbooleanproduct_analytics_data_collector_hosttextlock_memberships_to_samlbooleangitlab_dedicated_instancebooleanupdate_runner_versions_enabledbooleandatabase_max_running_batched_background_migrationsintegerencrypted_product_analytics_configurator_connection_stringbyteaencrypted_product_analytics_configurator_connection_string_ivbyteasilent_mode_enabledbooleanpackage_metadata_purl_typessmallint[]ci_max_includesintegerremember_me_enabledbooleandiagramsnet_enabledbooleandiagramsnet_urltextallow_account_deletionbooleanwiki_asciidoc_allow_uri_includesbooleannamespace_aggregation_schedule_lease_duration_in_secondsintegervertex_ai_hosttextvertex_ai_projecttextdelete_unconfirmed_usersbooleanunconfirmed_users_delete_after_daysintegerdefault_branch_protection_defaultsjsonbgitlab_shell_operation_limitintegerprotected_paths_for_get_requesttext[]namespace_storage_forks_cost_factordouble precisionbulk_import_max_download_file_sizebigintmax_import_remote_file_sizebigintmax_decompressed_archive_sizeintegersentry_clientside_traces_sample_ratedouble precisionprometheus_alert_db_indicators_settingsjsonbci_max_total_yaml_size_bytesintegerdecompress_archive_file_timeoutintegersearch_rate_limit_allowlisttext[]snowplow_database_collector_hostnametextcontainer_registry_db_enabledbooleanfailed_login_attempts_unlock_period_in_minutesintegermax_login_attemptsintegerproject_jobs_api_rate_limitintegermath_rendering_limits_enabledbooleanservice_access_tokens_expiration_enforcedbooleanmake_profile_privatebooleanenable_artifact_external_redirect_warning_pagebooleanallow_project_creation_for_guest_and_belowbooleanupdate_namespace_name_rate_limitsmallintcan_create_organizationbooleanbulk_import_concurrent_pipeline_batch_limitsmallintweb_ide_oauth_application_id FKbigintinstance_level_ai_beta_features_enabledbooleansecurity_txt_contenttextencrypted_arkose_labs_data_exchange_keybyteaencrypted_arkose_labs_data_exchange_key_ivbytearate_limitsjsonbenable_member_promotion_managementbooleanlock_math_rendering_limits_enabledbooleansecurity_approval_policies_limitintegerencrypted_arkose_labs_client_xidbyteaencrypted_arkose_labs_client_xid_ivbyteaencrypted_arkose_labs_client_secretbyteaencrypted_arkose_labs_client_secret_ivbyteaduo_features_enabledbooleanlock_duo_features_enabledbooleanasciidoc_max_includessmallintclickhousejsonbinclude_optional_metrics_in_service_pingbooleanzoekt_settingsjsonbservice_ping_settingsjsonbpackage_registryjsonbrate_limits_unauthenticated_git_httpjsonbimportersjsonbcode_creationjsonbcode_suggestions_api_rate_limitintegerai_action_api_rate_limitintegerrequire_personal_access_token_expirybooleanduo_workflowjsonbmax_artifacts_content_include_sizebigintmax_number_of_vulnerabilities_per_projectintegercluster_agentsjsonbobservability_backend_ssl_verification_enabledbooleanpagesjsonbsecurity_policiesjsonbspp_repository_pipeline_accessbooleanlock_spp_repository_pipeline_accessbooleanrequired_instance_ci_templatetextenforce_ci_inbound_job_token_scope_enabledbooleanallow_top_level_group_owners_to_create_service_accountsbooleansign_in_restrictionsjsonbtransactional_emailsjsonbidentity_verification_settingsjsonbintegrationsjsonbuser_seat_managementjsonbsecret_detection_service_urltextencrypted_secret_detection_service_auth_tokenbyteaencrypted_secret_detection_service_auth_token_ivbytearesource_usage_limitsjsonbshow_migrate_from_jenkins_bannerbooleanencrypted_ci_job_token_signing_keybyteaencrypted_ci_job_token_signing_key_ivbyteaelasticsearchjsonboauth_providerjsonbobservability_settingsjsonbsearchjsonbanti_abuse_settingsjsonbsecret_push_protection_availablebooleanvscode_extension_marketplacejsonbtoken_prefixesjsonbci_cd_settingsjsonbdatabase_reindexingjsonbduo_chatjsonbgroup_settingsjsonbmodel_prompt_cache_enabledbooleanlock_model_prompt_cache_enabledbooleanresponse_limitsjsonbweb_based_commit_signing_enabledbooleanlock_web_based_commit_signing_enabledbooleantmp_asset_proxy_secret_keyjsonbeditor_extensionsjsonbsecurity_and_compliance_settingsjsonbsdrs_urltextdefault_profile_preferencesjsonbsdrs_enabledbooleansdrs_jwt_signing_keyjsonbresource_access_tokens_settingsjsonbauto_duo_code_review_enabledbooleanlock_auto_duo_code_review_enabledbooleanworkspaces_oauth_application_id FKbigintusage_ping_generation_enabledbooleanduo_remote_flows_enabledbooleanlock_duo_remote_flows_enabledbooleanterraform_state_settingsjsonbduo_foundational_flows_enabledbooleanlock_duo_foundational_flows_enabledbooleaniframe_rendering_enabledbooleaniframe_rendering_allowlisttextdatabase_settingsjsonbusage_billingjsonbtopology_service_settingsjsonbsecrets_manager_settingsjsonbduo_workflows_default_image_registrytextdiagram_proxyjsonbbuilt_in_project_templates_enabledbooleanlock_built_in_project_templates_enabledbooleantool_approval_for_session_enabledbooleanlock_tool_approval_for_session_enabledbooleanpersonal_access_token_settingsjsonbdiff_limitsjsonbmarkdown_settingsjsonbactive_context_settingsjsonbduo_settingsjsonbmcp_server_settingsjsonbsecrets_manager_instance_enrolledbooleanduo_template_project_id FKbigintdefault_security_tracked_context_quotaintegeroauth_settingsjsonblogging_settingsjsonbdependency_management_settingsjsonbrequire_sha_for_mergebooleanlock_require_sha_for_mergebooleanai_audit_events_storage_enabledbooleanlock_ai_audit_events_storage_enabledbooleanai_gateway_urltextai_gateway_timeout_secondsintegerenabled_instance_verbose_ai_logsbooleanduo_agent_platform_service_urltextself_hosted_duo_agent_platform_service_securebooleansidekiq_timezone_overridetextnats_settingsjsonbo11y_oauth_application_id FKbigintoauth_applicationsprojectsduo_template_project_ido11y_oauth_application_idworkspaces_oauth_application_idweb_ide_oauth_application_id

Relationships

application_setting_terms

4 cols · no RLS · line 13925View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
cached_markdown_version integernull
terms textNOT NULL
terms_html textnull

Indexes

  • none

Referenced by

application_settings

584 cols · no RLS · line 13941View in 3D
  • Nullable foreign key duo_template_project_idapplication_settings.duo_template_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key o11y_oauth_application_idapplication_settings.o11y_oauth_application_id may be NULL, so the relationship to oauth_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key workspaces_oauth_application_idapplication_settings.workspaces_oauth_application_id may be NULL, so the relationship to oauth_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key web_ide_oauth_application_idapplication_settings.web_ide_oauth_application_id may be NULL, so the relationship to oauth_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK duo_template_project_id, o11y_oauth_application_id, workspaces_oauth_application_id, web_ide_oauth_application_idapplication_settings has several nullable FKs (duo_template_project_id, o11y_oauth_application_id, workspaces_oauth_application_id, web_ide_oauth_application_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Monetary value stored as float namespace_storage_forks_cost_factornamespace_storage_forks_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.
  • Monetary value stored as float sentry_clientside_traces_sample_ratesentry_clientside_traces_sample_rate is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.
  • Wide table (584 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
default_projects_limit integernull
signup_enabled booleannull
gravatar_enabled booleannull
created_at timestampnull
updated_at timestampnull
home_page_url varcharnull
default_branch_protection integernull2
restricted_visibility_levels textnull
version_check_enabled booleannullTRUE
max_attachment_size integerNOT NULL100
default_project_visibility integerNOT NULL0
default_snippet_visibility integerNOT NULL0
user_oauth_applications booleannullTRUE
after_sign_out_path varcharnull
session_expire_delay integerNOT NULL10080
import_sources textnull
help_page_text textnull
require_admin_two_factor_authentication booleanNOT NULLFALSE
shared_runners_enabled booleanNOT NULLTRUE
max_artifacts_size integerNOT NULL100
max_pages_size integerNOT NULL100
require_two_factor_authentication booleannullFALSE
two_factor_grace_period integernull48
metrics_enabled booleannullFALSE
metrics_host varcharnullCAST('localhost' AS varchar)
metrics_pool_size integernull16
metrics_timeout integernull10
metrics_method_call_threshold integernull10
recaptcha_enabled booleannullFALSE
metrics_port integernull8089
akismet_enabled booleannullFALSE
metrics_sample_interval integernull15
email_author_in_body booleannullFALSE
default_group_visibility integernull
repository_checks_enabled booleannullFALSE
shared_runners_text textnull
metrics_packet_size integernull1
disabled_oauth_sign_in_sources textnull
health_check_access_token varcharnull
container_registry_token_expire_delay integernull5
after_sign_up_text textnull
user_default_external booleanNOT NULLFALSE
repository_storages varcharnullCAST('default' AS varchar)
enabled_git_access_protocol varcharnull
usage_ping_enabled booleanNOT NULLTRUE
help_page_text_html textnull
shared_runners_text_html textnull
after_sign_up_text_html textnull
rsa_key_restriction integerNOT NULL0
dsa_key_restriction integerNOT NULLCAST('-1' AS integer)
ecdsa_key_restriction integerNOT NULL0
ed25519_key_restriction integerNOT NULL0
housekeeping_enabled booleanNOT NULLTRUE
housekeeping_bitmaps_enabled booleanNOT NULLTRUE
housekeeping_incremental_repack_period integerNOT NULL10
housekeeping_full_repack_period integerNOT NULL50
housekeeping_gc_period integerNOT NULL200
html_emails_enabled booleannullTRUE
plantuml_url varcharnull
plantuml_enabled booleannull
shared_runners_minutes integerNOT NULL0
repository_size_limit bigintnull0
terminal_max_session_time integerNOT NULL0
unique_ips_limit_per_user integernull
unique_ips_limit_time_window integernull
unique_ips_limit_enabled booleanNOT NULLFALSE
default_artifacts_expire_in varcharNOT NULLCAST('0' AS varchar)
elasticsearch_url varcharnullCAST('http://localhost:9200' AS varchar)
geo_status_timeout integernull10
uuid varcharnull
polling_interval_multiplier numericNOT NULL1.0
cached_markdown_version integernull
check_namespace_plan booleanNOT NULLFALSE
mirror_max_delay integerNOT NULL300
mirror_max_capacity integerNOT NULL100
mirror_capacity_threshold integerNOT NULL50
prometheus_metrics_enabled booleanNOT NULLTRUE
authorized_keys_enabled booleanNOT NULLTRUE
help_page_hide_commercial_content booleannullFALSE
help_page_support_url varcharnull
slack_app_enabled booleannullFALSE
slack_app_id varcharnull
performance_bar_allowed_group_id bigintnull
allow_group_owners_to_manage_ldap booleanNOT NULLTRUE
hashed_storage_enabled booleanNOT NULLTRUE
project_export_enabled booleanNOT NULLTRUE
auto_devops_enabled booleanNOT NULLTRUE
throttle_unauthenticated_enabled booleanNOT NULLFALSE
throttle_unauthenticated_requests_per_period integerNOT NULL3600
throttle_unauthenticated_period_in_seconds integerNOT NULL3600
throttle_authenticated_api_enabled booleanNOT NULLFALSE
throttle_authenticated_api_requests_per_period integerNOT NULL7200
throttle_authenticated_api_period_in_seconds integerNOT NULL3600
throttle_authenticated_web_enabled booleanNOT NULLFALSE
throttle_authenticated_web_requests_per_period integerNOT NULL7200
throttle_authenticated_web_period_in_seconds integerNOT NULL3600
gitaly_timeout_default integerNOT NULL55
gitaly_timeout_medium integerNOT NULL30
gitaly_timeout_fast integerNOT NULL10
mirror_available booleanNOT NULLTRUE
password_authentication_enabled_for_web booleannull
password_authentication_enabled_for_git booleanNOT NULLTRUE
auto_devops_domain varcharnull
external_authorization_service_enabled booleanNOT NULLFALSE
external_authorization_service_url varcharnull
external_authorization_service_default_label varcharnull
pages_domain_verification_enabled booleanNOT NULLTRUE
user_default_internal_regex varcharnull
external_authorization_service_timeout double precisionnull0.5
external_auth_client_cert textnull
encrypted_external_auth_client_key textnull
encrypted_external_auth_client_key_iv varcharnull
encrypted_external_auth_client_key_pass varcharnull
encrypted_external_auth_client_key_pass_iv varcharnull
email_additional_text varcharnull
enforce_terms booleannullFALSE
file_template_project_id bigintnull
pseudonymizer_enabled booleanNOT NULLFALSE
hide_third_party_offers booleanNOT NULLFALSE
snowplow_enabled booleanNOT NULLFALSE
snowplow_collector_hostname varcharnull
snowplow_cookie_domain varcharnull
user_show_add_ssh_key_message booleanNOT NULLTRUE
custom_project_templates_group_id bigintnull
usage_stats_set_by_user_id bigintnull
receive_max_input_size integernull
diff_max_patch_bytes integerNOT NULL204800
archive_builds_in_seconds integernull
commit_email_hostname varcharnull
protected_ci_variables booleanNOT NULLTRUE
runners_registration_token_encrypted varcharnull
local_markdown_version integerNOT NULL0
first_day_of_week integerNOT NULL0
default_project_creation integerNOT NULL2
lets_encrypt_notification_email varcharnull
lets_encrypt_terms_of_service_accepted booleanNOT NULLFALSE
geo_node_allowed_ips varcharnullCAST('0.0.0.0/0, ::/0' AS varchar)
encrypted_lets_encrypt_private_key textnull
encrypted_lets_encrypt_private_key_iv textnull
dns_rebinding_protection_enabled booleanNOT NULLTRUE
default_project_deletion_protection booleanNOT NULLFALSE
grafana_enabled booleanNOT NULLFALSE
lock_memberships_to_ldap booleanNOT NULLFALSE
time_tracking_limit_to_hours booleanNOT NULLFALSE
grafana_url varcharNOT NULLCAST('/-/grafana' AS varchar)
login_recaptcha_protection_enabled booleanNOT NULLFALSE
outbound_local_requests_whitelist varchar(255)[]NOT NULLCAST('{}' AS varchar[])
raw_blob_request_limit integerNOT NULL300
allow_local_requests_from_web_hooks_and_services booleanNOT NULLFALSE
allow_local_requests_from_system_hooks booleanNOT NULLTRUE
asset_proxy_enabled booleanNOT NULLFALSE
asset_proxy_url varcharnull
encrypted_asset_proxy_secret_key textnull
encrypted_asset_proxy_secret_key_iv varcharnull
static_objects_external_storage_url varchar(255)null
max_personal_access_token_lifetime integernull
throttle_protected_paths_enabled booleanNOT NULLFALSE
throttle_protected_paths_requests_per_period integerNOT NULL10
throttle_protected_paths_period_in_seconds integerNOT NULL60
protected_paths varchar(255)[]nullCAST('{/users/password,/users/sign_in,/api/v3/session.json,/api/v3/session,/api/v4/session.json,/api/v4/session,/users,/users/confirmation,/unsubscribes/,/import/github/personal_access_token,/admin/session}' AS varchar[])
throttle_incident_management_notification_enabled booleanNOT NULLFALSE
throttle_incident_management_notification_period_in_seconds integernull3600
throttle_incident_management_notification_per_period integernull3600
push_event_hooks_limit integerNOT NULL3
push_event_activities_limit integerNOT NULL3
custom_http_clone_url_root varchar(511)null
deletion_adjourned_period integerNOT NULL30
license_trial_ends_on datenull
eks_integration_enabled booleanNOT NULLFALSE
eks_account_id varchar(128)null
eks_access_key_id varchar(128)null
encrypted_eks_secret_access_key_iv varchar(255)null
encrypted_eks_secret_access_key textnull
snowplow_app_id varcharnull
productivity_analytics_start_date timestamptznull
default_ci_config_path varchar(255)null
sourcegraph_enabled booleanNOT NULLFALSE
sourcegraph_url varchar(255)null
sourcegraph_public_only booleanNOT NULLTRUE
snippet_size_limit bigintNOT NULL52428800
minimum_password_length integerNOT NULL8
encrypted_akismet_api_key textnull
encrypted_akismet_api_key_iv varchar(255)null
encrypted_elasticsearch_aws_secret_access_key textnull
encrypted_elasticsearch_aws_secret_access_key_iv varchar(255)null
encrypted_recaptcha_private_key textnull
encrypted_recaptcha_private_key_iv varchar(255)null
encrypted_recaptcha_site_key textnull
encrypted_recaptcha_site_key_iv varchar(255)null
encrypted_slack_app_secret textnull
encrypted_slack_app_secret_iv varchar(255)null
encrypted_slack_app_verification_token textnull
encrypted_slack_app_verification_token_iv varchar(255)null
force_pages_access_control booleanNOT NULLFALSE
updating_name_disabled_for_users booleanNOT NULLFALSE
disable_overriding_approvers_per_merge_request booleanNOT NULLFALSE
prevent_merge_requests_author_approval booleanNOT NULLFALSE
prevent_merge_requests_committers_approval booleanNOT NULLFALSE
email_restrictions_enabled booleanNOT NULLFALSE
email_restrictions textnull
container_expiration_policies_enable_historic_entries booleanNOT NULLFALSE
issues_create_limit integerNOT NULL0
push_rule_id bigintnull
group_owners_can_manage_default_branch_protection booleanNOT NULLTRUE
container_registry_vendor textNOT NULLCAST('' AS text)CHECK char_length(container_registry_vendor) <= 255
container_registry_version textNOT NULLCAST('' AS text)CHECK char_length(container_registry_version) <= 255
container_registry_features text[]NOT NULLCAST('{}' AS text[])
spam_check_endpoint_url textnullCHECK char_length(spam_check_endpoint_url) <= 255
spam_check_endpoint_enabled booleanNOT NULLFALSE
repository_storages_weighted jsonbNOT NULLCAST('{}' AS jsonb)
max_import_size integerNOT NULL0
compliance_frameworks smallint[]NOT NULLCAST('{}' AS smallint[])
notify_on_unknown_sign_in booleanNOT NULLTRUE
default_branch_name textnullCHECK char_length(default_branch_name) <= 255
project_import_limit integerNOT NULL6
project_export_limit integerNOT NULL6
project_download_export_limit integerNOT NULL1
group_import_limit integerNOT NULL6
group_export_limit integerNOT NULL6
group_download_export_limit integerNOT NULL1
maintenance_mode booleanNOT NULLFALSE
maintenance_mode_message textnullCHECK char_length(maintenance_mode_message) <= 255
wiki_page_max_content_bytes bigintNOT NULL5242880
enforce_namespace_storage_limit booleanNOT NULLFALSE
container_registry_delete_tags_service_timeout integerNOT NULL250
kroki_url varcharnullCHECK char_length(CAST(kroki_url AS text)) <= 1024
kroki_enabled booleannull
gitpod_enabled booleanNOT NULLFALSE
gitpod_url textnullCAST('https://gitpod.io/' AS text)CHECK char_length(gitpod_url) <= 255
abuse_notification_email varcharnull
require_admin_approval_after_user_signup booleanNOT NULLTRUE
help_page_documentation_base_url textnullCHECK char_length(help_page_documentation_base_url) <= 255
automatic_purchased_storage_allocation booleanNOT NULLFALSE
encrypted_ci_jwt_signing_key textnull
encrypted_ci_jwt_signing_key_iv textnullCHECK char_length(encrypted_ci_jwt_signing_key_iv) <= 255
container_registry_expiration_policies_worker_capacity integerNOT NULL4CHECK container_registry_expiration_policies_worker_capacity >= 0
secret_detection_token_revocation_enabled booleanNOT NULLFALSE
secret_detection_token_revocation_url textnullCHECK char_length(secret_detection_token_revocation_url) <= 255
encrypted_secret_detection_token_revocation_token textnull
encrypted_secret_detection_token_revocation_token_iv textnull
domain_denylist_enabled booleannullFALSE
domain_denylist textnull
domain_allowlist textnull
new_user_signups_cap integernull
encrypted_cloud_license_auth_token textnull
encrypted_cloud_license_auth_token_iv textnullCHECK char_length(encrypted_cloud_license_auth_token_iv) <= 255
secret_detection_revocation_token_types_url textnullCHECK char_length(secret_detection_revocation_token_types_url) <= 255
disable_feed_token booleanNOT NULLFALSE
personal_access_token_prefix textnullCAST('glpat-' AS text)CHECK char_length(personal_access_token_prefix) <= 20
rate_limiting_response_text textnullCHECK char_length(rate_limiting_response_text) <= 255
invisible_captcha_enabled booleanNOT NULLFALSE
container_registry_cleanup_tags_service_max_list_size integerNOT NULL200CHECK container_registry_cleanup_tags_service_max_list_size >= 0
git_two_factor_session_expiry integerNOT NULL15
keep_latest_artifact booleanNOT NULLTRUE
notes_create_limit integerNOT NULL300
notes_create_limit_allowlist text[]NOT NULLCAST('{}' AS text[])
kroki_formats jsonbNOT NULLCAST('{}' AS jsonb)
asset_proxy_whitelist textnull
admin_mode booleanNOT NULLFALSE
external_pipeline_validation_service_timeout integernull
encrypted_external_pipeline_validation_service_token textnull
encrypted_external_pipeline_validation_service_token_iv textnull
external_pipeline_validation_service_url textnullCHECK char_length(external_pipeline_validation_service_url) <= 255
throttle_unauthenticated_packages_api_requests_per_period integerNOT NULL800
throttle_unauthenticated_packages_api_period_in_seconds integerNOT NULL15
throttle_authenticated_packages_api_requests_per_period integerNOT NULL1000
throttle_authenticated_packages_api_period_in_seconds integerNOT NULL15
throttle_unauthenticated_packages_api_enabled booleanNOT NULLFALSE
throttle_authenticated_packages_api_enabled booleanNOT NULLFALSE
deactivate_dormant_users booleanNOT NULLFALSE
whats_new_variant smallintnull0
encrypted_spam_check_api_key byteanull
encrypted_spam_check_api_key_iv byteanull
floc_enabled booleanNOT NULLFALSE
encrypted_elasticsearch_password byteanull
encrypted_elasticsearch_password_iv byteanull
diff_max_lines integerNOT NULL50000
diff_max_files integerNOT NULL1000
valid_runner_registrars varchar[]nullCAST('{project,group}' AS varchar[])
encrypted_mailgun_signing_key byteanull
encrypted_mailgun_signing_key_iv byteanull
mailgun_events_enabled booleanNOT NULLFALSE
usage_ping_features_enabled booleanNOT NULLFALSE
encrypted_customers_dot_jwt_signing_key byteanull
encrypted_customers_dot_jwt_signing_key_iv byteanull
throttle_unauthenticated_files_api_requests_per_period integerNOT NULL125
throttle_unauthenticated_files_api_period_in_seconds integerNOT NULL15
throttle_authenticated_files_api_requests_per_period integerNOT NULL500
throttle_authenticated_files_api_period_in_seconds integerNOT NULL15
throttle_unauthenticated_files_api_enabled booleanNOT NULLFALSE
throttle_authenticated_files_api_enabled booleanNOT NULLFALSE
max_yaml_size_bytes bigintNOT NULL2097152CHECK max_yaml_size_bytes > 0
max_yaml_depth integerNOT NULL100CHECK max_yaml_depth > 0
throttle_authenticated_git_lfs_requests_per_period integerNOT NULL1000
throttle_authenticated_git_lfs_period_in_seconds integerNOT NULL60
throttle_authenticated_git_lfs_enabled booleanNOT NULLFALSE
user_deactivation_emails_enabled booleanNOT NULLTRUE
throttle_unauthenticated_api_enabled booleanNOT NULLFALSE
throttle_unauthenticated_api_requests_per_period integerNOT NULL3600
throttle_unauthenticated_api_period_in_seconds integerNOT NULL3600
jobs_per_stage_page_size integerNOT NULL200
sidekiq_job_limiter_mode smallintNOT NULL1
sidekiq_job_limiter_compression_threshold_bytes integerNOT NULL100000
sidekiq_job_limiter_limit_bytes integerNOT NULL0
suggest_pipeline_enabled booleanNOT NULLTRUE
throttle_unauthenticated_deprecated_api_requests_per_period integerNOT NULL1800
throttle_unauthenticated_deprecated_api_period_in_seconds integerNOT NULL3600
throttle_unauthenticated_deprecated_api_enabled booleanNOT NULLFALSE
throttle_authenticated_deprecated_api_requests_per_period integerNOT NULL3600
throttle_authenticated_deprecated_api_period_in_seconds integerNOT NULL3600
throttle_authenticated_deprecated_api_enabled booleanNOT NULLFALSE
dependency_proxy_ttl_group_policy_worker_capacity smallintNOT NULL2CHECK dependency_proxy_ttl_group_policy_worker_capacity >= 0
content_validation_endpoint_url textnullJiHu-specific columnCHECK char_length(content_validation_endpoint_url) <= 255
encrypted_content_validation_api_key byteanullJiHu-specific column
encrypted_content_validation_api_key_iv byteanullJiHu-specific column
content_validation_endpoint_enabled booleanNOT NULLFALSEJiHu-specific column
sentry_enabled booleanNOT NULLFALSE
sentry_dsn textnullCHECK char_length(sentry_dsn) <= 255
sentry_clientside_dsn textnullCHECK char_length(sentry_clientside_dsn) <= 255
sentry_environment textnullCHECK char_length(sentry_environment) <= 255
max_ssh_key_lifetime integernull
static_objects_external_storage_auth_token_encrypted textnullCHECK char_length(static_objects_external_storage_auth_token_encrypted) <= 255
future_subscriptions jsonbNOT NULLCAST('[]' AS jsonb)
runner_token_expiration_interval integernull
group_runner_token_expiration_interval integernull
project_runner_token_expiration_interval integernull
ecdsa_sk_key_restriction integerNOT NULL0
ed25519_sk_key_restriction integerNOT NULL0
users_get_by_id_limit integerNOT NULL300
users_get_by_id_limit_allowlist text[]NOT NULLCAST('{}' AS text[])
container_registry_expiration_policies_caching booleanNOT NULLTRUE
search_rate_limit integerNOT NULL300
search_rate_limit_unauthenticated integerNOT NULL100
encrypted_database_grafana_api_key byteanull
encrypted_database_grafana_api_key_iv byteanull
database_grafana_api_url textnullCHECK char_length(database_grafana_api_url) <= 255
database_grafana_tag textnullCHECK char_length(database_grafana_tag) <= 255
public_runner_releases_url textNOT NULLCAST('https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-runner/releases' AS text)CHECK char_length(public_runner_releases_url) <= 255
password_uppercase_required booleanNOT NULLFALSE
password_lowercase_required booleanNOT NULLFALSE
password_number_required booleanNOT NULLFALSE
password_symbol_required booleanNOT NULLFALSE
encrypted_arkose_labs_public_api_key byteanull
encrypted_arkose_labs_public_api_key_iv byteanull
encrypted_arkose_labs_private_api_key byteanull
encrypted_arkose_labs_private_api_key_iv byteanull
delete_inactive_projects booleanNOT NULLFALSE
inactive_projects_delete_after_months integerNOT NULL2
inactive_projects_min_size_mb integerNOT NULL0
inactive_projects_send_warning_email_after_months integerNOT NULL1
arkose_labs_namespace textNOT NULLCAST('client' AS text)CHECK char_length(arkose_labs_namespace) <= 255
max_export_size integernull0
encrypted_slack_app_signing_secret byteanull
encrypted_slack_app_signing_secret_iv byteanull
pipeline_limit_per_project_user_sha integerNOT NULL0
dingtalk_integration_enabled booleanNOT NULLFALSEJiHu-specific column
encrypted_dingtalk_corpid byteanullJiHu-specific column
encrypted_dingtalk_corpid_iv byteanullJiHu-specific column
encrypted_dingtalk_app_key byteanullJiHu-specific column
encrypted_dingtalk_app_key_iv byteanullJiHu-specific column
encrypted_dingtalk_app_secret byteanullJiHu-specific column
encrypted_dingtalk_app_secret_iv byteanullJiHu-specific column
jira_connect_application_key textnullCHECK char_length(jira_connect_application_key) <= 255
globally_allowed_ips textNOT NULLCAST('' AS text)CHECK char_length(globally_allowed_ips) <= 255
license_usage_data_exported booleanNOT NULLFALSE
phone_verification_code_enabled booleanNOT NULLFALSEJiHu-specific column
max_number_of_repository_downloads smallintNOT NULL0
max_number_of_repository_downloads_within_time_period integerNOT NULL0
feishu_integration_enabled booleanNOT NULLFALSEJiHu-specific column
encrypted_feishu_app_key byteanullJiHu-specific column
encrypted_feishu_app_key_iv byteanullJiHu-specific column
encrypted_feishu_app_secret byteanullJiHu-specific column
encrypted_feishu_app_secret_iv byteanullJiHu-specific column
error_tracking_enabled booleanNOT NULLFALSE
error_tracking_api_url textnullCHECK char_length(error_tracking_api_url) <= 255
git_rate_limit_users_allowlist text[]NOT NULLCAST('{}' AS text[])CHECK cardinality(git_rate_limit_users_allowlist) <= 100
error_tracking_access_token_encrypted textnullCHECK char_length(error_tracking_access_token_encrypted) <= 255
invitation_flow_enforcement booleanNOT NULLFALSE
deactivate_dormant_users_period integerNOT NULL90
auto_ban_user_on_excessive_projects_download booleanNOT NULLFALSE
max_pages_custom_domains_per_project integerNOT NULL0CHECK max_pages_custom_domains_per_project >= 0
cube_api_base_url textnullCHECK char_length(cube_api_base_url) <= 512
encrypted_cube_api_key byteanull
encrypted_cube_api_key_iv byteanull
dashboard_limit_enabled booleanNOT NULLFALSE
dashboard_limit integerNOT NULL0
can_create_group booleanNOT NULLTRUE
jira_connect_proxy_url textnullCHECK char_length(jira_connect_proxy_url) <= 255
password_expiration_enabled booleanNOT NULLFALSEJiHu-specific column
password_expires_in_days integerNOT NULL90JiHu-specific column
password_expires_notice_before_days integerNOT NULL7JiHu-specific column
product_analytics_enabled booleanNOT NULLFALSE
email_confirmation_setting smallintnull0
disable_admin_oauth_scopes booleanNOT NULLFALSE
default_preferred_language textNOT NULLCAST('en' AS text)CHECK char_length(default_preferred_language) <= 32
disable_download_button booleanNOT NULLFALSEJiHu-specific column
encrypted_telesign_customer_xid byteanull
encrypted_telesign_customer_xid_iv byteanull
encrypted_telesign_api_key byteanull
encrypted_telesign_api_key_iv byteanull
disable_personal_access_tokens booleanNOT NULLFALSE
max_terraform_state_size_bytes integerNOT NULL0CHECK max_terraform_state_size_bytes >= 0
bulk_import_enabled booleanNOT NULLFALSE
allow_runner_registration_token booleanNOT NULLTRUE
user_defaults_to_private_profile booleanNOT NULLFALSE
allow_possible_spam booleanNOT NULLFALSE
default_syntax_highlighting_theme integerNOT NULL1
search_max_shard_size_gb integerNOT NULL50
search_max_docs_denominator integerNOT NULL5000000
search_min_docs_before_rollover integerNOT NULL100000
deactivation_email_additional_text textnullCHECK char_length(deactivation_email_additional_text) <= 1000
jira_connect_public_key_storage_enabled booleanNOT NULLFALSE
git_rate_limit_users_alertlist integer[]NOT NULLCAST('{}' AS integer[])CHECK cardinality(git_rate_limit_users_alertlist) <= 100
allow_deploy_tokens_and_keys_with_external_authn booleanNOT NULLFALSE
security_policy_global_group_approvers_enabled booleanNOT NULLTRUE
projects_api_rate_limit_unauthenticated integerNOT NULL400
deny_all_requests_except_allowed booleanNOT NULLFALSE
product_analytics_data_collector_host textnullCHECK char_length(product_analytics_data_collector_host) <= 255
lock_memberships_to_saml booleanNOT NULLFALSE
gitlab_dedicated_instance booleanNOT NULLFALSE
update_runner_versions_enabled booleanNOT NULLTRUE
database_max_running_batched_background_migrations integerNOT NULL2
encrypted_product_analytics_configurator_connection_string byteanull
encrypted_product_analytics_configurator_connection_string_iv byteanull
silent_mode_enabled booleanNOT NULLFALSE
package_metadata_purl_types smallint[]nullCAST('{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17}' AS smallint[])
ci_max_includes integerNOT NULL150
remember_me_enabled booleanNOT NULLTRUE
diagramsnet_enabled booleanNOT NULLTRUE
diagramsnet_url textnullCAST('https://embed.diagrams.net' AS text)CHECK char_length(diagramsnet_url) <= 2048
allow_account_deletion booleanNOT NULLTRUE
wiki_asciidoc_allow_uri_includes booleanNOT NULLFALSE
namespace_aggregation_schedule_lease_duration_in_seconds integerNOT NULL300
vertex_ai_host textnullCHECK char_length(vertex_ai_host) <= 255
vertex_ai_project textnullCHECK char_length(vertex_ai_project) <= 255
delete_unconfirmed_users booleanNOT NULLFALSE
unconfirmed_users_delete_after_days integerNOT NULL7
default_branch_protection_defaults jsonbNOT NULLCAST('{}' AS jsonb)CHECK octet_length(CAST(default_branch_protection_defaults AS text)) <= 1024
gitlab_shell_operation_limit integernull600
protected_paths_for_get_request text[]NOT NULLCAST('{/users/sign_in_path}' AS text[])CHECK cardinality(protected_paths_for_get_request) <= 100
namespace_storage_forks_cost_factor double precisionNOT NULL1.0CHECK namespace_storage_forks_cost_factor >= CAST(0 AS double precision) AND namespace_storage_forks_cost_factor <= CAST(1 AS double precision)
bulk_import_max_download_file_size bigintNOT NULL5120
max_import_remote_file_size bigintNOT NULL10240
max_decompressed_archive_size integerNOT NULL25600CHECK max_decompressed_archive_size >= 0
sentry_clientside_traces_sample_rate double precisionNOT NULL0.0CHECK sentry_clientside_traces_sample_rate >= CAST(0 AS double precision) AND sentry_clientside_traces_sample_rate <= CAST(1 AS double precision)
prometheus_alert_db_indicators_settings jsonbnull
ci_max_total_yaml_size_bytes integerNOT NULL314572800
decompress_archive_file_timeout integerNOT NULL210
search_rate_limit_allowlist text[]NOT NULLCAST('{}' AS text[])
snowplow_database_collector_hostname textnullCHECK char_length(snowplow_database_collector_hostname) <= 255
container_registry_db_enabled booleanNOT NULLFALSE
failed_login_attempts_unlock_period_in_minutes integernullCHECK failed_login_attempts_unlock_period_in_minutes > 0
max_login_attempts integernullCHECK max_login_attempts > 0
project_jobs_api_rate_limit integerNOT NULL600
math_rendering_limits_enabled booleanNOT NULLTRUE
service_access_tokens_expiration_enforced booleanNOT NULLTRUE
make_profile_private booleanNOT NULLTRUE
enable_artifact_external_redirect_warning_page booleanNOT NULLTRUE
allow_project_creation_for_guest_and_below booleanNOT NULLTRUE
update_namespace_name_rate_limit smallintNOT NULL120
can_create_organization booleanNOT NULLTRUE
bulk_import_concurrent_pipeline_batch_limit smallintNOT NULL25
web_ide_oauth_application_id bigintnulloauth_applications.id 1:N · SET NULL
instance_level_ai_beta_features_enabled booleanNOT NULLFALSE
security_txt_content textnullCHECK char_length(security_txt_content) <= 2048
encrypted_arkose_labs_data_exchange_key byteanull
encrypted_arkose_labs_data_exchange_key_iv byteanull
rate_limits jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(rate_limits) = CAST('object' AS text)
enable_member_promotion_management booleanNOT NULLFALSE
lock_math_rendering_limits_enabled booleanNOT NULLFALSE
security_approval_policies_limit integerNOT NULL5
encrypted_arkose_labs_client_xid byteanull
encrypted_arkose_labs_client_xid_iv byteanull
encrypted_arkose_labs_client_secret byteanull
encrypted_arkose_labs_client_secret_iv byteanull
duo_features_enabled booleanNOT NULLTRUE
lock_duo_features_enabled booleanNOT NULLFALSE
asciidoc_max_includes smallintNOT NULL32
clickhouse jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(clickhouse) = CAST('object' AS text)
include_optional_metrics_in_service_ping booleanNOT NULLTRUE
zoekt_settings jsonbNOT NULLCAST('{}' AS jsonb)
service_ping_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(service_ping_settings) = CAST('object' AS text)
package_registry jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(package_registry) = CAST('object' AS text)
rate_limits_unauthenticated_git_http jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(rate_limits_unauthenticated_git_http) = CAST('object' AS text)
importers jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(importers) = CAST('object' AS text)
code_creation jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(code_creation) = CAST('object' AS text)
code_suggestions_api_rate_limit integerNOT NULL60
ai_action_api_rate_limit integerNOT NULL160
require_personal_access_token_expiry booleanNOT NULLTRUE
duo_workflow jsonbnullCAST('{}' AS jsonb)CHECK jsonb_typeof(duo_workflow) = CAST('object' AS text)
max_artifacts_content_include_size bigintNOT NULL5242880
max_number_of_vulnerabilities_per_project integernull
cluster_agents jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(cluster_agents) = CAST('object' AS text)
observability_backend_ssl_verification_enabled booleanNOT NULLTRUE
pages jsonbNOT NULLCAST('{}' AS jsonb)
security_policies jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(security_policies) = CAST('object' AS text)
spp_repository_pipeline_access booleanNOT NULLFALSE
lock_spp_repository_pipeline_access booleanNOT NULLFALSE
required_instance_ci_template textnullCHECK char_length(required_instance_ci_template) <= 1024
enforce_ci_inbound_job_token_scope_enabled booleanNOT NULLTRUE
allow_top_level_group_owners_to_create_service_accounts booleanNOT NULLFALSE
sign_in_restrictions jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(sign_in_restrictions) = CAST('object' AS text)
transactional_emails jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(transactional_emails) = CAST('object' AS text)
identity_verification_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(identity_verification_settings) = CAST('object' AS text)
integrations jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(integrations) = CAST('object' AS text)
user_seat_management jsonbNOT NULLCAST('{}' AS jsonb)
secret_detection_service_url textNOT NULLCAST('' AS text)CHECK char_length(secret_detection_service_url) <= 255
encrypted_secret_detection_service_auth_token byteanull
encrypted_secret_detection_service_auth_token_iv byteanull
resource_usage_limits jsonbNOT NULLCAST('{}' AS jsonb)
show_migrate_from_jenkins_banner booleanNOT NULLTRUE
encrypted_ci_job_token_signing_key byteanull
encrypted_ci_job_token_signing_key_iv byteanull
elasticsearch jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(elasticsearch) = CAST('object' AS text)
oauth_provider jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(oauth_provider) = CAST('object' AS text)
observability_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(observability_settings) = CAST('object' AS text)
search jsonbNOT NULLCAST('{}' AS jsonb)
anti_abuse_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(anti_abuse_settings) = CAST('object' AS text)
secret_push_protection_available booleannullFALSECHECK secret_push_protection_available IS NOT NULL
vscode_extension_marketplace jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(vscode_extension_marketplace) = CAST('object' AS text)
token_prefixes jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(token_prefixes) = CAST('object' AS text)
ci_cd_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(ci_cd_settings) = CAST('object' AS text)
database_reindexing jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(database_reindexing) = CAST('object' AS text)
duo_chat jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(duo_chat) = CAST('object' AS text)
group_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(group_settings) = CAST('object' AS text)
model_prompt_cache_enabled booleanNOT NULLTRUE
lock_model_prompt_cache_enabled booleanNOT NULLFALSE
response_limits jsonbNOT NULLCAST('{}' AS jsonb)
web_based_commit_signing_enabled booleanNOT NULLFALSE
lock_web_based_commit_signing_enabled booleanNOT NULLFALSE
tmp_asset_proxy_secret_key jsonbnull
editor_extensions jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(editor_extensions) = CAST('object' AS text)
security_and_compliance_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(security_and_compliance_settings) = CAST('object' AS text)
sdrs_url textnullCHECK char_length(sdrs_url) <= 255
default_profile_preferences jsonbNOT NULLCAST('{}' AS jsonb)
sdrs_enabled booleanNOT NULLFALSE
sdrs_jwt_signing_key jsonbnull
resource_access_tokens_settings jsonbNOT NULLCAST('{}' AS jsonb)
auto_duo_code_review_enabled booleanNOT NULLFALSE
lock_auto_duo_code_review_enabled booleanNOT NULLFALSE
workspaces_oauth_application_id bigintnulloauth_applications.id 1:N · SET NULL
usage_ping_generation_enabled booleanNOT NULLTRUE
duo_remote_flows_enabled booleanNOT NULLTRUE
lock_duo_remote_flows_enabled booleanNOT NULLFALSE
terraform_state_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(terraform_state_settings) = CAST('object' AS text)
duo_foundational_flows_enabled booleanNOT NULLTRUE
lock_duo_foundational_flows_enabled booleanNOT NULLFALSE
iframe_rendering_enabled booleanNOT NULLFALSE
iframe_rendering_allowlist textnullCHECK char_length(iframe_rendering_allowlist) <= 5000
database_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(database_settings) = CAST('object' AS text)
usage_billing jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(usage_billing) = CAST('object' AS text)
topology_service_settings jsonbNOT NULLCAST('{}' AS jsonb)
secrets_manager_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(secrets_manager_settings) = CAST('object' AS text)
duo_workflows_default_image_registry textnullCHECK char_length(duo_workflows_default_image_registry) <= 512
diagram_proxy jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(diagram_proxy) = CAST('object' AS text)
built_in_project_templates_enabled booleanNOT NULLTRUE
lock_built_in_project_templates_enabled booleanNOT NULLFALSE
tool_approval_for_session_enabled booleanNOT NULLFALSE
lock_tool_approval_for_session_enabled booleanNOT NULLFALSE
personal_access_token_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(personal_access_token_settings) = CAST('object' AS text)
diff_limits jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(diff_limits) = CAST('object' AS text)
markdown_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(markdown_settings) = CAST('object' AS text)
active_context_settings jsonbNOT NULLCAST('{}' AS jsonb)
duo_settings jsonbNOT NULLCAST('{}' AS jsonb)
mcp_server_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(mcp_server_settings) = CAST('object' AS text)
secrets_manager_instance_enrolled booleanNOT NULLFALSE
duo_template_project_id bigintnullprojects.id 1:N · SET NULL
default_security_tracked_context_quota integernull2
oauth_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(oauth_settings) = CAST('object' AS text)
logging_settings jsonbNOT NULLCAST('{}' AS jsonb)
dependency_management_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(dependency_management_settings) = CAST('object' AS text)
require_sha_for_merge booleanNOT NULLFALSE
lock_require_sha_for_merge booleanNOT NULLFALSE
ai_audit_events_storage_enabled booleanNOT NULLFALSE
lock_ai_audit_events_storage_enabled booleanNOT NULLFALSE
ai_gateway_url textnullCHECK char_length(ai_gateway_url) <= 2048
ai_gateway_timeout_seconds integernull60
enabled_instance_verbose_ai_logs booleanNOT NULLFALSE
duo_agent_platform_service_url textnullCHECK char_length(duo_agent_platform_service_url) <= 2048
self_hosted_duo_agent_platform_service_secure booleanNOT NULLTRUE
sidekiq_timezone_override textnullCHECK char_length(sidekiq_timezone_override) <= 255
nats_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(nats_settings) = CAST('object' AS text)
o11y_oauth_application_id bigintnulloauth_applications.id 1:N · SET NULL

Indexes

  • (duo_template_project_id) idx_application_settings_on_duo_template_project_id
  • (o11y_oauth_application_id) idx_application_settings_on_o11y_oauth_application_id
  • (custom_project_templates_group_id) index_application_settings_on_custom_project_templates_group_id
  • (file_template_project_id) index_application_settings_on_file_template_project_id
  • UNIQUE (push_rule_id) index_application_settings_on_push_rule_id
  • (usage_stats_set_by_user_id) index_application_settings_on_usage_stats_set_by_user_id
  • (web_ide_oauth_application_id) index_application_settings_web_ide_oauth_application_id
  • (workspaces_oauth_application_id) index_application_settings_workspaces_oauth_application_id

Referenced by

  • nothing

Table checks: container_registry_cleanup_tags_service_max_list_size >= 0; dependency_proxy_ttl_group_policy_worker_capacity >= 0; char_length(external_pipeline_validation_service_url) <= 255; failed_login_attempts_unlock_period_in_minutes > 0; cardinality(git_rate_limit_users_alertlist) <= 100; cardinality(git_rate_limit_users_allowlist) <= 100; max_decompressed_archive_size >= 0; max_login_attempts > 0; max_pages_custom_domains_per_project >= 0; max_terraform_state_size_bytes >= 0; cardinality(protected_paths_for_get_request) <= 100; container_registry_expiration_policies_worker_capacity >= 0; max_yaml_depth > 0; max_yaml_size_bytes > 0; jsonb_typeof(oauth_provider) = CAST('object' AS text); char_length(diagramsnet_url) <= 2048; char_length(vertex_ai_project) <= 255; char_length(CAST(kroki_url AS text)) <= 1024; char_length(database_grafana_tag) <= 255; char_length(gitpod_url) <= 255; char_length(static_objects_external_storage_auth_token_encrypted) <= 255; char_length(database_grafana_api_url) <= 255; char_length(snowplow_database_collector_hostname) <= 255; char_length(sentry_clientside_dsn) <= 255; char_length(jira_connect_proxy_url) <= 255; char_length(error_tracking_api_url) <= 255; char_length(sentry_dsn) <= 255; char_length(default_branch_name) <= 255; char_length(error_tracking_access_token_encrypted) <= 255; char_length(sdrs_url) <= 255; char_length(help_page_documentation_base_url) <= 255; char_length(content_validation_endpoint_url) <= 255; char_length(sentry_environment) <= 255; char_length(duo_workflows_default_image_registry) <= 512; char_length(personal_access_token_prefix) <= 20; char_length(rate_limiting_response_text) <= 255; char_length(product_analytics_data_collector_host) <= 255; char_length(globally_allowed_ips) <= 255; char_length(arkose_labs_namespace) <= 255; char_length(ai_gateway_url) <= 2048; char_length(encrypted_ci_jwt_signing_key_iv) <= 255; char_length(public_runner_releases_url) <= 255; char_length(cube_api_base_url) <= 512; char_length(iframe_rendering_allowlist) <= 5000; char_length(secret_detection_token_revocation_url) <= 255; char_length(maintenance_mode_message) <= 255; char_length(duo_agent_platform_service_url) <= 2048; char_length(secret_detection_revocation_token_types_url) <= 255; char_length(vertex_ai_host) <= 255; jsonb_typeof(anti_abuse_settings) = CAST('object' AS text); jsonb_typeof(dependency_management_settings) = CAST('object' AS text); namespace_storage_forks_cost_factor >= CAST(0 AS double precision) AND namespace_storage_forks_cost_factor <= CAST(1 AS double precision); sentry_clientside_traces_sample_rate >= CAST(0 AS double precision) AND sentry_clientside_traces_sample_rate <= CAST(1 AS double precision); jsonb_typeof(ci_cd_settings) = CAST('object' AS text); jsonb_typeof(clickhouse) = CAST('object' AS text); jsonb_typeof(cluster_agents) = CAST('object' AS text); jsonb_typeof(code_creation) = CAST('object' AS text); jsonb_typeof(database_reindexing) = CAST('object' AS text); jsonb_typeof(database_settings) = CAST('object' AS text); jsonb_typeof(diagram_proxy) = CAST('object' AS text); jsonb_typeof(diff_limits) = CAST('object' AS text); jsonb_typeof(duo_chat) = CAST('object' AS text); jsonb_typeof(duo_workflow) = CAST('object' AS text); jsonb_typeof(editor_extensions) = CAST('object' AS text); jsonb_typeof(elasticsearch) = CAST('object' AS text); jsonb_typeof(group_settings) = CAST('object' AS text); jsonb_typeof(importers) = CAST('object' AS text); jsonb_typeof(integrations) = CAST('object' AS text); jsonb_typeof(markdown_settings) = CAST('object' AS text); jsonb_typeof(mcp_server_settings) = CAST('object' AS text); jsonb_typeof(nats_settings) = CAST('object' AS text); jsonb_typeof(observability_settings) = CAST('object' AS text); jsonb_typeof(oauth_settings) = CAST('object' AS text); jsonb_typeof(package_registry) = CAST('object' AS text); jsonb_typeof(personal_access_token_settings) = CAST('object' AS text); jsonb_typeof(rate_limits) = CAST('object' AS text); jsonb_typeof(rate_limits_unauthenticated_git_http) = CAST('object' AS text); jsonb_typeof(secrets_manager_settings) = CAST('object' AS text); jsonb_typeof(security_policies) = CAST('object' AS text); jsonb_typeof(service_ping_settings) = CAST('object' AS text); jsonb_typeof(sign_in_restrictions) = CAST('object' AS text); jsonb_typeof(token_prefixes) = CAST('object' AS text); jsonb_typeof(transactional_emails) = CAST('object' AS text); jsonb_typeof(usage_billing) = CAST('object' AS text); jsonb_typeof(vscode_extension_marketplace) = CAST('object' AS text); char_length(deactivation_email_additional_text) <= 1000; char_length(secret_detection_service_url) <= 255; secret_push_protection_available IS NOT NULL; char_length(required_instance_ci_template) <= 1024; char_length(security_txt_content) <= 2048; char_length(container_registry_vendor) <= 255; char_length(spam_check_endpoint_url) <= 255; char_length(default_preferred_language) <= 32; char_length(jira_connect_application_key) <= 255; char_length(sidekiq_timezone_override) <= 255; char_length(container_registry_version) <= 255; char_length(encrypted_cloud_license_auth_token_iv) <= 255; jsonb_typeof(identity_verification_settings) = CAST('object' AS text); jsonb_typeof(security_and_compliance_settings) = CAST('object' AS text); jsonb_typeof(terraform_state_settings) = CAST('object' AS text); octet_length(CAST(default_branch_protection_defaults AS text)) <= 1024

approval 16 tables

Tables whose names start with approval_.

Entity-relationship diagram: approval_group_rules, approval_group_rules_groups, approval_group_rules_protected_branches, approval_group_rules_users, approval_merge_request_rule_sources, approval_merge_request_rules, approval_merge_request_rules_approved_approvers, approval_merge_request_rules_groups, approval_merge_request_rules_users, approval_policy_merge_request_bypass_events, approval_policy_rule_project_links, approval_policy_rules, approval_project_rules, approval_project_rules_groups, approval_project_rules_protected_branches, approval_project_rules_usersapproval_group_rulesid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzapprovals_requiredsmallintreport_typesmallintrule_typesmallintsecurity_orchestration_policy_configuration_id FKbigintscan_result_policy_id FKbigintnametextapplies_to_all_protected_branchesbooleanapproval_policy_rule_id FKbigintapproval_group_rules_groupsid PKbigintapproval_group_rule_id FKbigintgroup_id FKbigintapproval_group_rules_protected_branchesid PKbigintapproval_group_rule_id FKbigintprotected_branch_id FKbigintgroup_id FKbigintapproval_group_rules_usersid PKbigintapproval_group_rule_id FKbigintuser_id FKbigintgroup_id FKbigintapproval_merge_request_rule_sourcesid PKbigintapproval_merge_request_rule_id FKbigintapproval_project_rule_id FKbigintproject_id FKbigintapproval_merge_request_rulesid PKbigintcreated_attimestamptzupdated_attimestamptzmerge_request_id FKbigintapprovals_requiredsmallintnamevarcharrule_typesmallintreport_typesmallintsectiontextmodified_from_project_rulebooleanorchestration_policy_idxsmallintvulnerabilities_allowedsmallintscannerstext[]severity_levelstext[]vulnerability_statestext[]security_orchestration_policy_configuration_id FKbigintscan_result_policy_id FKbigintapplicable_post_mergebooleanproject_id FKbigintapproval_policy_rule_idbigintrole_approversinteger[]approval_policy_action_idxsmallintcoverage_minimum_thresholddouble precisionapproval_merge_request_rules_approved_approversid PKbigintapproval_merge_request_rule_id FKbigintuser_id FKbigintproject_id FKbigintapproval_merge_request_rules_groupsid PKbigintapproval_merge_request_rule_id FKbigintgroup_id FKbigintapproval_merge_request_rules_usersid PKbigintapproval_merge_request_rule_id FKbigintuser_id FKbigintproject_id FKbigintapproval_policy_merge_request_bypass_eventsid PKbigintproject_id FKbigintmerge_request_id FKbigintsecurity_policy_id FKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptzreasontextapproval_policy_rule_project_linksid PKbigintproject_id FKbigintapproval_policy_rule_id FKbigintapproval_policy_rulesid PKbigintsecurity_policy_id FKbigintcreated_attimestamptzupdated_attimestamptzrule_indexsmallinttypesmallintcontentjsonbsecurity_policy_management_project_id FKbigintapproval_project_rulesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintapprovals_requiredsmallintnamevarcharrule_typesmallintscannerstext[]vulnerabilities_allowedsmallintseverity_levelstext[]report_typesmallintvulnerability_statestext[]orchestration_policy_idxsmallintapplies_to_all_protected_branchesbooleansecurity_orchestration_policy_configuration_id FKbigintscan_result_policy_id FKbigintapproval_policy_rule_id FKbigintapproval_policy_action_idxsmallintcoverage_minimum_thresholddouble precisionapproval_project_rules_groupsid PKbigintapproval_project_rule_id FKbigintgroup_id FKbigintapproval_project_rules_protected_branchesapproval_project_rule_id PKbigintprotected_branch_id PKbigintproject_id FKbigintapproval_project_rules_usersid PKbigintapproval_project_rule_id FKbigintuser_id FKbigintproject_id FKbigintmerge_requestsnamespacesprojectsprotected_branchesscan_result_policiessecurity_orchestration_policy_configurationssecurity_policiesuserssecurity_orchestration_policy_configuration_idscan_result_policy_idproject_idmerge_request_idsecurity_policy_iduser_idmerge_request_idproject_idsecurity_policy_idsecurity_policy_management_project_idscan_result_policy_idapproval_policy_rule_idsecurity_orchestration_policy_configuration_idgroup_idproject_idapproval_merge_request_rule_iduser_idgroup_idapproval_merge_request_rule_idproject_idapproval_merge_request_rule_iduser_idapproval_policy_rule_idproject_idapproval_policy_rule_idscan_result_policy_idsecurity_orchestration_policy_configuration_idproject_idgroup_idapproval_group_rule_idprotected_branch_idapproval_group_rule_idgroup_idgroup_iduser_idapproval_group_rule_idproject_idapproval_project_rule_idapproval_merge_request_rule_idgroup_idapproval_project_rule_idproject_idapproval_project_rule_idprotected_branch_idproject_idapproval_project_rule_iduser_id

Relationships

approval_group_rules

12 cols · no RLS · line 14679View in 3D
  • Nullable foreign key scan_result_policy_idapproval_group_rules.scan_result_policy_id may be NULL, so the relationship to scan_result_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key approval_policy_rule_idapproval_group_rules.approval_policy_rule_id may be NULL, so the relationship to approval_policy_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key security_orchestration_policy_configuration_idapproval_group_rules.security_orchestration_policy_configuration_id may be NULL, so the relationship to security_orchestration_policy_configurations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK scan_result_policy_id, approval_policy_rule_id, security_orchestration_policy_configuration_idapproval_group_rules has several nullable FKs (scan_result_policy_id, approval_policy_rule_id, security_orchestration_policy_configuration_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
approvals_required smallintNOT NULL0
report_type smallintnull
rule_type smallintNOT NULL1
security_orchestration_policy_configuration_id bigintnullsecurity_orchestration_policy_configurations.id 1:N · CASCADE
scan_result_policy_id bigintnullscan_result_policies.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
applies_to_all_protected_branches booleanNOT NULLFALSE
approval_policy_rule_id bigintnullapproval_policy_rules.id 1:N · CASCADE

Indexes

  • UNIQUE (group_id, rule_type) WHERE rule_type = 4 idx_on_approval_group_rules_any_approver_type
  • UNIQUE (group_id, rule_type, name) idx_on_approval_group_rules_group_id_type_name
  • (security_orchestration_policy_configuration_id) idx_on_approval_group_rules_security_orch_policy
  • (approval_policy_rule_id) index_approval_group_rules_on_approval_policy_rule_id
  • (scan_result_policy_id) index_approval_group_rules_on_scan_result_policy_id

Referenced by

Table checks: char_length(name) <= 255

approval_group_rules_groups

3 cols · no RLS · line 14695View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
approval_group_rule_id bigintNOT NULLapproval_group_rules.id 1:N · CASCADE
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • UNIQUE (approval_group_rule_id, group_id) idx_on_approval_group_rules_groups_rule_group
  • (group_id) index_approval_group_rules_groups_on_group_id

Referenced by

  • nothing

approval_group_rules_protected_branches

4 cols · no RLS · line 14719View in 3D
  • Nullable foreign key group_idapproval_group_rules_protected_branches.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
approval_group_rule_id bigintNOT NULLapproval_group_rules.id 1:N · CASCADE
protected_branch_id bigintNOT NULLprotected_branches.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • UNIQUE (approval_group_rule_id, protected_branch_id) idx_on_approval_group_rules_protected_branch
  • (protected_branch_id) idx_on_protected_branch
  • (group_id) index_approval_group_rules_protected_branches_on_group_id

Referenced by

  • nothing

Table checks: group_id IS NOT NULL

approval_group_rules_users

4 cols · no RLS · line 14736View in 3D
  • Nullable foreign key group_idapproval_group_rules_users.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
approval_group_rule_id bigintNOT NULLapproval_group_rules.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • UNIQUE (approval_group_rule_id, user_id) idx_on_approval_group_rules_users_rule_user
  • (group_id) index_approval_group_rules_users_on_group_id
  • (user_id) index_approval_group_rules_users_on_user_id

Referenced by

  • nothing

Table checks: group_id IS NOT NULL

approval_merge_request_rule_sources

4 cols · no RLS · line 14753View in 3D
  • Nullable foreign key project_idapproval_merge_request_rule_sources.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
approval_merge_request_rule_id bigintNOT NULLapproval_merge_request_rules.id 1:1 · CASCADE
approval_project_rule_id bigintNOT NULLapproval_project_rules.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (approval_merge_request_rule_id) index_approval_merge_request_rule_sources_1
  • (approval_project_rule_id) index_approval_merge_request_rule_sources_2
  • (project_id) index_approval_merge_request_rule_sources_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

approval_merge_request_rules

23 cols · no RLS · line 14770View in 3D
  • Nullable foreign key security_orchestration_policy_configuration_idapproval_merge_request_rules.security_orchestration_policy_configuration_id may be NULL, so the relationship to security_orchestration_policy_configurations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key scan_result_policy_idapproval_merge_request_rules.scan_result_policy_id may be NULL, so the relationship to scan_result_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idapproval_merge_request_rules.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK security_orchestration_policy_configuration_id, scan_result_policy_id, project_idapproval_merge_request_rules has several nullable FKs (security_orchestration_policy_configuration_id, scan_result_policy_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
approvals_required smallintNOT NULL0
name varcharNOT NULL
rule_type smallintNOT NULL1
report_type smallintnull
section textnullCHECK char_length(section) <= 255
modified_from_project_rule booleanNOT NULLFALSE
orchestration_policy_idx smallintnull
vulnerabilities_allowed smallintNOT NULL0
scanners text[]NOT NULLCAST('{}' AS text[])
severity_levels text[]NOT NULLCAST('{}' AS text[])
vulnerability_states text[]NOT NULLCAST('{new_needs_triage,new_dismissed}' AS text[])
security_orchestration_policy_configuration_id bigintnullsecurity_orchestration_policy_configurations.id 1:N · CASCADE
scan_result_policy_id bigintnullscan_result_policies.id 1:N · SET NULL
applicable_post_merge booleannull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
approval_policy_rule_id bigintnull
role_approvers integer[]NOT NULLCAST('{}' AS integer[])CHECK role_approvers = CAST('{}' AS integer[]) OR role_approvers <@ ARRAY[20, 30, 40, 50, 60]
approval_policy_action_idx smallintNOT NULL0
coverage_minimum_threshold double precisionnullCHECK coverage_minimum_threshold IS NULL OR (coverage_minimum_threshold >= CAST(0 AS double precision) AND coverage_minimum_threshold <= CAST(100 AS double precision))

Indexes

  • (merge_request_id, security_orchestration_policy_configuration_id, id) idx_approval_merge_request_rules_on_mr_id_config_id_and_id
  • (scan_result_policy_id) idx_approval_merge_request_rules_on_scan_result_policy_id
  • (security_orchestration_policy_configuration_id, id, updated_at) idx_approval_mr_rules_on_config_id_and_id_and_updated_at
  • UNIQUE (merge_request_id, name, rule_type, security_orchestration_policy_configuration_id, orchestration_policy_idx, approval_policy_action_idx) WHERE report_type = ANY(ARRAY[2, 4, 5]) idx_unique_approval_mr_rules_for_scan_result_policy
  • (approval_policy_rule_id) index_approval_merge_request_rules_on_approval_policy_rule_id
  • (project_id) index_approval_merge_request_rules_on_project_id
  • (security_orchestration_policy_configuration_id, approval_policy_rule_id, id) index_approval_mr_rules_on_project_id_policy_rule_id_and_id
  • UNIQUE (merge_request_id, name) WHERE rule_type = 2 AND section IS NULL index_approval_rule_name_for_code_owners_rule_type
  • UNIQUE (merge_request_id, name, section) WHERE rule_type = 2 index_approval_rule_name_for_sectional_code_owners_rule_type
  • (merge_request_id) WHERE rule_type = 2 index_approval_rules_code_owners_rule_type
  • (created_at) WHERE rule_type = 2 AND section <> CAST('codeowners' AS text) index_created_at_on_codeowner_approval_merge_request_rules
  • (id) WHERE report_type = 4 scan_finding_approval_mr_rule_index_id
  • (merge_request_id, created_at) WHERE report_type = 4 scan_finding_approval_mr_rule_index_mr_id_and_created_at
  • UNIQUE (merge_request_id, rule_type, applicable_post_merge) WHERE rule_type = 4 unique_any_approver_merge_request_rule_type_post_merge

Referenced by

Table checks: coverage_minimum_threshold IS NULL OR (coverage_minimum_threshold >= CAST(0 AS double precision) AND coverage_minimum_threshold <= CAST(100 AS double precision)); char_length(section) <= 255; project_id IS NOT NULL; role_approvers = CAST('{}' AS integer[]) OR role_approvers <@ ARRAY[20, 30, 40, 50, 60]

approval_merge_request_rules_approved_approvers

4 cols · no RLS · line 14800View in 3D
  • Nullable foreign key project_idapproval_merge_request_rules_approved_approvers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
approval_merge_request_rule_id bigintNOT NULLapproval_merge_request_rules.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) idx_approval_merge_request_rules_approved_approvers_project_id
  • UNIQUE (approval_merge_request_rule_id, user_id) index_approval_merge_request_rules_approved_approvers_1
  • (user_id) index_approval_merge_request_rules_approved_approvers_2

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

approval_merge_request_rules_groups

3 cols · no RLS · line 14817View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
approval_merge_request_rule_id bigintNOT NULLapproval_merge_request_rules.id 1:N · CASCADE
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • UNIQUE (approval_merge_request_rule_id, group_id) index_approval_merge_request_rules_groups_1
  • (group_id) index_approval_merge_request_rules_groups_2

Referenced by

  • nothing

approval_merge_request_rules_users

4 cols · no RLS · line 14841View in 3D
  • Nullable foreign key project_idapproval_merge_request_rules_users.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
approval_merge_request_rule_id bigintNOT NULLapproval_merge_request_rules.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (approval_merge_request_rule_id, user_id) index_approval_merge_request_rules_users_1
  • (user_id) index_approval_merge_request_rules_users_2
  • (project_id) index_approval_merge_request_rules_users_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

approval_policy_merge_request_bypass_events

8 cols · no RLS · line 14858View in 3D
  • Nullable foreign key user_idapproval_policy_merge_request_bypass_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
security_policy_id bigintNOT NULLsecurity_policies.id 1:N · CASCADE
user_id bigintnullusers.id 1:N · SET NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
reason textNOT NULLCHECK length(pg_catalog.btrim(reason)) >= 1 AND length(pg_catalog.btrim(reason)) <= 1024

Indexes

  • UNIQUE (project_id, merge_request_id, security_policy_id) idx_approval_policy_mr_bypass_events_on_project_mr_policy
  • (merge_request_id) index_approval_policy_merge_request_bypass_events_on_mr_id
  • (security_policy_id) index_approval_policy_merge_request_bypass_events_on_policy_id
  • (user_id) index_approval_policy_merge_request_bypass_events_on_user_id

Referenced by

  • nothing

Table checks: length(pg_catalog.btrim(reason)) >= 1 AND length(pg_catalog.btrim(reason)) <= 1024

approval_policy_rules

8 cols · no RLS · line 14894View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
security_policy_id bigintNOT NULLsecurity_policies.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
rule_index smallintNOT NULL
type smallintNOT NULL
content jsonbNOT NULLCAST('{}' AS jsonb)
security_policy_management_project_id bigintNOT NULLprojects.id 1:N · CASCADE

Indexes

  • (security_policy_id, id) idx_approval_policy_rules_security_policy_id_id
  • (security_policy_management_project_id) index_approval_policy_rules_on_policy_management_project_id
  • UNIQUE (security_policy_id, rule_index) index_approval_policy_rules_on_unique_policy_rule_index

Referenced by

approval_project_rules

19 cols · no RLS · line 14914View in 3D
  • Nullable foreign key approval_policy_rule_idapproval_project_rules.approval_policy_rule_id may be NULL, so the relationship to approval_policy_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key scan_result_policy_idapproval_project_rules.scan_result_policy_id may be NULL, so the relationship to scan_result_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key security_orchestration_policy_configuration_idapproval_project_rules.security_orchestration_policy_configuration_id may be NULL, so the relationship to security_orchestration_policy_configurations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK approval_policy_rule_id, scan_result_policy_id, security_orchestration_policy_configuration_idapproval_project_rules has several nullable FKs (approval_policy_rule_id, scan_result_policy_id, security_orchestration_policy_configuration_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
approvals_required smallintNOT NULL0
name varcharNOT NULL
rule_type smallintNOT NULL0
scanners text[]nullCAST('{}' AS text[])
vulnerabilities_allowed smallintNOT NULL0
severity_levels text[]NOT NULLCAST('{}' AS text[])
report_type smallintnull
vulnerability_states text[]NOT NULLCAST('{new_needs_triage,new_dismissed}' AS text[])
orchestration_policy_idx smallintnull
applies_to_all_protected_branches booleanNOT NULLFALSE
security_orchestration_policy_configuration_id bigintnullsecurity_orchestration_policy_configurations.id 1:N · CASCADE
scan_result_policy_id bigintnullscan_result_policies.id 1:N · CASCADE
approval_policy_rule_id bigintnullapproval_policy_rules.id 1:N · CASCADE
approval_policy_action_idx smallintNOT NULL0
coverage_minimum_threshold double precisionnullCHECK coverage_minimum_threshold IS NULL OR (coverage_minimum_threshold >= CAST(0 AS double precision) AND coverage_minimum_threshold <= CAST(100 AS double precision))

Indexes

  • UNIQUE (project_id) WHERE rule_type = 3 any_approver_project_rule_type_unique_index
  • (security_orchestration_policy_configuration_id, approval_policy_rule_id) idx_approval_project_rules_on_config_id_and_policy_rule_id
  • (security_orchestration_policy_configuration_id, id) idx_approval_project_rules_on_configuration_id_and_id
  • (scan_result_policy_id) idx_approval_project_rules_on_scan_result_policy_id
  • (approval_policy_rule_id) index_approval_project_rules_on_approval_policy_rule_id
  • (id) WHERE rule_type = 0 index_approval_project_rules_on_id_with_regular_type
  • (project_id, rule_type) index_approval_project_rules_on_project_id_and_rule_type
  • (security_orchestration_policy_configuration_id, project_id, id) index_approval_project_rules_on_project_id_config_id_and_id
  • (rule_type) index_approval_project_rules_on_rule_type
  • (report_type) index_approval_project_rules_report_type
  • (created_at, project_id) WHERE report_type = 4 scan_finding_approval_project_rule_index_created_at_project_id
  • (project_id) WHERE report_type = 4 scan_finding_approval_project_rule_index_project_id
  • (id) WHERE report_type = ANY(ARRAY[2, 4]) AND security_orchestration_policy_configuration_id IS NULL tmp_idx_orphaned_approval_project_rules

Referenced by

Table checks: coverage_minimum_threshold IS NULL OR (coverage_minimum_threshold >= CAST(0 AS double precision) AND coverage_minimum_threshold <= CAST(100 AS double precision))

approval_project_rules_groups

3 cols · no RLS · line 14937View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
approval_project_rule_id bigintNOT NULLapproval_project_rules.id 1:N · CASCADE
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • UNIQUE (approval_project_rule_id, group_id) index_approval_project_rules_groups_1
  • (group_id) index_approval_project_rules_groups_2

Referenced by

  • nothing

approval_project_rules_protected_branches

3 cols · no RLS · line 14961View in 3D
  • Nullable foreign key project_idapproval_project_rules_protected_branches.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
approval_project_rule_id PKbigintNOT NULLapproval_project_rules.id 1:N · CASCADE
protected_branch_id PKbigintNOT NULLprotected_branches.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_approval_project_rules_protected_branches_on_project_id
  • (protected_branch_id) index_approval_project_rules_protected_branches_pb_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

approval_project_rules_users

4 cols · no RLS · line 14968View in 3D
  • Nullable foreign key project_idapproval_project_rules_users.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
approval_project_rule_id bigintNOT NULLapproval_project_rules.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (approval_project_rule_id, user_id) index_approval_project_rules_users_1
  • (user_id) index_approval_project_rules_users_2
  • (project_id) index_approval_project_rules_users_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

ascp 5 tables

Tables whose names start with ascp_.

Entity-relationship diagram: ascp_component_dependencies, ascp_components, ascp_scans, ascp_security_contexts, ascp_security_guidelinesascp_component_dependenciesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintcomponent_id FKbigintdependency_id FKbigintascp_componentsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintscan_id FKbiginttitletextsub_directorytextdescriptiontextexpected_user_behaviortextascp_scansid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintbase_scan_id FKbigintscan_sequenceintegerscan_typesmallintcommit_shatextbase_commit_shatextascp_security_contextsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintcomponent_id FKbigintscan_id FKbigintsummarytextauthentication_modeltextauthorization_modeltextdata_sensitivitytextascp_security_guidelinesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintsecurity_context_id FKbigintscan_id FKbigintseverity_if_violatedsmallintnametextoperationtextlegitimate_usetextsecurity_boundarytextbusiness_contexttextbase_scan_idscan_idcomponent_iddependency_idcomponent_idscan_idscan_idsecurity_context_id

Relationships

ascp_component_dependencies

6 cols · no RLS · line 15085View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
component_id bigintNOT NULLascp_components.id 1:N · CASCADE
dependency_id bigintNOT NULLascp_components.id 1:N · CASCADE

Indexes

  • UNIQUE (project_id, component_id, dependency_id) idx_ascp_component_deps_on_proj_comp_dep
  • (component_id) index_ascp_component_dependencies_on_component_id
  • (dependency_id) index_ascp_component_dependencies_on_dependency_id

Referenced by

  • nothing

ascp_components

9 cols · no RLS · line 15103View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
scan_id bigintNOT NULLascp_scans.id 1:N · CASCADE
title textNOT NULLCHECK char_length(title) <= 255
sub_directory textNOT NULLCHECK char_length(sub_directory) <= 1024
description textnullCHECK char_length(description) <= 4096
expected_user_behavior textnullCHECK char_length(expected_user_behavior) <= 4096

Indexes

  • UNIQUE (project_id, scan_id, sub_directory) idx_ascp_components_on_project_scan_subdir
  • (scan_id) index_ascp_components_on_scan_id

Referenced by

Table checks: char_length(expected_user_behavior) <= 4096; char_length(title) <= 255; char_length(description) <= 4096; char_length(sub_directory) <= 1024

ascp_scans

9 cols · no RLS · line 15128View in 3D
  • Nullable foreign key base_scan_idascp_scans.base_scan_id may be NULL, so the relationship to ascp_scans is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
base_scan_id bigintnullascp_scans.id 1:N · SET NULL
scan_sequence integerNOT NULL
scan_type smallintNOT NULL0
commit_sha textNOT NULLCHECK char_length(commit_sha) <= 64
base_commit_sha textnullCHECK char_length(base_commit_sha) <= 64

Indexes

  • (base_scan_id) index_ascp_scans_on_base_scan_id
  • (commit_sha) index_ascp_scans_on_commit_sha
  • UNIQUE (project_id, scan_sequence) index_ascp_scans_on_project_id_and_scan_sequence
  • (project_id, scan_type) index_ascp_scans_on_project_id_and_scan_type

Referenced by

Table checks: char_length(commit_sha) <= 64; char_length(base_commit_sha) <= 64

ascp_security_contexts

10 cols · no RLS · line 15151View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
component_id bigintNOT NULLascp_components.id 1:N · CASCADE
scan_id bigintNOT NULLascp_scans.id 1:N · CASCADE
summary textnullCHECK char_length(summary) <= 4096
authentication_model textnullCHECK char_length(authentication_model) <= 1024
authorization_model textnullCHECK char_length(authorization_model) <= 1024
data_sensitivity textnullCHECK char_length(data_sensitivity) <= 255

Indexes

  • UNIQUE (project_id, scan_id, component_id) idx_ascp_security_contexts_on_project_scan_comp
  • (component_id) index_ascp_security_contexts_on_component_id
  • (scan_id) index_ascp_security_contexts_on_scan_id

Referenced by

Table checks: char_length(authentication_model) <= 1024; char_length(summary) <= 4096; char_length(data_sensitivity) <= 255; char_length(authorization_model) <= 1024

ascp_security_guidelines

12 cols · no RLS · line 15177View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
security_context_id bigintNOT NULLascp_security_contexts.id 1:N · CASCADE
scan_id bigintNOT NULLascp_scans.id 1:N · CASCADE
severity_if_violated smallintNOT NULL0
name textNOT NULLCHECK char_length(name) <= 255
operation textNOT NULLCHECK char_length(operation) <= 1024
legitimate_use textnullCHECK char_length(legitimate_use) <= 4096
security_boundary textnullCHECK char_length(security_boundary) <= 4096
business_context textnullCHECK char_length(business_context) <= 4096

Indexes

  • (project_id, security_context_id) idx_ascp_security_guidelines_on_proj_ctx
  • (scan_id) index_ascp_security_guidelines_on_scan_id
  • (security_context_id) index_ascp_security_guidelines_on_security_context_id

Referenced by

  • nothing

Table checks: char_length(legitimate_use) <= 4096; char_length(name) <= 255; char_length(operation) <= 1024; char_length(business_context) <= 4096; char_length(security_boundary) <= 4096

board 5 tables

Tables whose names start with board_.

Entity-relationship diagram: board_assignees, board_group_recent_visits, board_labels, board_project_recent_visits, board_user_preferencesboard_assigneesid PKbigintboard_id FKbigintassignee_id FKbigintgroup_id FKbigintproject_id FKbigintboard_group_recent_visitsid PKbigintcreated_attimestamptzupdated_attimestamptzuser_id FKbigintboard_id FKbigintgroup_id FKbigintboard_labelsid PKbigintboard_id FKbigintlabel_id FKbigintgroup_id FKbigintproject_id FKbigintboard_project_recent_visitsid PKbigintcreated_attimestamptzupdated_attimestamptzuser_id FKbigintproject_id FKbigintboard_id FKbigintboard_user_preferencesid PKbigintuser_id FKbigintboard_id FKbiginthide_labelsbooleancreated_attimestamptzupdated_attimestamptzgroup_id FKbigintproject_id FKbigintboardslabelsnamespacesprojectsusersproject_idgroup_idassignee_idboard_iduser_idboard_idgroup_idgroup_idproject_idlabel_idboard_idproject_idboard_iduser_idgroup_idproject_iduser_idboard_id

Relationships

board_assignees

5 cols · no RLS · line 15820View in 3D
  • Nullable foreign key project_idboard_assignees.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idboard_assignees.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
board_id bigintNOT NULLboards.id 1:N · CASCADE
assignee_id bigintNOT NULLusers.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE

Indexes

  • (assignee_id) index_board_assignees_on_assignee_id
  • UNIQUE (board_id, assignee_id) index_board_assignees_on_board_id_and_assignee_id
  • (group_id) index_board_assignees_on_group_id
  • (project_id) index_board_assignees_on_project_id

Referenced by

  • nothing

Table checks: num_nonnulls(group_id, project_id) = 1

board_group_recent_visits

6 cols · no RLS · line 15838View in 3D
  • Nullable foreign key user_idboard_group_recent_visits.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key board_idboard_group_recent_visits.board_id may be NULL, so the relationship to boards is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idboard_group_recent_visits.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK user_id, board_id, group_idboard_group_recent_visits has several nullable FKs (user_id, board_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
user_id bigintnullusers.id 1:N · CASCADECHECK user_id IS NOT NULL
board_id bigintnullboards.id 1:N · CASCADECHECK board_id IS NOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • (board_id) index_board_group_recent_visits_on_board_id
  • (group_id) index_board_group_recent_visits_on_group_id
  • UNIQUE (user_id, group_id, board_id) index_board_group_recent_visits_on_user_group_and_board

Referenced by

  • nothing

Table checks: user_id IS NOT NULL; group_id IS NOT NULL; board_id IS NOT NULL

board_labels

5 cols · no RLS · line 15859View in 3D
  • Nullable foreign key group_idboard_labels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idboard_labels.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
board_id bigintNOT NULLboards.id 1:N · CASCADE
label_id bigintNOT NULLlabels.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE

Indexes

  • UNIQUE (board_id, label_id) index_board_labels_on_board_id_and_label_id
  • (group_id) index_board_labels_on_group_id
  • (label_id) index_board_labels_on_label_id
  • (project_id) index_board_labels_on_project_id

Referenced by

  • nothing

Table checks: num_nonnulls(group_id, project_id) = 1

board_project_recent_visits

6 cols · no RLS · line 15877View in 3D
  • Nullable foreign key project_idboard_project_recent_visits.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key board_idboard_project_recent_visits.board_id may be NULL, so the relationship to boards is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idboard_project_recent_visits.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, board_id, user_idboard_project_recent_visits has several nullable FKs (project_id, board_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
user_id bigintnullusers.id 1:N · CASCADECHECK user_id IS NOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
board_id bigintnullboards.id 1:N · CASCADECHECK board_id IS NOT NULL

Indexes

  • (board_id) index_board_project_recent_visits_on_board_id
  • (project_id) index_board_project_recent_visits_on_project_id
  • UNIQUE (user_id, project_id, board_id) index_board_project_recent_visits_on_user_project_and_board

Referenced by

  • nothing

Table checks: board_id IS NOT NULL; project_id IS NOT NULL; user_id IS NOT NULL

board_user_preferences

8 cols · no RLS · line 15898View in 3D
  • Nullable foreign key group_idboard_user_preferences.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idboard_user_preferences.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
board_id bigintNOT NULLboards.id 1:N · CASCADE
hide_labels booleannull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE

Indexes

  • (board_id) index_board_user_preferences_on_board_id
  • (group_id) index_board_user_preferences_on_group_id
  • (project_id) index_board_user_preferences_on_project_id
  • UNIQUE (user_id, board_id) index_board_user_preferences_on_user_id_and_board_id

Referenced by

  • nothing

Table checks: num_nonnulls(group_id, project_id) = 1

boards 8 tables

Tables whose names start with boards_.

Entity-relationship diagram: boards, boards_epic_board_labels, boards_epic_board_positions, boards_epic_board_recent_visits, boards_epic_boards, boards_epic_list_user_preferences, boards_epic_lists, boards_epic_user_preferencesboardsid PKbigintproject_id FKbigintcreated_attimestampupdated_attimestampnamevarcharmilestone_idbigintgroup_id FKbigintweightintegerhide_backlog_listbooleanhide_closed_listbooleaniteration_idbigintiteration_cadence_id FKbigintboards_epic_board_labelsid PKbigintepic_board_id FKbigintlabel_id FKbigintgroup_id FKbigintboards_epic_board_positionsid PKbigintepic_board_id FKbigintepic_id FKbigintrelative_positionintegercreated_attimestamptzupdated_attimestamptzgroup_id FKbigintboards_epic_board_recent_visitsid PKbigintuser_id FKbigintepic_board_id FKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzboards_epic_boardsid PKbiginthide_backlog_listbooleanhide_closed_listbooleangroup_id FKbigintcreated_attimestamptzupdated_attimestamptznametextdisplay_colorsbooleanboards_epic_list_user_preferencesid PKbigintuser_id FKbigintepic_list_id FKbigintcreated_attimestamptzupdated_attimestamptzcollapsedbooleangroup_id FKbigintboards_epic_listsid PKbigintcreated_attimestamptzupdated_attimestamptzepic_board_id FKbigintlabel_id FKbigintpositionintegerlist_typesmallintgroup_id FKbigintboards_epic_user_preferencesid PKbigintboard_id FKbigintuser_id FKbigintepic_id FKbigintcollapsedbooleangroup_id FKbigintepicsiterations_cadenceslabelsnamespacesprojectsusersiteration_cadence_idproject_idgroup_idgroup_idgroup_idlabel_idepic_board_idgroup_idepic_idepic_board_iduser_idgroup_idepic_board_idgroup_idepic_board_idlabel_idgroup_idboard_idepic_iduser_idepic_list_idgroup_iduser_id

Relationships

boards

12 cols · no RLS · line 15919View in 3D
  • Nullable foreign key iteration_cadence_idboards.iteration_cadence_id may be NULL, so the relationship to iterations_cadences is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idboards.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idboards.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK iteration_cadence_id, project_id, group_idboards has several nullable FKs (iteration_cadence_id, project_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestampNOT NULL
updated_at timestampNOT NULL
name varcharNOT NULLCAST('Development' AS varchar)
milestone_id bigintnull
group_id bigintnullnamespaces.id 1:N · CASCADE
weight integernull
hide_backlog_list booleanNOT NULLFALSE
hide_closed_list booleanNOT NULLFALSE
iteration_id bigintnull
iteration_cadence_id bigintnulliterations_cadences.id 1:N · CASCADE

Indexes

  • (group_id) index_boards_on_group_id
  • (iteration_cadence_id) index_boards_on_iteration_cadence_id
  • (iteration_id) index_boards_on_iteration_id
  • (milestone_id) index_boards_on_milestone_id
  • (project_id) index_boards_on_project_id

Referenced by

Table checks: num_nonnulls(group_id, project_id) = 1

boards_epic_board_labels

4 cols · no RLS · line 15935View in 3D
  • Nullable foreign key group_idboards_epic_board_labels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
epic_board_id bigintNOT NULLboards_epic_boards.id 1:N · CASCADE
label_id bigintNOT NULLlabels.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • (epic_board_id) index_boards_epic_board_labels_on_epic_board_id
  • (group_id) index_boards_epic_board_labels_on_group_id
  • (label_id) index_boards_epic_board_labels_on_label_id

Referenced by

  • nothing

Table checks: group_id IS NOT NULL

boards_epic_board_positions

7 cols · no RLS · line 15952View in 3D
  • Nullable foreign key group_idboards_epic_board_positions.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
epic_board_id bigintNOT NULLboards_epic_boards.id 1:N · CASCADE
epic_id bigintNOT NULLepics.id 1:N · CASCADE
relative_position integernull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • UNIQUE (epic_board_id, epic_id) index_boards_epic_board_positions_on_epic_board_id_and_epic_id
  • (epic_id) index_boards_epic_board_positions_on_epic_id
  • (group_id) index_boards_epic_board_positions_on_group_id
  • (epic_board_id, epic_id, relative_position) index_boards_epic_board_positions_on_scoped_relative_position

Referenced by

  • nothing

Table checks: group_id IS NOT NULL

boards_epic_board_recent_visits

6 cols · no RLS · line 15972View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
epic_board_id bigintNOT NULLboards_epic_boards.id 1:N · CASCADE
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (epic_board_id) index_boards_epic_board_recent_visits_on_epic_board_id
  • (group_id) index_boards_epic_board_recent_visits_on_group_id
  • UNIQUE (user_id, group_id, epic_board_id) index_epic_board_recent_visits_on_user_group_and_board

Referenced by

  • nothing

boards_epic_boards

8 cols · no RLS · line 15990View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
hide_backlog_list booleanNOT NULLFALSE
hide_closed_list booleanNOT NULLFALSE
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCAST('Development' AS text)CHECK char_length(name) <= 255
display_colors booleanNOT NULLTRUE

Indexes

  • (group_id) index_boards_epic_boards_on_group_id

Referenced by

Table checks: char_length(name) <= 255

boards_epic_list_user_preferences

7 cols · no RLS · line 16011View in 3D
  • Nullable foreign key group_idboards_epic_list_user_preferences.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
epic_list_id bigintNOT NULLboards_epic_lists.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
collapsed booleanNOT NULLFALSE
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • (epic_list_id) index_boards_epic_list_user_preferences_on_epic_list_id
  • (group_id) index_boards_epic_list_user_preferences_on_group_id
  • UNIQUE (user_id, epic_list_id) index_epic_board_list_preferences_on_user_and_list

Referenced by

  • nothing

Table checks: group_id IS NOT NULL

boards_epic_lists

8 cols · no RLS · line 16031View in 3D
  • Nullable foreign key group_idboards_epic_lists.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key label_idboards_epic_lists.label_id may be NULL, so the relationship to labels is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK group_id, label_idboards_epic_lists has several nullable FKs (group_id, label_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
epic_board_id bigintNOT NULLboards_epic_boards.id 1:N · CASCADE
label_id bigintnulllabels.id 1:N · CASCADE
position integernull
list_type smallintNOT NULL1
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • (epic_board_id) index_boards_epic_lists_on_epic_board_id
  • UNIQUE (epic_board_id, label_id) WHERE list_type = 1 index_boards_epic_lists_on_epic_board_id_and_label_id
  • (group_id) index_boards_epic_lists_on_group_id
  • (label_id) index_boards_epic_lists_on_label_id

Referenced by

Table checks: list_type <> 1 OR (position IS NOT NULL AND position >= 0); group_id IS NOT NULL

boards_epic_user_preferences

6 cols · no RLS · line 16053View in 3D
  • Nullable foreign key group_idboards_epic_user_preferences.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
board_id bigintNOT NULLboards.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
epic_id bigintNOT NULLepics.id 1:N · CASCADE
collapsed booleanNOT NULLFALSE
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • UNIQUE (board_id, user_id, epic_id) index_boards_epic_user_preferences_on_board_user_epic_unique
  • (epic_id) index_boards_epic_user_preferences_on_epic_id
  • (group_id) index_boards_epic_user_preferences_on_group_id
  • (user_id) index_boards_epic_user_preferences_on_user_id

Referenced by

  • nothing

Table checks: group_id IS NOT NULL

bulk 11 tables

Tables whose names start with bulk_.

Entity-relationship diagram: bulk_import_batch_trackers, bulk_import_configurations, bulk_import_entities, bulk_import_export_batches, bulk_import_export_upload_upload_states, bulk_import_export_upload_uploads, bulk_import_export_uploads, bulk_import_exports, bulk_import_failures, bulk_import_trackers, bulk_importsbulk_import_batch_trackersid PKbiginttracker_id FKbigintcreated_attimestamptzupdated_attimestamptzstatussmallintbatch_numberintegerfetched_objects_countintegerimported_objects_countintegererrortextorganization_id FKbigintnamespace_id FKbigintproject_id FKbigintbulk_import_configurationsid PKbigintbulk_import_id FKbigintencrypted_urltextencrypted_url_ivtextencrypted_access_tokentextencrypted_access_token_ivtextcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintbulk_import_entitiesid PKbigintbulk_import_id FKbigintparent_id FKbigintnamespace_id FKbigintproject_id FKbigintsource_typesmallintsource_full_pathtextdestination_nametextdestination_namespacetextstatussmallintjidtextcreated_attimestamptzupdated_attimestamptzmigrate_projectsbooleanhas_failuresbooleanmigrate_membershipsbooleanorganization_id FKbigintsource_xidbigintbulk_import_export_batchesid PKbigintexport_id FKbigintcreated_attimestamptzupdated_attimestamptzstatussmallintbatch_numberintegerobjects_countintegererrortextproject_id FKbigintgroup_id FKbigintbulk_import_export_upload_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzbulk_import_export_upload_upload_id FKbigintproject_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextbulk_import_export_upload_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextbulk_import_export_uploadsid PKbigintexport_id FKbigintupdated_attimestamptzexport_filetextbatch_id FKbigintproject_id FKbigintgroup_id FKbigintbulk_import_exportsid PKbigintgroup_id FKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzstatussmallintrelationtextjidtexterrortextbatchedbooleanbatches_countintegertotal_objects_countintegeruser_id FKbigintoffline_export_id FKbigintorganization_idbigintbulk_import_failuresid PKbigintbulk_import_entity_id FKbigintcreated_attimestamptzpipeline_classtextexception_classtextexception_messagetextcorrelation_id_valuetextpipeline_steptextsource_urltextsource_titletextsubrelationtextproject_id FKbigintnamespace_id FKbigintorganization_id FKbigintbulk_import_trackersid PKbigintbulk_import_entity_id FKbigintrelationtextnext_pagetexthas_next_pagebooleanjidtextstagesmallintstatussmallintcreated_attimestamptzupdated_attimestamptzbatchedbooleansource_objects_countbigintfetched_objects_countbigintimported_objects_countbigintproject_id FKbigintnamespace_id FKbigintorganization_id FKbigintbulk_importsid PKbigintuser_id FKbigintsource_typesmallintstatussmallintcreated_attimestamptzupdated_attimestamptzsource_versiontextsource_enterprisebooleanhas_failuresbooleanorganization_id FKbigintimport_offline_exportsnamespacesorganizationsprojectsusersparent_idbulk_import_export_upload_upload_idproject_idoffline_export_idproject_idgroup_iduser_idorganization_iduser_idorganization_idbulk_import_idorganization_idnamespace_idbulk_import_idproject_idgroup_idproject_idexport_idgroup_idbatch_idproject_idexport_idproject_idorganization_idnamespace_idbulk_import_entity_idorganization_idproject_idnamespace_idbulk_import_entity_idproject_idorganization_idnamespace_idtracker_id

Relationships

bulk_import_batch_trackers

12 cols · no RLS · line 16109View in 3D
  • Nullable foreign key project_idbulk_import_batch_trackers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idbulk_import_batch_trackers.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idbulk_import_batch_trackers.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
tracker_id bigintNOT NULLbulk_import_trackers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
batch_number integerNOT NULL0
fetched_objects_count integerNOT NULL0
imported_objects_count integerNOT NULL0
error textnullCHECK char_length(error) <= 255
organization_id bigintnullorganizations.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE

Indexes

  • (namespace_id) idx_bulk_import_batch_trackers_on_namespace_id
  • (organization_id) idx_bulk_import_batch_trackers_on_organization_id
  • (project_id) idx_bulk_import_batch_trackers_on_project_id
  • UNIQUE (tracker_id, batch_number, organization_id) idx_bulk_import_batch_trackers_on_tracker_batch_org_uniq
  • (tracker_id, status) index_batch_trackers_on_tracker_id_status
  • (tracker_id, updated_at) index_bulk_import_batch_trackers_on_tracker_id_and_updated_at

Referenced by

  • nothing

Table checks: num_nonnulls(namespace_id, organization_id, project_id) = 1; char_length(error) <= 255

bulk_import_configurations

9 cols · no RLS · line 16135View in 3D
  • Nullable foreign key organization_idbulk_import_configurations.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
bulk_import_id bigintNOT NULLbulk_imports.id 1:N · CASCADE
encrypted_url textnull
encrypted_url_iv textnull
encrypted_access_token textnull
encrypted_access_token_iv textnull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • (bulk_import_id) index_bulk_import_configurations_on_bulk_import_id
  • (organization_id) index_bulk_import_configurations_on_organization_id

Referenced by

  • nothing

Table checks: organization_id IS NOT NULL

bulk_import_entities

18 cols · no RLS · line 16157View in 3D
  • Nullable foreign key organization_idbulk_import_entities.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idbulk_import_entities.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key parent_idbulk_import_entities.parent_id may be NULL, so the relationship to bulk_import_entities is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idbulk_import_entities.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK organization_id, namespace_id, parent_id, project_idbulk_import_entities has several nullable FKs (organization_id, namespace_id, parent_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
bulk_import_id bigintNOT NULLbulk_imports.id 1:N · CASCADE
parent_id bigintnullbulk_import_entities.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
source_type smallintNOT NULL
source_full_path textNOT NULLCHECK char_length(source_full_path) <= 255
destination_name textNOT NULLCHECK char_length(destination_name) <= 255
destination_namespace textNOT NULLCHECK char_length(destination_namespace) <= 255
status smallintNOT NULL
jid textnullCHECK char_length(jid) <= 255
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
migrate_projects booleanNOT NULLTRUE
has_failures booleannullFALSE
migrate_memberships booleanNOT NULLTRUE
organization_id bigintnullorganizations.id 1:N · CASCADE
source_xid bigintnull

Indexes

  • (updated_at, id) WHERE status = ANY(ARRAY[0, 1]) index_bulk_import_entities_for_stale_status
  • (bulk_import_id, status) index_bulk_import_entities_on_bulk_import_id_and_status
  • (namespace_id) index_bulk_import_entities_on_namespace_id
  • (organization_id) index_bulk_import_entities_on_organization_id
  • (parent_id) index_bulk_import_entities_on_parent_id
  • (project_id) index_bulk_import_entities_on_project_id

Referenced by

Table checks: char_length(source_full_path) <= 255; num_nonnulls(namespace_id, organization_id, project_id) = 1; char_length(destination_name) <= 255; char_length(jid) <= 255; char_length(destination_namespace) <= 255

bulk_import_export_batches

10 cols · no RLS · line 16192View in 3D
  • Nullable foreign key group_idbulk_import_export_batches.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idbulk_import_export_batches.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
export_id bigintNOT NULLbulk_import_exports.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
batch_number integerNOT NULL0
objects_count integerNOT NULL0
error textnullCHECK char_length(error) <= 255
project_id bigintnullprojects.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE

Indexes

  • UNIQUE (export_id, batch_number) i_bulk_import_export_batches_id_batch_number
  • (group_id) index_bulk_import_export_batches_on_group_id
  • (project_id) index_bulk_import_export_batches_on_project_id

Referenced by

Table checks: char_length(error) <= 255; num_nonnulls(group_id, project_id) = 1

bulk_import_export_upload_upload_states

10 cols · no RLS · line 16216View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
bulk_import_export_upload_upload_id bigintNOT NULLbulk_import_export_upload_uploads.id 1:1 · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_bie_upl_upl_states_failed_verification
  • (bulk_import_export_upload_upload_id) WHERE verification_state = 0 OR verification_state = 3 idx_bie_upl_upl_states_needs_verification_id
  • UNIQUE (bulk_import_export_upload_upload_id) idx_bie_upl_upl_states_on_bie_upl_upl_id
  • (bulk_import_export_upload_upload_id, verification_started_at) WHERE verification_state = 1 idx_bie_upl_upl_states_on_verification_started
  • (verification_state) idx_bie_upl_upl_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_bie_upl_upl_states_pending_verification
  • (project_id) index_bulk_import_export_upload_upload_states_on_project_id

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

bulk_import_export_upload_uploads

16 cols · no RLS · line 16239View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnull
namespace_id bigintnull
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • (model_id, model_type, uploader, created_at) bulk_import_export_upload_upl_model_id_model_type_uploader__idx
  • (checksum) bulk_import_export_upload_uploads_checksum_idx
  • (namespace_id) bulk_import_export_upload_uploads_namespace_id_idx
  • (organization_id) bulk_import_export_upload_uploads_organization_id_idx
  • (project_id) bulk_import_export_upload_uploads_project_id_idx
  • (store) bulk_import_export_upload_uploads_store_idx
  • (uploaded_by_user_id) bulk_import_export_upload_uploads_uploaded_by_user_id_idx
  • (uploader, path) bulk_import_export_upload_uploads_uploader_path_idx
  • UNIQUE (id) idx_bie_upl_upl_on_id_unique

Referenced by

Table checks: char_length(path) <= 511; char_length(checksum) <= 64; num_nonnulls(namespace_id, project_id) = 1

bulk_import_export_uploads

7 cols · no RLS · line 16261View in 3D
  • Nullable foreign key group_idbulk_import_export_uploads.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key batch_idbulk_import_export_uploads.batch_id may be NULL, so the relationship to bulk_import_export_batches is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idbulk_import_export_uploads.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK group_id, batch_id, project_idbulk_import_export_uploads has several nullable FKs (group_id, batch_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
export_id bigintNOT NULLbulk_import_exports.id 1:N · CASCADE
updated_at timestamptzNOT NULL
export_file textnullCHECK char_length(export_file) <= 255
batch_id bigintnullbulk_import_export_batches.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE

Indexes

  • (batch_id) bulk_import_export_uploads_batch_id
  • (export_id) index_bulk_import_export_uploads_on_export_id
  • (group_id) index_bulk_import_export_uploads_on_group_id
  • (project_id) index_bulk_import_export_uploads_on_project_id

Referenced by

  • nothing

Table checks: char_length(export_file) <= 255; num_nonnulls(group_id, project_id) = 1

bulk_import_exports

15 cols · no RLS · line 16282View in 3D
  • Nullable foreign key offline_export_idbulk_import_exports.offline_export_id may be NULL, so the relationship to import_offline_exports is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idbulk_import_exports.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idbulk_import_exports.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idbulk_import_exports.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK offline_export_id, project_id, group_id, user_idbulk_import_exports has several nullable FKs (offline_export_id, project_id, group_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
relation textNOT NULLCHECK char_length(relation) <= 255
jid textnullCHECK char_length(jid) <= 255
error textnullCHECK char_length(error) <= 255
batched booleanNOT NULLFALSE
batches_count integerNOT NULL0
total_objects_count integerNOT NULL0
user_id bigintnullusers.id 1:N · CASCADE
offline_export_id bigintnullimport_offline_exports.id 1:N · CASCADE
organization_id bigintnull

Indexes

  • UNIQUE (group_id, relation, offline_export_id) WHERE group_id IS NOT NULL AND offline_export_id IS NOT NULL idx_bulk_import_exports_on_group_relation_offline_export
  • UNIQUE (project_id, relation, offline_export_id) WHERE project_id IS NOT NULL AND offline_export_id IS NOT NULL idx_bulk_import_exports_on_project_relation_offline_export
  • (group_id) index_bulk_import_exports_on_group_id
  • (offline_export_id, relation) index_bulk_import_exports_on_offline_export_id_and_relation
  • (offline_export_id, status) WHERE offline_export_id IS NOT NULL index_bulk_import_exports_on_offline_export_id_and_status
  • (project_id) index_bulk_import_exports_on_project_id
  • (user_id) index_bulk_import_exports_on_user_id
  • UNIQUE (group_id, relation, user_id) WHERE group_id IS NOT NULL AND user_id IS NOT NULL AND offline_export_id IS NULL partial_idx_bulk_import_exports_on_group_user_relation
  • UNIQUE (project_id, relation, user_id) WHERE project_id IS NOT NULL AND user_id IS NOT NULL AND offline_export_id IS NULL partial_idx_bulk_import_exports_on_project_user_relation

Referenced by

Table checks: char_length(relation) <= 255; char_length(error) <= 255; char_length(jid) <= 255; num_nonnulls(group_id, project_id) = 1

bulk_import_failures

14 cols · no RLS · line 16313View in 3D
  • Nullable foreign key project_idbulk_import_failures.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idbulk_import_failures.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idbulk_import_failures.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
bulk_import_entity_id bigintNOT NULLbulk_import_entities.id 1:N · CASCADE
created_at timestamptzNOT NULL
pipeline_class textNOT NULLCHECK char_length(pipeline_class) <= 255
exception_class textNOT NULLCHECK char_length(exception_class) <= 255
exception_message textNOT NULLCHECK char_length(exception_message) <= 255
correlation_id_value textnullCHECK char_length(correlation_id_value) <= 255
pipeline_step textnullCHECK char_length(pipeline_step) <= 255
source_url textnullCHECK char_length(source_url) <= 255
source_title textnullCHECK char_length(source_title) <= 255
subrelation textnullCHECK char_length(subrelation) <= 255
project_id bigintnullprojects.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (bulk_import_entity_id) index_bulk_import_failures_on_bulk_import_entity_id
  • (correlation_id_value) index_bulk_import_failures_on_correlation_id_value
  • (namespace_id) index_bulk_import_failures_on_namespace_id
  • (organization_id) index_bulk_import_failures_on_organization_id
  • (project_id) index_bulk_import_failures_on_project_id

Referenced by

  • nothing

Table checks: char_length(pipeline_class) <= 255; char_length(exception_message) <= 255; char_length(pipeline_step) <= 255; char_length(source_title) <= 255; char_length(exception_class) <= 255; char_length(source_url) <= 255; char_length(correlation_id_value) <= 255; num_nonnulls(namespace_id, organization_id, project_id) = 1; char_length(subrelation) <= 255

bulk_import_trackers

17 cols · no RLS · line 16348View in 3D
  • Nullable foreign key organization_idbulk_import_trackers.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idbulk_import_trackers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idbulk_import_trackers.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
bulk_import_entity_id bigintNOT NULLbulk_import_entities.id 1:N · CASCADE
relation textNOT NULLCHECK char_length(relation) <= 255
next_page textnullCHECK char_length(next_page) <= 255
has_next_page booleanNOT NULLFALSE
jid textnullCHECK char_length(jid) <= 255
stage smallintNOT NULL0
status smallintNOT NULL0
created_at timestamptznull
updated_at timestamptznull
batched booleannullFALSE
source_objects_count bigintNOT NULL0
fetched_objects_count bigintNOT NULL0
imported_objects_count bigintNOT NULL0
project_id bigintnullprojects.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • UNIQUE (bulk_import_entity_id, relation) bulk_import_trackers_uniq_relation_by_entity
  • (namespace_id) index_bulk_import_trackers_on_namespace_id
  • (organization_id) index_bulk_import_trackers_on_organization_id
  • (project_id) index_bulk_import_trackers_on_project_id

Referenced by

Table checks: char_length(relation) <= 255; char_length(next_page) <= 255; num_nonnulls(namespace_id, organization_id, project_id) = 1; char_length(jid) <= 255; …(has_next_page) OR next_page IS NOT NULL

bulk_imports

10 cols · no RLS · line 16382View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
source_type smallintNOT NULL
status smallintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
source_version textnullCHECK char_length(source_version) <= 63
source_enterprise booleanNOT NULLTRUE
has_failures booleannullFALSE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE

Indexes

  • (organization_id) index_bulk_imports_on_organization_id
  • (id) WHERE status = ANY(ARRAY[2, 3, CAST('-1' AS integer), CAST('-2' AS integer)]) index_bulk_imports_on_terminated_status
  • (updated_at, id) WHERE status = ANY(ARRAY[0, 1]) index_bulk_imports_on_updated_at_and_id_for_stale_status
  • (user_id) index_bulk_imports_on_user_id

Referenced by

Table checks: char_length(source_version) <= 63

catalog 8 tables

Tables whose names start with catalog_.

Entity-relationship diagram: catalog_bundled_resource_components, catalog_bundled_resource_versions, catalog_bundled_resources, catalog_resource_component_last_usages, catalog_resource_components, catalog_resource_versions, catalog_resources, catalog_verified_namespacescatalog_bundled_resource_componentsid PKbigintcatalog_bundled_resource_id FKbigintcatalog_bundled_version_id FKbigintcreated_attimestamptznametextspecjsonbfile_storesmallintfiletextcatalog_bundled_resource_versionsid PKbigintcatalog_bundled_resource_id FKbigintcreated_attimestamptzupdated_attimestamptzreleased_attimestamptzsemver_majorintegersemver_minorintegersemver_patchintegersemver_prefixedbooleansemver_prereleasetextreadmetextreadme_htmltextcatalog_bundled_resourcesid PKbigintcreated_attimestamptzupdated_attimestamptzlatest_released_attimestamptzserver_fqdntextfull_pathtextnametextdescriptiontextsearch_vectortsvectorcatalog_resource_component_last_usagesid PKbigintcomponent_id FKbigintcatalog_resource_id FKbigintcomponent_project_id FKbigintused_by_project_idbigintlast_used_datedatecatalog_resource_componentsid PKbigintcatalog_resource_id FKbigintversion_id FKbigintproject_id FKbigintcreated_attimestamptznametextspecjsonblast_30_day_usage_countintegerlast_30_day_usage_count_updated_attimestamptzcomponent_typesmallintcatalog_resource_versionsid PKbigintrelease_id FKbigintcatalog_resource_id FKbigintproject_id FKbigintcreated_attimestamptzreleased_attimestamptzsemver_majorintegersemver_minorintegersemver_patchintegersemver_prereleasetextsemver_prefixedbooleancached_markdown_versionintegerreadmetextreadme_htmltextpublished_by_id FKbigintcatalog_resourcesid PKbigintproject_id FKbigintcreated_attimestamptzstatesmallintlatest_released_attimestamptznamevarchardescriptiontextvisibility_levelintegersearch_vectortsvectorverification_levelsmallintlast_30_day_usage_countintegerlast_30_day_usage_count_updated_attimestamptzcatalog_verified_namespacesid PKbigintnamespace_id FKbigintcreated_attimestamptzverification_levelsmallintnamespacesprojectsreleasesuserscatalog_bundled_resource_idproject_idnamespace_idcatalog_bundled_version_idcatalog_bundled_resource_idrelease_idproject_idcatalog_resource_idpublished_by_idproject_idversion_idcatalog_resource_idcomponent_project_idcatalog_resource_idcomponent_id

Relationships

catalog_bundled_resource_components

8 cols · no RLS · line 16424View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
catalog_bundled_resource_id bigintNOT NULLcatalog_bundled_resources.id 1:N · CASCADE
catalog_bundled_version_id bigintNOT NULLcatalog_bundled_resource_versions.id 1:N · CASCADE
created_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
spec jsonbNOT NULLCAST('{}' AS jsonb)
file_store smallintNOT NULL1
file textnullCHECK char_length(file) <= 1024

Indexes

  • (catalog_bundled_resource_id) idx_catalog_bundled_components_on_bundled_resource_id
  • UNIQUE (catalog_bundled_version_id, name) idx_catalog_bundled_components_on_version_and_name

Referenced by

  • nothing

Table checks: char_length(file) <= 1024; char_length(name) <= 255

catalog_bundled_resource_versions

12 cols · no RLS · line 16446View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
catalog_bundled_resource_id bigintNOT NULLcatalog_bundled_resources.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
released_at timestamptznull
semver_major integerNOT NULL
semver_minor integerNOT NULL
semver_patch integerNOT NULL
semver_prefixed booleanNOT NULLFALSE
semver_prerelease textnullCHECK char_length(semver_prerelease) <= 255
readme textnull
readme_html textnull

Indexes

  • UNIQUE (catalog_bundled_resource_id, semver_major, semver_minor, semver_patch, semver_prerelease) idx_catalog_bundled_versions_on_bundled_resource_and_semver

Referenced by

Table checks: char_length(semver_prerelease) <= 255

catalog_bundled_resources

9 cols · no RLS · line 16471View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
latest_released_at timestamptznull
server_fqdn textNOT NULLCHECK char_length(server_fqdn) <= 255
full_path textNOT NULLCHECK char_length(full_path) <= 1024
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 1024
search_vector tsvectornull

Indexes

  • (search_vector) index_catalog_bundled_resources_on_search_vector
  • UNIQUE (server_fqdn, full_path) index_catalog_bundled_resources_on_server_fqdn_and_full_path

Referenced by

Table checks: char_length(description) <= 1024; char_length(name) <= 255; char_length(server_fqdn) <= 255; char_length(full_path) <= 1024; server_fqdn = lower(server_fqdn); full_path = lower(full_path)

catalog_resource_component_last_usages

6 cols · no RLS · line 16498View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
component_id bigintNOT NULLcatalog_resource_components.id 1:N · CASCADE
catalog_resource_id bigintNOT NULLcatalog_resources.id 1:N · CASCADE
component_project_id bigintNOT NULLprojects.id 1:N · CASCADE
used_by_project_id bigintNOT NULL
last_used_date dateNOT NULL

Indexes

  • (component_project_id) idx_catalog_resource_cpmt_last_usages_on_cpmt_project_id
  • UNIQUE (component_id, used_by_project_id, last_used_date) idx_usages_on_cmpt_used_by_project_cmpt_and_last_used_date
  • (last_used_date) index_last_usages_on_last_used_date
  • (catalog_resource_id, last_used_date, used_by_project_id) index_last_usages_on_resource_id_date_and_used_by_project

Referenced by

  • nothing

catalog_resource_components

10 cols · no RLS · line 16516View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
catalog_resource_id bigintNOT NULLcatalog_resources.id 1:N · CASCADE
version_id bigintNOT NULLcatalog_resource_versions.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
spec jsonbNOT NULLCAST('{}' AS jsonb)
last_30_day_usage_count integerNOT NULL0
last_30_day_usage_count_updated_at timestamptzNOT NULLCAST('1970-01-01 00:00:00+00' AS timestamptz)
component_type smallintnull1CHECK component_type IS NOT NULL

Indexes

  • (catalog_resource_id) index_catalog_resource_components_on_catalog_resource_id
  • (project_id) index_catalog_resource_components_on_project_id
  • (version_id) index_catalog_resource_components_on_version_id

Referenced by

Table checks: component_type IS NOT NULL; char_length(name) <= 255

catalog_resource_versions

15 cols · no RLS · line 16540View in 3D
  • Nullable foreign key published_by_idcatalog_resource_versions.published_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
release_id bigintNOT NULLreleases.id 1:1 · CASCADE
catalog_resource_id bigintNOT NULLcatalog_resources.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
released_at timestamptzNOT NULLCAST('1970-01-01 00:00:00+00' AS timestamptz)
semver_major integernull
semver_minor integernull
semver_patch integernull
semver_prerelease textnullCHECK char_length(semver_prerelease) <= 255
semver_prefixed booleannullFALSE
cached_markdown_version integernull
readme textnull
readme_html textnull
published_by_id bigintnullusers.id 1:N · SET NULL

Indexes

  • (project_id) index_catalog_resource_versions_on_project_id
  • (published_by_id) index_catalog_resource_versions_on_published_by_id
  • UNIQUE (release_id) index_catalog_resource_versions_on_release_id
  • (catalog_resource_id, released_at) index_catalog_resource_versions_on_resource_id_and_released_at

Referenced by

Table checks: char_length(semver_prerelease) <= 255

catalog_resources

12 cols · no RLS · line 16568View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:1 · CASCADE
created_at timestamptzNOT NULL
state smallintNOT NULL0
latest_released_at timestamptznull
name varcharnull
description textnull
visibility_level integerNOT NULL0
search_vector tsvectornull
verification_level smallintnull0
last_30_day_usage_count integerNOT NULL0
last_30_day_usage_count_updated_at timestamptzNOT NULLnow()

Indexes

  • (last_30_day_usage_count) WHERE state = 1 index_catalog_resources_on_last_30_day_usage_count
  • (last_30_day_usage_count_updated_at) index_catalog_resources_on_last_30_day_usage_count_updated_at
  • UNIQUE (project_id) index_catalog_resources_on_project_id
  • (search_vector) index_catalog_resources_on_search_vector
  • (state) index_catalog_resources_on_state

Referenced by

catalog_verified_namespaces

4 cols · no RLS · line 16592View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:1 · CASCADE
created_at timestamptzNOT NULL
verification_level smallintNOT NULL0

Indexes

  • UNIQUE (namespace_id) index_catalog_verified_namespaces_on_namespace_id

Referenced by

  • nothing

cd 17 tables

Tables whose names start with cd_.

Entity-relationship diagram: cd_application_flow_definitions, cd_application_links, cd_applications, cd_artifact_sources, cd_deployment_transitions, cd_deployments, cd_environment_driver_bindings, cd_environments, cd_rollout_environments, cd_rollout_steps, cd_rollout_transitions, cd_rollouts, cd_service_environment_healths, cd_services, cd_version_set_entries, cd_version_sets, cd_versionscd_application_flow_definitionsid PKbigintapplication_id FKbigintorganization_id FKbigintversionintegerfile_storesmallintcreated_attimestamptzupdated_attimestamptzfiletextcd_application_linksid PKbigintorganization_id FKbigintapplication_id FKbigintlink_typesmallintcreated_attimestamptzupdated_attimestamptznametexturltextcd_applicationsid PKbigintcreated_attimestamptzupdated_attimestamptznametextdescriptiontextorganization_id FKbigintlast_rollout_iidintegercd_artifact_sourcesid PKbigintgroup_id FKbigintservice_id FKbigintcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintsource_reftextsource_configjsonbnametextcd_deployment_transitionsid PKbigintorganization_id FKbigintdeployment_id FKbigintprincipal_idbigintcreated_attimestamptzfrom_statesmallintto_statesmallinteventtextreasontexttriggered_bytextprincipaltexton_behalf_oftextcd_deploymentsid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzstarted_attimestamptzfinished_attimestamptzstatesmallintorganization_id FKbigintrollout_environment_id FKbigintservice_id FKbigintcd_environment_driver_bindingsid PKbigintorganization_id FKbigintenvironment_id FKbigintcreated_attimestamptzupdated_attimestamptzversionintegerdriver_reftextdriver_configjsonbcd_environmentsid PKbigintorganization_id FKbigintcreated_attimestamptzupdated_attimestamptznametextdescriptiontexttiersmallintcd_rollout_environmentsid PKbigintorganization_id FKbigintrollout_id FKbigintenvironment_id FKbigintdriver_binding_id FKbigintprevious_version_set_id FKbigintcreated_attimestamptzupdated_attimestamptzstarted_attimestamptzfinished_attimestamptzpositionintegerstatesmallintcd_rollout_stepsid PKbigintorganization_id FKbigintrollout_id FKbigintrollout_environment_id FKbigintcreated_attimestamptzupdated_attimestamptzstarted_attimestamptzfinished_attimestamptzstatesmallintpathtextparent_pathtextstep_typetextnametexterrortextparamsjsonbcd_rollout_transitionsid PKbigintorganization_id FKbigintrollout_id FKbigintprincipal_idbigintcreated_attimestamptzfrom_statesmallintto_statesmallinteventtextreasontexttriggered_bytextprincipaltexton_behalf_oftextcd_rolloutsid PKbigintgroup_id FKbigintversion_set_id FKbigintcreated_attimestamptzupdated_attimestamptzstarted_attimestamptzfinished_attimestamptzstatesmallintorganization_id FKbigintapplication_id FKbigintapplication_flow_definition_id FKbigintworkflow_reftextiidintegercd_service_environment_healthsid PKbigintorganization_id FKbigintservice_id FKbigintenvironment_id FKbigintcreated_attimestamptzobserved_attimestamptzhealthsmallintcd_servicesid PKbigintgroup_id FKbigintapplication_id FKbigintcreated_attimestamptzupdated_attimestamptznametextdescriptiontextorganization_id FKbigintcd_version_set_entriesid PKbigintgroup_id FKbigintversion_set_id FKbigintversion_id FKbigintservice_id FKbigintcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintartifact_source_id FKbigintcd_version_setsid PKbigintgroup_id FKbigintapplication_id FKbigintcreated_attimestamptzupdated_attimestamptznametextentries_digesttextorganization_id FKbigintdescriptiontextcreated_by_id FKbigintcd_versionsid PKbigintgroup_id FKbigintartifact_source_id FKbigintcreated_attimestamptzupdated_attimestamptznametextdigesttextreferencetextorganization_id FKbigintnamespacesorganizationsusersorganization_idorganization_idapplication_idorganization_idapplication_idorganization_idenvironment_idorganization_idapplication_idgroup_idorganization_idcreated_by_idapplication_idgroup_idorganization_idgroup_idservice_idorganization_idapplication_flow_definition_idorganization_idgroup_idversion_set_idapplication_idservice_idenvironment_idorganization_iddriver_binding_idrollout_idenvironment_idprevious_version_set_idorganization_idorganization_idrollout_idorganization_idartifact_source_idgroup_idservice_idgroup_idrollout_environment_idorganization_idorganization_idrollout_idrollout_environment_idversion_idservice_idversion_set_idgroup_idorganization_idartifact_source_idorganization_iddeployment_id

Relationships

cd_application_flow_definitions

8 cols · no RLS · line 16608View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
application_id bigintNOT NULLcd_applications.id 1:N · CASCADE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
version integerNOT NULL1
file_store smallintNOT NULL1
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file textNOT NULLCHECK char_length(file) <= 255

Indexes

  • UNIQUE (application_id, version) index_cd_app_flow_definitions_on_application_id_and_version
  • (organization_id) index_cd_application_flow_definitions_on_organization_id

Referenced by

Table checks: char_length(file) <= 255

cd_applications

7 cols · no RLS · line 16651View in 3D
  • Nullable foreign key organization_idcd_applications.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 2000
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL
last_rollout_iid integerNOT NULL0

Indexes

  • UNIQUE (organization_id, name) WHERE organization_id IS NOT NULL uniq_idx_cd_applications_on_organization_id_and_name

Referenced by

Table checks: char_length(description) <= 2000; char_length(name) <= 255; organization_id IS NOT NULL

cd_artifact_sources

9 cols · no RLS · line 16673View in 3D
  • Nullable foreign key group_idcd_artifact_sources.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idcd_artifact_sources.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK group_id, organization_idcd_artifact_sources has several nullable FKs (group_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADE
service_id bigintNOT NULLcd_services.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL
source_ref textnullCHECK source_ref IS NOT NULL
source_config jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(source_config) = CAST('object' AS text)
name textnullCHECK char_length(name) <= 255

Indexes

  • (group_id) index_cd_artifact_sources_on_group_id
  • (organization_id) index_cd_artifact_sources_on_organization_id
  • (service_id) index_cd_artifact_sources_on_service_id

Referenced by

Table checks: source_ref IS NOT NULL; char_length(name) <= 255; jsonb_typeof(source_config) = CAST('object' AS text); char_length(source_ref) <= 255; organization_id IS NOT NULL

cd_deployment_transitions

12 cols · no RLS · line 16699View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
deployment_id bigintNOT NULLcd_deployments.id 1:N · CASCADE
principal_id bigintnull
created_at timestamptzNOT NULL
from_state smallintNOT NULL
to_state smallintNOT NULL
event textNOT NULLCHECK char_length(event) <= 72
reason textnullCHECK char_length(reason) <= 2000
triggered_by textnullCHECK char_length(triggered_by) <= 255
principal textnullCHECK principal IS NOT NULL
on_behalf_of textnullCHECK char_length(on_behalf_of) <= 255

Indexes

  • (deployment_id, created_at) index_cd_deployment_transitions_on_deployment_and_created_at
  • (organization_id) index_cd_deployment_transitions_on_organization_id

Referenced by

  • nothing

Table checks: char_length(event) <= 72; char_length(reason) <= 2000; principal IS NOT NULL; char_length(on_behalf_of) <= 255; char_length(principal) <= 255; char_length(triggered_by) <= 255

cd_deployments

10 cols · no RLS · line 16729View in 3D
  • Nullable foreign key service_idcd_deployments.service_id may be NULL, so the relationship to cd_services is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idcd_deployments.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key rollout_environment_idcd_deployments.rollout_environment_id may be NULL, so the relationship to cd_rollout_environments is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idcd_deployments.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK service_id, group_id, rollout_environment_id, organization_idcd_deployments has several nullable FKs (service_id, group_id, rollout_environment_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
started_at timestamptznull
finished_at timestamptznull
state smallintNOT NULL0
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL
rollout_environment_id bigintnullcd_rollout_environments.id 1:N · CASCADECHECK rollout_environment_id IS NOT NULL
service_id bigintnullcd_services.id 1:N · CASCADECHECK service_id IS NOT NULL

Indexes

  • (group_id) index_cd_deployments_on_group_id
  • (organization_id) index_cd_deployments_on_organization_id
  • UNIQUE (rollout_environment_id, service_id) index_cd_deployments_on_rollout_env_id_and_service_id
  • (service_id) index_cd_deployments_on_service_id

Referenced by

Table checks: service_id IS NOT NULL; rollout_environment_id IS NOT NULL; organization_id IS NOT NULL

cd_environment_driver_bindings

8 cols · no RLS · line 16754View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
environment_id bigintNOT NULLcd_environments.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
version integerNOT NULL1
driver_ref textNOT NULLCHECK char_length(driver_ref) <= 255
driver_config jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(driver_config) = CAST('object' AS text)

Indexes

  • UNIQUE (environment_id, version) index_cd_env_driver_bindings_on_environment_id_and_version
  • (organization_id) index_cd_env_driver_bindings_on_organization_id

Referenced by

Table checks: char_length(driver_ref) <= 255; jsonb_typeof(driver_config) = CAST('object' AS text)

cd_environments

7 cols · no RLS · line 16776View in 3D
  • Nullable foreign key organization_idcd_environments.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 1024
tier smallintNOT NULL0

Indexes

  • UNIQUE (organization_id, name) WHERE organization_id IS NOT NULL uniq_idx_cd_environments_on_organization_id_and_name

Referenced by

Table checks: char_length(description) <= 1024; organization_id IS NOT NULL; char_length(name) <= 255

cd_rollout_environments

12 cols · no RLS · line 16798View in 3D
  • Nullable foreign key previous_version_set_idcd_rollout_environments.previous_version_set_id may be NULL, so the relationship to cd_version_sets is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
rollout_id bigintNOT NULLcd_rollouts.id 1:N · CASCADE
environment_id bigintNOT NULLcd_environments.id 1:N · CASCADE
driver_binding_id bigintNOT NULLcd_environment_driver_bindings.id 1:N · CASCADE
previous_version_set_id bigintnullcd_version_sets.id 1:N · SET NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
started_at timestamptznull
finished_at timestamptznull
position integerNOT NULL
state smallintNOT NULL0

Indexes

  • (driver_binding_id) index_cd_rollout_environments_on_driver_binding_id
  • (environment_id) index_cd_rollout_environments_on_environment_id
  • (organization_id) index_cd_rollout_environments_on_organization_id
  • (previous_version_set_id) index_cd_rollout_environments_on_previous_version_set_id
  • UNIQUE (rollout_id, environment_id) index_cd_rollout_environments_on_rollout_and_environment

Referenced by

cd_rollout_steps

15 cols · no RLS · line 16822View in 3D
  • Nullable foreign key rollout_environment_idcd_rollout_steps.rollout_environment_id may be NULL, so the relationship to cd_rollout_environments is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
rollout_id bigintNOT NULLcd_rollouts.id 1:N · CASCADE
rollout_environment_id bigintnullcd_rollout_environments.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
started_at timestamptznull
finished_at timestamptznull
state smallintNOT NULL0
path textNOT NULLCHECK char_length(path) <= 255
parent_path textnullCHECK char_length(parent_path) <= 255
step_type textNOT NULLCHECK char_length(step_type) <= 255
name textnullCHECK char_length(name) <= 255
error textnullCHECK char_length(error) <= 2000
params jsonbnullCHECK params IS NULL OR jsonb_typeof(params) = CAST('object' AS text)

Indexes

  • (organization_id) index_cd_rollout_steps_on_organization_id
  • (rollout_environment_id) index_cd_rollout_steps_on_rollout_environment_id
  • UNIQUE (rollout_id, path) index_cd_rollout_steps_on_rollout_id_and_path

Referenced by

  • nothing

Table checks: char_length(parent_path) <= 255; char_length(error) <= 2000; char_length(step_type) <= 255; char_length(path) <= 255; params IS NULL OR jsonb_typeof(params) = CAST('object' AS text); char_length(name) <= 255

cd_rollout_transitions

12 cols · no RLS · line 16855View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
rollout_id bigintNOT NULLcd_rollouts.id 1:N · CASCADE
principal_id bigintnull
created_at timestamptzNOT NULL
from_state smallintNOT NULL
to_state smallintNOT NULL
event textNOT NULLCHECK char_length(event) <= 72
reason textnullCHECK char_length(reason) <= 2000
triggered_by textnullCHECK char_length(triggered_by) <= 255
principal textnullCHECK principal IS NOT NULL
on_behalf_of textnullCHECK char_length(on_behalf_of) <= 255

Indexes

  • (organization_id) index_cd_rollout_transitions_on_organization_id
  • (rollout_id, created_at) index_cd_rollout_transitions_on_rollout_id_and_created_at

Referenced by

  • nothing

Table checks: char_length(on_behalf_of) <= 255; char_length(reason) <= 2000; char_length(triggered_by) <= 255; principal IS NOT NULL; char_length(principal) <= 255; char_length(event) <= 72

cd_rollouts

13 cols · no RLS · line 16885View in 3D
  • Nullable foreign key application_flow_definition_idcd_rollouts.application_flow_definition_id may be NULL, so the relationship to cd_application_flow_definitions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idcd_rollouts.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idcd_rollouts.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key application_idcd_rollouts.application_id may be NULL, so the relationship to cd_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK application_flow_definition_id, organization_id, group_id, application_idcd_rollouts has several nullable FKs (application_flow_definition_id, organization_id, group_id, application_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADE
version_set_id bigintNOT NULLcd_version_sets.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
started_at timestamptznull
finished_at timestamptznull
state smallintNOT NULL0
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL
application_id bigintnullcd_applications.id 1:N · CASCADECHECK application_id IS NOT NULL
application_flow_definition_id bigintnullcd_application_flow_definitions.id 1:N · CASCADE
workflow_ref textnullCHECK char_length(workflow_ref) <= 255
iid integernullCHECK iid IS NOT NULL

Indexes

  • (application_flow_definition_id) index_cd_rollouts_on_application_flow_definition_id
  • UNIQUE (application_id, iid) index_cd_rollouts_on_application_id_and_iid
  • UNIQUE (application_id) WHERE state = ANY(ARRAY[0, 1, 2]) index_cd_rollouts_on_application_id_non_terminal
  • (group_id) index_cd_rollouts_on_group_id
  • (organization_id) index_cd_rollouts_on_organization_id
  • (version_set_id, state) index_cd_rollouts_on_version_set_id_and_state

Referenced by

Table checks: iid IS NOT NULL; char_length(workflow_ref) <= 255; application_id IS NOT NULL; organization_id IS NOT NULL

cd_service_environment_healths

7 cols · no RLS · line 16914View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
service_id bigintNOT NULLcd_services.id 1:N · CASCADE
environment_id bigintNOT NULLcd_environments.id 1:N · CASCADE
created_at timestamptzNOT NULL
observed_at timestamptzNOT NULL
health smallintNOT NULL0

Indexes

  • (environment_id) index_cd_service_env_healths_on_environment_id
  • (organization_id) index_cd_service_env_healths_on_organization_id
  • UNIQUE (service_id, environment_id) index_cd_service_env_healths_on_service_and_environment

Referenced by

  • nothing

cd_services

8 cols · no RLS · line 16933View in 3D
  • Nullable foreign key group_idcd_services.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idcd_services.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK group_id, organization_idcd_services has several nullable FKs (group_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADE
application_id bigintNOT NULLcd_applications.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 2000
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • UNIQUE (application_id, name) index_cd_services_on_application_id_and_name
  • (group_id) index_cd_services_on_group_id
  • (organization_id) index_cd_services_on_organization_id

Referenced by

Table checks: organization_id IS NOT NULL; char_length(name) <= 255; char_length(description) <= 2000

cd_version_set_entries

9 cols · no RLS · line 16956View in 3D
  • Nullable foreign key group_idcd_version_set_entries.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idcd_version_set_entries.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key artifact_source_idcd_version_set_entries.artifact_source_id may be NULL, so the relationship to cd_artifact_sources is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK group_id, organization_id, artifact_source_idcd_version_set_entries has several nullable FKs (group_id, organization_id, artifact_source_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADE
version_set_id bigintNOT NULLcd_version_sets.id 1:N · CASCADE
version_id bigintNOT NULLcd_versions.id 1:N · CASCADE
service_id bigintNOT NULLcd_services.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL
artifact_source_id bigintnullcd_artifact_sources.id 1:N · CASCADECHECK artifact_source_id IS NOT NULL

Indexes

  • (artifact_source_id) index_cd_version_set_entries_on_artifact_source_id
  • (group_id) index_cd_version_set_entries_on_group_id
  • (organization_id) index_cd_version_set_entries_on_organization_id
  • (service_id) index_cd_version_set_entries_on_service_id
  • (version_id) index_cd_version_set_entries_on_version_id
  • UNIQUE (version_set_id, version_id) index_cd_version_set_entries_on_version_set_id_and_version_id
  • UNIQUE (version_set_id, artifact_source_id) index_cd_vs_entries_on_version_set_id_and_artifact_source_id

Referenced by

  • nothing

Table checks: organization_id IS NOT NULL; artifact_source_id IS NOT NULL

cd_version_sets

10 cols · no RLS · line 16979View in 3D
  • Nullable foreign key created_by_idcd_version_sets.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idcd_version_sets.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idcd_version_sets.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK created_by_id, group_id, organization_idcd_version_sets has several nullable FKs (created_by_id, group_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADE
application_id bigintNOT NULLcd_applications.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
entries_digest textnullCHECK char_length(entries_digest) <= 64
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL
description textnullCHECK char_length(description) <= 2000
created_by_id bigintnullusers.id 1:N · SET NULL

Indexes

  • UNIQUE (application_id, entries_digest) WHERE entries_digest IS NOT NULL index_cd_version_sets_on_application_id_and_entries_digest
  • UNIQUE (application_id, name) index_cd_version_sets_on_application_id_and_name
  • (created_by_id) index_cd_version_sets_on_created_by_id
  • (group_id) index_cd_version_sets_on_group_id
  • (organization_id) index_cd_version_sets_on_organization_id

Referenced by

Table checks: char_length(entries_digest) <= 64; char_length(name) <= 255; organization_id IS NOT NULL; char_length(description) <= 2000

cd_versions

9 cols · no RLS · line 17005View in 3D
  • Nullable foreign key organization_idcd_versions.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idcd_versions.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK organization_id, group_idcd_versions has several nullable FKs (organization_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADE
artifact_source_id bigintNOT NULLcd_artifact_sources.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
digest textnullCHECK char_length(digest) <= 255
reference textnullCHECK char_length(reference) <= 1024
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • UNIQUE (artifact_source_id, name) index_cd_versions_on_artifact_source_id_and_name
  • (group_id) index_cd_versions_on_group_id
  • (organization_id) index_cd_versions_on_organization_id

Referenced by

Table checks: char_length(reference) <= 1024; organization_id IS NOT NULL; char_length(name) <= 255; char_length(digest) <= 255

chat 2 tables

Tables whose names start with chat_.

Entity-relationship diagram: chat_names, chat_teamschat_namesid PKbigintuser_idbigintteam_idvarcharteam_domainvarcharchat_idvarcharchat_namevarcharlast_used_attimestampcreated_attimestampupdated_attimestampencrypted_tokenbyteaencrypted_token_ivbyteaduo_privacy_notice_acknowledged_attimestamptzchat_teamsid PKbigintnamespace_id FKbigintteam_idvarcharnamevarcharcreated_attimestampupdated_attimestampnamespacesnamespace_id

Relationships

chat_names

12 cols · no RLS · line 17036View in 3D
  • TIMESTAMP without time zone last_used_atlast_used_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tablechat_names references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULL
team_id varcharNOT NULL
team_domain varcharnull
chat_id varcharNOT NULL
chat_name varcharnull
last_used_at timestampnull
created_at timestampNOT NULL
updated_at timestampNOT NULL
encrypted_token byteanull
encrypted_token_iv byteanull
duo_privacy_notice_acknowledged_at timestamptznull

Indexes

  • (team_id, chat_id) index_chat_names_on_team_id_and_chat_id
  • (user_id) index_chat_names_on_user_id

Referenced by

  • nothing

chat_teams

6 cols · no RLS · line 17060View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:1 · CASCADE
team_id varcharnull
name varcharnull
created_at timestampNOT NULL
updated_at timestampNOT NULL

Indexes

  • UNIQUE (namespace_id) index_chat_teams_on_namespace_id

Referenced by

  • nothing

ci 61 tables

Tables whose names start with ci_.

Entity-relationship diagram: ci_build_pending_states, ci_build_report_results, ci_build_runtime_environments, ci_build_trace_chunks, ci_builds_runner_session, ci_cost_settings, ci_daily_build_group_report_results, ci_deleted_objects, ci_freeze_periods, ci_gitlab_hosted_runner_monthly_usages, ci_group_variables, ci_hosted_runners, ci_instance_runner_monthly_usages, ci_instance_variables, ci_job_artifact_states, ci_job_token_authorizations, ci_job_token_group_scope_links, ci_job_token_project_scope_links, ci_job_variables, ci_minutes_additional_packs, ci_namespace_mirrors, ci_namespace_monthly_usages, ci_partitions, ci_pending_builds, ci_pipeline_artifacts, ci_pipeline_chat_data, ci_pipeline_messages, ci_pipeline_metadata, ci_pipeline_schedule_inputs, ci_pipeline_schedule_variables, ci_pipeline_schedules, ci_project_metrics, ci_project_mirrors, ci_project_monthly_usages, ci_refs, ci_resource_groups, ci_resources, ci_runner_controller_instance_level_scopings, ci_runner_controller_runner_level_scopings, ci_runner_controller_runner_level_scopings_instance_type, ci_runner_controller_tokens, ci_runner_controllers, ci_runner_machines, ci_runner_namespaces, ci_runner_projects, ci_runner_taggings, ci_runner_taggings_group_type, ci_runner_taggings_instance_type, ci_runner_taggings_project_type, ci_runner_versions, ci_runners, ci_running_builds, ci_secure_file_states, ci_secure_files, ci_sources_pipelines, ci_sources_projects, ci_subscriptions_projects, ci_triggers, ci_unit_test_failures, ci_unit_tests, ci_variablesci_build_pending_statesid PKbigintcreated_attimestamptzupdated_attimestamptzbuild_id FKbigintstatesmallintfailure_reasonsmallinttrace_checksumbyteatrace_bytesizebigintpartition_id FKbigintproject_idbigintci_build_report_resultsbuild_id PKbigintproject_idbigintdatajsonbpartition_id PKbigintci_build_runtime_environmentsbuild_id PKbigintpartition_id PKbigintruntime_environment_idbigintrunner_machine_idbigintproject_idbigintsuspend_on_successbooleansuspend_on_failurebooleanci_build_trace_chunksid PKbigintchunk_indexintegerdata_storeintegerraw_databyteachecksumbytealock_versionintegerbuild_id FKbigintpartition_id FKbigintproject_idbigintci_builds_runner_sessionid PKbiginturlvarcharcertificatevarcharauthorizationvarcharbuild_id FKbigintpartition_id FKbigintproject_idbigintci_cost_settingscreated_attimestamptzupdated_attimestamptzrunner_id PKbigintstandard_factordouble precisionos_contribution_factordouble precisionos_plan_factordouble precisionci_daily_build_group_report_resultsid PKbigintdatedateproject_idbigintlast_pipeline_id FKbigintref_pathtextgroup_nametextdatajsonbdefault_branchbooleangroup_idbigintpartition_id FKbigintci_deleted_objectsid PKbigintfile_storesmallintpick_up_attimestamptzstore_dirtextfiletextproject_idbigintcreated_attimestamptzci_freeze_periodsid PKbigintproject_idbigintfreeze_startvarchar(998)freeze_endvarchar(998)cron_timezonevarchar(255)created_attimestamptzupdated_attimestamptzci_gitlab_hosted_runner_monthly_usagesid PKbigintrunner_idbigintrunner_duration_secondsbigintproject_idbigintroot_namespace_idbigintcreated_attimestamptzupdated_attimestamptzbilling_monthdatenotification_levelintegercompute_minutes_usednumeric(18, 4)ci_group_variablesid PKbigintkeyvarcharencrypted_valuetextencrypted_value_saltvarcharencrypted_value_ivvarchargroup_idbigintprotectedbooleancreated_attimestamptzupdated_attimestamptzmaskedbooleanvariable_typesmallintenvironment_scopetextrawbooleandescriptiontexthiddenbooleanci_hosted_runnersrunner_id PKbigintcreated_attimestamptzupdated_attimestamptzci_instance_runner_monthly_usagesid PKbigintrunner_idbigintrunner_duration_secondsbigintproject_idbigintroot_namespace_idbigintcreated_attimestamptzupdated_attimestamptzbilling_monthdatenotification_levelintegercompute_minutes_usednumeric(18, 4)ci_instance_variablesid PKbigintvariable_typesmallintmaskedbooleanprotectedbooleankeytextencrypted_valuetextencrypted_value_ivtextrawbooleandescriptiontexthiddenbooleanci_job_artifact_statesverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzjob_artifact_id PKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextpartition_id PKbigintproject_idbigintci_job_token_authorizationsid PKbigintaccessed_project_idbigintorigin_project_idbigintlast_authorized_attimestamptzjob_token_policiesjsonbci_job_token_group_scope_linksid PKbigintsource_project_idbiginttarget_group_idbigintadded_by_idbigintcreated_attimestamptzjob_token_policiesjsonbdefault_permissionsbooleanautopopulatedbooleanci_job_token_project_scope_linksid PKbigintsource_project_idbiginttarget_project_idbigintadded_by_idbigintcreated_attimestamptzdirectionsmallintjob_token_policiesjsonbdefault_permissionsbooleanautopopulatedbooleanci_job_variablesid PKbigintkeyvarcharencrypted_valuetextencrypted_value_ivvarcharjob_id FKbigintvariable_typesmallintsourcesmallintrawbooleanpartition_id FKbigintproject_idbigintci_minutes_additional_packsid PKbigintcreated_attimestamptzupdated_attimestamptznamespace_idbigintexpires_atdatenumber_of_minutesintegerpurchase_xidtextci_namespace_mirrorsid PKbigintnamespace_idbiginttraversal_idsbigint[]ci_namespace_monthly_usagesid PKbigintnamespace_idbigintdatedatenotification_levelsmallintcreated_attimestamptzamount_usednumeric(18, 4)shared_runners_durationbigintshard_numberintegerci_partitionsid PKbigintcreated_attimestamptzupdated_attimestamptzstatussmallintcurrent_fromtimestamptzcurrent_untiltimestamptzbuilds_id_rangeint8rangepipelines_id_rangeint8rangeci_pending_buildsid PKbigintbuild_id FKbigintproject_idbigintcreated_attimestamptzprotectedbooleaninstance_runners_enabledbooleannamespace_idbigintminutes_exceededbooleantag_idsbigint[]namespace_traversal_idsbigint[]partition_id FKbigintplan_idbigintplan_name_uidsmallintrunner_machine_idbigintci_pipeline_artifactsid PKbigintcreated_attimestamptzupdated_attimestamptzpipeline_id FKbigintproject_idbigintsizeintegerfile_storesmallintfile_typesmallintfile_formatsmallintfiletextexpire_attimestamptzverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextlockedsmallintpartition_id FKbigintci_pipeline_chat_dataid PKbigintchat_name_idbigintresponse_urltextpipeline_id FKbigintpartition_id FKbigintproject_idbigintci_pipeline_messagesid PKbigintseveritysmallintcontenttextpipeline_id FKbigintpartition_id FKbigintproject_idbigintci_pipeline_metadataproject_idbigintpipeline_id PKbigintnametextauto_cancel_on_new_commitsmallintauto_cancel_on_job_failuresmallintpartition_id FKbigintsecurity_policy_protected_branch_bypassedbooleanci_pipeline_schedule_inputsid PKbigintpipeline_schedule_id FKbigintproject_idbigintnametextvaluejsonbci_pipeline_schedule_variablesid PKbigintkeyvarcharencrypted_valuetextencrypted_value_saltvarcharencrypted_value_ivvarcharpipeline_schedule_id FKbigintcreated_attimestamptzupdated_attimestamptzvariable_typesmallintrawbooleanproject_idbigintci_pipeline_schedulesid PKbigintdescriptionvarcharrefvarcharcronvarcharcron_timezonevarcharnext_run_attimestampproject_idbigintowner_idbigintactivebooleancreated_attimestampupdated_attimestampci_project_metricsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintfirst_pipeline_succeeded_attimestamptzci_config_generated_bytextci_config_first_generated_attimestamptzfirst_ai_pipeline_results_viewed_attimestamptzci_project_mirrorsid PKbigintproject_idbigintnamespace_idbigintci_project_monthly_usagesid PKbigintproject_idbigintdatedatecreated_attimestamptzamount_usednumeric(18, 4)shared_runners_durationbigintci_refsid PKbigintproject_idbigintlock_versionintegerstatussmallintref_pathtextci_resource_groupsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintkeyvarchar(255)process_modesmallintci_resourcesid PKbigintcreated_attimestamptzupdated_attimestamptzresource_group_id FKbigintbuild_id FKbigintpartition_id FKbigintproject_idbigintci_runner_controller_instance_level_scopingsid PKbigintrunner_controller_id FKbigintcreated_attimestamptzupdated_attimestamptzci_runner_controller_runner_level_scopingsid PKbigintrunner_controller_id FKbigintrunner_id FKbigintrunner_type PKsmallintcreated_attimestamptzupdated_attimestamptzci_runner_controller_runner_level_scopings_instance_typeid PKbigintrunner_controller_idbigintrunner_idbigintrunner_type PKsmallintcreated_attimestamptzupdated_attimestamptzci_runner_controller_tokensid PKbigintdescriptiontexttoken_digesttextrunner_controller_id FKbigintcreated_attimestamptzupdated_attimestamptzstatussmallintlast_used_attimestamptzci_runner_controllersid PKbigintdescriptiontextcreated_attimestamptzupdated_attimestamptzenabledbooleanstatesmallintci_runner_machinesid PKbigintrunner_idbigintcreated_attimestamptzupdated_attimestamptzcontacted_attimestamptzcreation_statesmallintexecutor_typesmallintrunner_type PKsmallintconfigjsonbsystem_xidtextplatformtextarchitecturetextrevisiontextip_addresstextversiontextruntime_featuresjsonborganization_idbigintlabelsjsonbci_runner_namespacesid PKbigintrunner_id FKbigintnamespace_idbigintci_runner_projectsid PKbigintrunner_id FKbigintcreated_attimestampupdated_attimestampproject_idbigintci_runner_taggingsid PKbiginttag_idbigintrunner_idbigintrunner_type PKsmallintorganization_idbiginttag_nametextci_runner_taggings_group_typeid PKbiginttag_idbigintrunner_id FKbigintrunner_type PKsmallintorganization_idbiginttag_nametextci_runner_taggings_instance_typeid PKbiginttag_idbigintrunner_id FKbigintrunner_type PKsmallintorganization_idbiginttag_nametextci_runner_taggings_project_typeid PKbiginttag_idbigintrunner_id FKbigintrunner_type PKsmallintorganization_idbiginttag_nametextci_runner_versionsversion PKtextstatussmallintci_runnersid PKbigintcreator_idbigintcreated_attimestamptzupdated_attimestamptzcontacted_attimestamptztoken_expires_attimestamptzpublic_projects_minutes_cost_factordouble precisionprivate_projects_minutes_cost_factordouble precisionaccess_levelintegermaximum_timeoutintegerrunner_type PKsmallintregistration_typesmallintcreation_statesmallintactivebooleanrun_untaggedbooleanlockedbooleannametexttoken_encryptedtextdescriptiontextmaintainer_notetextallowed_planstext[]allowed_plan_idsbigint[]organization_idbigintallowed_plan_name_uidssmallint[]token_rotation_deadlinetimestamptzuuiduuidci_running_buildsid PKbigintbuild_id FKbigintproject_idbigintrunner_idbigintcreated_attimestamptzrunner_typesmallintpartition_id FKbigintrunner_owner_namespace_xidbigintci_secure_file_statesverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzci_secure_file_id PKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextproject_idbigintci_secure_filesid PKbigintproject_idbigintcreated_attimestamptzupdated_attimestamptzfile_storesmallintnametextfiletextchecksumbyteakey_datatextmetadatajsonbexpires_attimestamptzci_sources_pipelinesid PKbigintproject_idbigintsource_project_idbigintsource_job_id FKbigintpartition_id FKbigintsource_partition_id FKbigintpipeline_id FKbigintsource_pipeline_id FKbigintci_sources_projectsid PKbigintpipeline_id FKbigintsource_project_idbigintpartition_id FKbigintci_subscriptions_projectsid PKbigintdownstream_project_idbigintupstream_project_idbigintauthor_idbigintci_triggersid PKbigintcreated_attimestampupdated_attimestampproject_idbigintowner_idbigintdescriptionvarcharexpires_attimestamptztoken_encryptedtextci_unit_test_failuresid PKbigintfailed_attimestamptzunit_test_id FKbigintbuild_id FKbigintpartition_id FKbigintproject_idbigintci_unit_testsid PKbigintproject_idbigintkey_hashtextnametextsuite_nametextci_variablesid PKbigintkeyvarcharencrypted_valuetextencrypted_value_saltvarcharencrypted_value_ivvarcharproject_idbigintprotectedbooleanenvironment_scopevarcharmaskedbooleanvariable_typesmallintrawbooleandescriptiontexthiddenbooleangroup_type_ci_runnersinstance_type_ci_runnersp_ci_buildsp_ci_job_artifactsp_ci_pipelinesproject_type_ci_runnerspartition_id, build_idpartition_id, build_idpartition_id, build_idpartition_id, build_idrunner_idpartition_id, last_pipeline_idrunner_idpartition_id, job_artifact_idpartition_id, job_idpartition_id, build_idpartition_id, pipeline_idpartition_id, pipeline_idpartition_id, pipeline_idpartition_id, pipeline_idpipeline_schedule_idpipeline_schedule_idpartition_id, build_idresource_group_idrunner_controller_idrunner_id, runner_typerunner_controller_idrunner_controller_idrunner_idrunner_idrunner_id, runner_typerunner_id, runner_typerunner_id, runner_typepartition_id, build_idsource_partition_id, source_job_idsource_partition_id, source_pipeline_idpartition_id, pipeline_idpartition_id, pipeline_idpartition_id, build_idunit_test_id

Relationships

ci_build_pending_states

10 cols · no RLS · line 17087View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
build_id bigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
state smallintnull
failure_reason smallintnull
trace_checksum byteanull
trace_bytesize bigintnull
partition_id bigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • UNIQUE (build_id) index_ci_build_pending_states_on_build_id
  • (project_id) index_ci_build_pending_states_on_project_id
  • UNIQUE (partition_id, build_id) unique_index_ci_build_pending_states_on_partition_id_build_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

ci_build_report_results

4 cols · no RLS · line 17110View in 3D
ColumnTypeNullDefaultReferencesNotes
build_id PKbigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
project_id bigintNOT NULL
data jsonbNOT NULLCAST('{}' AS jsonb)
partition_id PKbigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE

Indexes

  • (project_id) index_ci_build_report_results_on_project_id

Referenced by

  • nothing

ci_build_runtime_environments

7 cols · no RLS · line 17117View in 3D
  • Isolated tableci_build_runtime_environments references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
build_id PKbigintNOT NULL
partition_id PKbigintNOT NULL
runtime_environment_id bigintnull
runner_machine_id bigintnull
project_id bigintNOT NULL
suspend_on_success booleanNOT NULLFALSE
suspend_on_failure booleanNOT NULLFALSE

Indexes

  • (project_id) index_ci_build_runtime_envs_on_project_id
  • (runner_machine_id) index_ci_build_runtime_envs_on_runner_machine_id
  • (runtime_environment_id) index_ci_build_runtime_envs_on_runtime_environment_id

Referenced by

  • nothing

ci_build_trace_chunks

9 cols · no RLS · line 17127View in 3D
  • Foreign key without index partition_id, build_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan ci_build_trace_chunks to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_build_trace_chunks maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
chunk_index integerNOT NULL
data_store integerNOT NULL
raw_data byteanull
checksum byteanull
lock_version integerNOT NULL0
build_id bigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
partition_id bigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • UNIQUE (build_id, chunk_index) index_ci_build_trace_chunks_on_build_id_and_chunk_index
  • (project_id) index_ci_build_trace_chunks_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

ci_builds_runner_session

7 cols · no RLS · line 17158View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
url varcharNOT NULL
certificate varcharnull
authorization varcharnull
build_id bigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
partition_id bigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • UNIQUE (build_id) index_ci_builds_runner_session_on_build_id
  • UNIQUE (partition_id, build_id) index_ci_builds_runner_session_on_partition_id_build_id
  • (project_id) index_ci_builds_runner_session_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

ci_cost_settings

6 cols · no RLS · line 17178View in 3D
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
runner_id PKbigintNOT NULLinstance_type_ci_runners.id 1:1 · CASCADE
standard_factor double precisionNOT NULL1.0
os_contribution_factor double precisionNOT NULL0.008
os_plan_factor double precisionNOT NULL0.5

Indexes

  • none

Referenced by

  • nothing

ci_daily_build_group_report_results

10 cols · no RLS · line 17187View in 3D
  • Foreign key without index partition_id, last_pipeline_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_daily_build_group_report_results to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_daily_build_group_report_results maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
date dateNOT NULL
project_id bigintNOT NULL
last_pipeline_id bigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
ref_path textNOT NULL
group_name textNOT NULL
data jsonbNOT NULL
default_branch booleanNOT NULLFALSE
group_id bigintnull
partition_id bigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE

Indexes

  • (group_id) index_ci_daily_build_group_report_results_on_group_id
  • (last_pipeline_id) index_ci_daily_build_group_report_results_on_last_pipeline_id
  • (project_id, date) WHERE default_branch = TRUE AND data -> CAST('coverage' AS text) IS NOT NULL index_ci_daily_build_group_report_results_on_project_and_date
  • UNIQUE (project_id, ref_path, date, group_name) index_daily_build_group_report_results_unique_columns

Referenced by

  • nothing

ci_deleted_objects

7 cols · no RLS · line 17209View in 3D
  • Isolated tableci_deleted_objects references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
file_store smallintNOT NULL1
pick_up_at timestamptzNOT NULLnow()
store_dir textNOT NULLCHECK char_length(store_dir) <= 1024
file textNOT NULL
project_id bigintnullCHECK project_id IS NOT NULL
created_at timestamptzNOT NULLnow()

Indexes

  • (pick_up_at) index_ci_deleted_objects_on_pick_up_at
  • (project_id) index_ci_deleted_objects_on_project_id

Referenced by

  • nothing

Table checks: char_length(store_dir) <= 1024; project_id IS NOT NULL

ci_freeze_periods

7 cols · no RLS · line 17230View in 3D
  • Isolated tableci_freeze_periods references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
freeze_start varchar(998)NOT NULL
freeze_end varchar(998)NOT NULL
cron_timezone varchar(255)NOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (project_id) index_ci_freeze_periods_on_project_id

Referenced by

  • nothing

ci_gitlab_hosted_runner_monthly_usages

10 cols · no RLS · line 17249View in 3D
  • Isolated tableci_gitlab_hosted_runner_monthly_usages references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
runner_id bigintNOT NULL
runner_duration_seconds bigintNOT NULL0
project_id bigintNOT NULL
root_namespace_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
billing_month dateNOT NULLCHECK billing_month = date_trunc(CAST('month' AS text), CAST(billing_month AS timestamptz))
notification_level integerNOT NULL100
compute_minutes_used numeric(18, 4)NOT NULL0.0

Indexes

  • (pg_catalog.extract('year', billing_month)) idx_gitlab_hosted_runner_monthly_usages_on_billing_month_year
  • (root_namespace_id, billing_month) idx_hosted_runner_usage_on_namespace_billing_month
  • (project_id, billing_month) idx_hosted_runner_usage_on_project_billing_month
  • UNIQUE (runner_id, billing_month, root_namespace_id, project_id) idx_hosted_runner_usage_unique

Referenced by

  • nothing

Table checks: billing_month = date_trunc(CAST('month' AS text), CAST(billing_month AS timestamptz))

ci_group_variables

15 cols · no RLS · line 17272View in 3D
  • Isolated tableci_group_variables references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
key varcharNOT NULL
encrypted_value textnull
encrypted_value_salt varcharnull
encrypted_value_iv varcharnull
group_id bigintNOT NULL
protected booleanNOT NULLFALSE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
masked booleanNOT NULLFALSE
variable_type smallintNOT NULL1
environment_scope textNOT NULLCAST('*' AS text)CHECK char_length(environment_scope) <= 255
raw booleanNOT NULLFALSE
description textnullCHECK char_length(description) <= 255
hidden booleanNOT NULLFALSE

Indexes

  • UNIQUE (group_id, key, environment_scope) index_ci_group_variables_on_group_id_and_key_and_environment

Referenced by

  • nothing

Table checks: char_length(environment_scope) <= 255; char_length(description) <= 255

ci_hosted_runners

3 cols · no RLS · line 17301View in 3D
ColumnTypeNullDefaultReferencesNotes
runner_id PKbigintNOT NULLinstance_type_ci_runners.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • none

Referenced by

  • nothing

ci_instance_runner_monthly_usages

10 cols · no RLS · line 17307View in 3D
  • Isolated tableci_instance_runner_monthly_usages references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
runner_id bigintnull
runner_duration_seconds bigintNOT NULL0
project_id bigintnull
root_namespace_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
billing_month dateNOT NULLCHECK billing_month = date_trunc(CAST('month' AS text), CAST(billing_month AS timestamptz))
notification_level integerNOT NULL100
compute_minutes_used numeric(18, 4)NOT NULL0.0

Indexes

  • UNIQUE (runner_id, billing_month, root_namespace_id, project_id) idx_instance_runner_usage_unique
  • (root_namespace_id, billing_month) index_ci_instance_runner_monthly_usages_on_namespace_and_month
  • (project_id, billing_month) index_ci_instance_runner_monthly_usages_on_project_and_month

Referenced by

  • nothing

Table checks: billing_month = date_trunc(CAST('month' AS text), CAST(billing_month AS timestamptz))

ci_instance_variables

10 cols · no RLS · line 17330View in 3D
  • Isolated tableci_instance_variables references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
variable_type smallintNOT NULL1
masked booleannullFALSE
protected booleannullFALSE
key textNOT NULLCHECK char_length(key) <= 255
encrypted_value textnull
encrypted_value_iv textnullCHECK char_length(encrypted_value_iv) <= 255
raw booleanNOT NULLFALSE
description textnullCHECK char_length(description) <= 255
hidden booleanNOT NULLFALSE

Indexes

  • UNIQUE (key) index_ci_instance_variables_on_key

Referenced by

  • nothing

Table checks: char_length(encrypted_value_iv) <= 255; char_length(key) <= 255; (variable_type = 2 AND char_length(encrypted_value) <= 67800) OR char_length(encrypted_value) <= 13579; char_length(description) <= 255

ci_job_artifact_states

10 cols · no RLS · line 17356View in 3D
ColumnTypeNullDefaultReferencesNotes
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
job_artifact_id PKbigintNOT NULLp_ci_job_artifacts.partition_id 1:1 · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintnull
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
partition_id PKbigintNOT NULLp_ci_job_artifacts.partition_id 1:1 · CASCADE
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (job_artifact_id % CAST(100000 AS bigint)) index_ci_job_artifact_states_on_bucket_number
  • (verification_retry_at) WHERE verification_state = 3 index_job_artifact_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_job_artifact_states_needs_verification
  • (verified_at) WHERE verification_state = 0 index_job_artifact_states_pending_verification
  • (verification_state, job_artifact_id, partition_id) index_on_job_artifact_id_partition_id_verification_state

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255; project_id IS NOT NULL

ci_job_token_authorizations

5 cols · no RLS · line 17380View in 3D
  • Isolated tableci_job_token_authorizations references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
accessed_project_id bigintNOT NULL
origin_project_id bigintNOT NULL
last_authorized_at timestamptzNOT NULL
job_token_policies jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • UNIQUE (accessed_project_id, origin_project_id) idx_ci_job_token_authorizations_on_accessed_and_origin_project
  • (origin_project_id) index_ci_job_token_authorizations_on_origin_project_id

Referenced by

  • nothing

ci_job_variables

10 cols · no RLS · line 17438View in 3D
  • Foreign key without index partition_id, job_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan ci_job_variables to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_job_variables maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
key varcharNOT NULL
encrypted_value textnull
encrypted_value_iv varcharnull
job_id bigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
variable_type smallintNOT NULL1
source smallintNOT NULL0
raw booleanNOT NULLFALSE
partition_id bigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (job_id) index_ci_job_variables_on_job_id
  • UNIQUE (key, job_id) index_ci_job_variables_on_key_and_job_id
  • (project_id) index_ci_job_variables_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

ci_minutes_additional_packs

7 cols · no RLS · line 17461View in 3D
  • Isolated tableci_minutes_additional_packs references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintNOT NULL
expires_at datenull
number_of_minutes integerNOT NULL
purchase_xid textnullCHECK char_length(purchase_xid) <= 50

Indexes

  • (namespace_id, purchase_xid) index_ci_minutes_additional_packs_on_namespace_id_purchase_xid

Referenced by

  • nothing

Table checks: char_length(purchase_xid) <= 50

ci_namespace_mirrors

3 cols · no RLS · line 17481View in 3D
  • Isolated tableci_namespace_mirrors references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULL
traversal_ids bigint[]NOT NULLCAST('{}' AS bigint[])

Indexes

  • UNIQUE (namespace_id) index_ci_namespace_mirrors_on_namespace_id
  • ((traversal_ids)[1], (traversal_ids)[2], (traversal_ids)[3], (traversal_ids)[4]) index_ci_namespace_mirrors_on_traversal_ids_unnest
  • (traversal_ids) index_gin_ci_namespace_mirrors_on_traversal_ids

Referenced by

  • nothing

ci_namespace_monthly_usages

8 cols · no RLS · line 17496View in 3D
  • Isolated tableci_namespace_monthly_usages references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULL
date dateNOT NULLCHECK date = date_trunc(CAST('month' AS text), CAST(date AS timestamptz))
notification_level smallintNOT NULL100
created_at timestamptznull
amount_used numeric(18, 4)NOT NULL0.0
shared_runners_duration bigintNOT NULL0
shard_number integerNOT NULL1

Indexes

  • UNIQUE (namespace_id, date, shard_number) idx_ci_namespace_monthly_usages_namespace_id_date_shard_number

Referenced by

  • nothing

Table checks: date = date_trunc(CAST('month' AS text), CAST(date AS timestamptz))

ci_partitions

8 cols · no RLS · line 17517View in 3D
  • Isolated tableci_partitions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
current_from timestamptznull
current_until timestamptznull
builds_id_range int8rangenull
pipelines_id_range int8rangenull

Indexes

  • UNIQUE (status) WHERE status = 2 index_ci_partitions_on_current_status

Referenced by

  • nothing

ci_pending_builds

14 cols · no RLS · line 17528View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
build_id bigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
project_id bigintNOT NULL
created_at timestamptzNOT NULLnow()
protected booleanNOT NULLFALSE
instance_runners_enabled booleanNOT NULLFALSE
namespace_id bigintnull
minutes_exceeded booleanNOT NULLFALSE
tag_ids bigint[]nullCAST('{}' AS bigint[])
namespace_traversal_ids bigint[]nullCAST('{}' AS bigint[])
partition_id bigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
plan_id bigintnull
plan_name_uid smallintnull
runner_machine_id bigintnull

Indexes

  • (id) WHERE protected = TRUE index_ci_pending_builds_id_on_protected_partial
  • UNIQUE (build_id) index_ci_pending_builds_on_build_id
  • (created_at, id) index_ci_pending_builds_on_created_at_and_id
  • (namespace_id) index_ci_pending_builds_on_namespace_id
  • UNIQUE (partition_id, build_id) index_ci_pending_builds_on_partition_id_build_id
  • (plan_id) index_ci_pending_builds_on_plan_id
  • (plan_name_uid) index_ci_pending_builds_on_plan_name_uid
  • (project_id) index_ci_pending_builds_on_project_id
  • (tag_ids) WHERE cardinality(tag_ids) > 0 index_ci_pending_builds_on_tag_ids
  • (namespace_traversal_ids) index_gin_ci_pending_builds_on_namespace_traversal_ids

Referenced by

  • nothing

ci_pipeline_artifacts

20 cols · no RLS · line 17554View in 3D
  • Foreign key without index partition_id, pipeline_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_pipeline_artifacts to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_pipeline_artifacts maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
pipeline_id bigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
project_id bigintNOT NULL
size integerNOT NULL
file_store smallintNOT NULL1
file_type smallintNOT NULL
file_format smallintNOT NULL
file textnullCHECK char_length(file) <= 255
expire_at timestamptznull
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
verification_state smallintNOT NULL0
verification_retry_count smallintnull
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
locked smallintnull2
partition_id bigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE

Indexes

  • (expire_at) WHERE locked = 0 AND expire_at IS NOT NULL ci_pipeline_artifacts_on_expire_at_for_removal
  • (verification_retry_at) WHERE verification_state = 3 index_ci_pipeline_artifacts_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_ci_pipeline_artifacts_needs_verification
  • (expire_at) index_ci_pipeline_artifacts_on_expire_at
  • UNIQUE (id, partition_id) index_ci_pipeline_artifacts_on_id_and_partition_id
  • UNIQUE (pipeline_id, file_type) index_ci_pipeline_artifacts_on_pipeline_id_and_file_type
  • (project_id) index_ci_pipeline_artifacts_on_project_id
  • (verified_at) WHERE verification_state = 0 index_ci_pipeline_artifacts_pending_verification
  • (verification_state) index_ci_pipeline_artifacts_verification_state

Referenced by

  • nothing

Table checks: char_length(file) <= 255; file IS NOT NULL; char_length(verification_failure) <= 255

ci_pipeline_chat_data

6 cols · no RLS · line 17589View in 3D
  • Foreign key without index partition_id, pipeline_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_pipeline_chat_data to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_pipeline_chat_data maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
chat_name_id bigintNOT NULL
response_url textNOT NULL
pipeline_id bigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
partition_id bigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (chat_name_id) index_ci_pipeline_chat_data_on_chat_name_id
  • UNIQUE (pipeline_id) index_ci_pipeline_chat_data_on_pipeline_id
  • (project_id) index_ci_pipeline_chat_data_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

ci_pipeline_messages

6 cols · no RLS · line 17608View in 3D
  • Foreign key without index partition_id, pipeline_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_pipeline_messages to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_pipeline_messages maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
severity smallintNOT NULL0
content textNOT NULLCHECK char_length(content) <= 10000
pipeline_id bigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
partition_id bigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (pipeline_id) index_ci_pipeline_messages_on_pipeline_id
  • (project_id) index_ci_pipeline_messages_on_project_id

Referenced by

  • nothing

Table checks: char_length(content) <= 10000; project_id IS NOT NULL

ci_pipeline_metadata

7 cols · no RLS · line 17628View in 3D
  • Foreign key without index partition_id, pipeline_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_pipeline_metadata to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_pipeline_metadata maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
project_id bigintNOT NULL
pipeline_id PKbigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
name textnullCHECK char_length(name) <= 255
auto_cancel_on_new_commit smallintNOT NULL0
auto_cancel_on_job_failure smallintNOT NULL0
partition_id bigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
security_policy_protected_branch_bypassed booleanNOT NULLFALSE

Indexes

  • (project_id) index_ci_pipeline_metadata_on_project_id
  • (name, pipeline_id) index_pipeline_metadata_on_name_text_pattern_pipeline_id

Referenced by

  • nothing

Table checks: char_length(name) <= 255

ci_pipeline_schedule_inputs

5 cols · no RLS · line 17639View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
pipeline_schedule_id bigintNOT NULLci_pipeline_schedules.id 1:N · CASCADE
project_id bigintNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
value jsonbnull

Indexes

  • (pipeline_schedule_id) index_ci_pipeline_schedule_inputs_on_pipeline_schedule_id
  • (project_id) index_ci_pipeline_schedule_inputs_on_project_id

Referenced by

  • nothing

Table checks: char_length(name) <= 255

ci_pipeline_schedule_variables

11 cols · no RLS · line 17657View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
key varcharNOT NULL
encrypted_value textnull
encrypted_value_salt varcharnull
encrypted_value_iv varcharnull
pipeline_schedule_id bigintNOT NULLci_pipeline_schedules.id 1:N · CASCADE
created_at timestamptznull
updated_at timestamptznull
variable_type smallintNOT NULL1
raw booleanNOT NULLFALSE
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (project_id) index_ci_pipeline_schedule_variables_on_project_id
  • UNIQUE (pipeline_schedule_id, key) index_ci_pipeline_schedule_variables_on_schedule_id_and_key

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

ci_pipeline_schedules

11 cols · no RLS · line 17681View in 3D
  • TIMESTAMP without time zone next_run_atnext_run_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
description varcharnull
ref varcharnull
cron varcharnull
cron_timezone varcharnull
next_run_at timestampnull
project_id bigintnullCHECK project_id IS NOT NULL
owner_id bigintnull
active booleannullTRUE
created_at timestampnull
updated_at timestampnull

Indexes

  • (id, next_run_at) WHERE active = TRUE index_ci_pipeline_schedules_on_id_and_next_run_at_and_active
  • (next_run_at, active) index_ci_pipeline_schedules_on_next_run_at_and_active
  • (owner_id) index_ci_pipeline_schedules_on_owner_id
  • (owner_id, id) WHERE active = TRUE index_ci_pipeline_schedules_on_owner_id_and_id_and_active
  • (project_id) index_ci_pipeline_schedules_on_project_id

Referenced by

Table checks: project_id IS NOT NULL

ci_project_metrics

8 cols · no RLS · line 17723View in 3D
  • Isolated tableci_project_metrics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
first_pipeline_succeeded_at timestamptznull
ci_config_generated_by textnullCHECK char_length(ci_config_generated_by) <= 255
ci_config_first_generated_at timestamptznull
first_ai_pipeline_results_viewed_at timestamptznull

Indexes

  • UNIQUE (project_id) index_ci_project_metrics_on_project_id

Referenced by

  • nothing

Table checks: char_length(ci_config_generated_by) <= 255

ci_project_mirrors

3 cols · no RLS · line 17744View in 3D
  • Isolated tableci_project_mirrors references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
namespace_id bigintNOT NULL

Indexes

  • (namespace_id) index_ci_project_mirrors_on_namespace_id
  • UNIQUE (project_id) index_ci_project_mirrors_on_project_id

Referenced by

  • nothing

ci_project_monthly_usages

6 cols · no RLS · line 17759View in 3D
  • Isolated tableci_project_monthly_usages references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
date dateNOT NULLCHECK date = date_trunc(CAST('month' AS text), CAST(date AS timestamptz))
created_at timestamptznull
amount_used numeric(18, 4)NOT NULL0.0
shared_runners_duration bigintNOT NULL0

Indexes

  • UNIQUE (project_id, date) index_ci_project_monthly_usages_on_project_id_and_date

Referenced by

  • nothing

Table checks: date = date_trunc(CAST('month' AS text), CAST(date AS timestamptz))

ci_refs

5 cols · no RLS · line 17778View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
lock_version integerNOT NULL0
status smallintNOT NULL0
ref_path textNOT NULL

Indexes

  • UNIQUE (project_id, ref_path) index_ci_refs_on_project_id_and_ref_path

Referenced by

ci_resource_groups

6 cols · no RLS · line 17795View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
key varchar(255)NOT NULL
process_mode smallintNOT NULL0

Indexes

  • UNIQUE (project_id, key) index_ci_resource_groups_on_project_id_and_key

Referenced by

ci_resources

7 cols · no RLS · line 17813View in 3D
  • Foreign key without index partition_id, build_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan ci_resources to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_resources maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
  • Nullable foreign key partition_id, build_idci_resources.partition_id.build_id may be NULL, so the relationship to p_ci_builds is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
resource_group_id bigintNOT NULLci_resource_groups.id 1:N · CASCADE
build_id bigintnullp_ci_builds.partition_id 1:N · SET NULL
partition_id bigintnullp_ci_builds.partition_id 1:N · SET NULL
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (build_id) index_ci_resources_on_build_id
  • (project_id) index_ci_resources_on_project_id
  • UNIQUE (resource_group_id, build_id) index_ci_resources_on_resource_group_id_and_build_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

ci_runner_controller_instance_level_scopings

4 cols · no RLS · line 17833View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
runner_controller_id bigintNOT NULLci_runner_controllers.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (runner_controller_id) index_ci_rc_instance_level_scopings_on_runner_controller_id

Referenced by

  • nothing

ci_runner_controller_runner_level_scopings

6 cols · no RLS · line 17849View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
runner_controller_id bigintNOT NULLci_runner_controllers.id 1:N · CASCADE
runner_id bigintNOT NULLci_runners.id 1:N · CASCADE
runner_type PKsmallintNOT NULLci_runners.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (runner_controller_id, runner_id, runner_type) index_ci_rcrl_scopings_on_controller_id_and_runner_id_and_type
  • (runner_id, runner_type) index_ci_rcrl_scopings_on_runner_id_and_type

Referenced by

  • nothing

ci_runner_controller_runner_level_scopings_instance_type

6 cols · no RLS · line 17868View in 3D
  • Polymorphic reference without referential integrity runner_type, runner_idrunner_id points at different tables depending on runner_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • Isolated tableci_runner_controller_runner_level_scopings_instance_type references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
runner_controller_id bigintNOT NULL
runner_id bigintNOT NULL
runner_type PKsmallintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (runner_controller_id, runner_id, runner_type) ci_runner_controller_runner_l_runner_controller_id_runner_i_idx
  • (runner_id, runner_type) ci_runner_controller_runner_level_sco_runner_id_runner_type_idx

Referenced by

  • nothing

ci_runner_controller_tokens

8 cols · no RLS · line 17877View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
description textnullCHECK char_length(description) <= 1024
token_digest textNOT NULLCHECK char_length(token_digest) <= 255
runner_controller_id bigintNOT NULLci_runner_controllers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
last_used_at timestamptznull

Indexes

  • (runner_controller_id, status, last_used_at) index_ci_runner_controller_tokens_on_rc_id_status_last_used_at
  • UNIQUE (token_digest) index_ci_runner_controller_tokens_on_token_digest

Referenced by

  • nothing

Table checks: char_length(description) <= 1024; char_length(token_digest) <= 255

ci_runner_controllers

6 cols · no RLS · line 17899View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
description textnullCHECK char_length(description) <= 1024
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
enabled booleanNOT NULLFALSE
state smallintNOT NULL0

Indexes

  • none

Referenced by

Table checks: char_length(description) <= 1024

ci_runner_machines

18 cols · no RLS · line 17918View in 3D
  • Polymorphic reference without referential integrity runner_type, runner_idrunner_id points at different tables depending on runner_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • Isolated tableci_runner_machines references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
runner_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
contacted_at timestamptznull
creation_state smallintNOT NULL0
executor_type smallintnull
runner_type PKsmallintNOT NULL
config jsonbNOT NULLCAST('{}' AS jsonb)
system_xid textNOT NULLCHECK char_length(system_xid) <= 64
platform textnullCHECK char_length(platform) <= 255
architecture textnullCHECK char_length(architecture) <= 255
revision textnullCHECK char_length(revision) <= 255
ip_address textnullCHECK char_length(ip_address) <= 1024
version textnullCHECK char_length(version) <= 2048
runtime_features jsonbNOT NULLCAST('{}' AS jsonb)
organization_id bigintnull
labels jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (contacted_at, id) index_ci_runner_machines_on_contacted_at_desc_and_id_desc
  • UNIQUE (runner_id, runner_type, system_xid) index_ci_runner_machines_on_runner_id_and_type_and_system_xid
  • (created_at, id) index_ci_runner_machines_on_created_at_and_id_desc
  • (executor_type) index_ci_runner_machines_on_executor_type
  • (substring(version, CAST('^\d+\.' AS text)), version, runner_id) index_ci_runner_machines_on_major_version
  • (substring(version, CAST('^\d+\.\d+\.' AS text)), version, runner_id) index_ci_runner_machines_on_minor_version
  • (organization_id) index_ci_runner_machines_on_organization_id
  • (substring(version, CAST('^\d+\.\d+\.\d+' AS text)), version, runner_id) index_ci_runner_machines_on_patch_version
  • (version) index_ci_runner_machines_on_version

Referenced by

  • nothing

Table checks: char_length(system_xid) <= 64; char_length(revision) <= 255; char_length(version) <= 2048; char_length(ip_address) <= 1024; char_length(platform) <= 255; char_length(architecture) <= 255

ci_runner_namespaces

3 cols · no RLS · line 17955View in 3D
  • Nullable foreign key runner_idci_runner_namespaces.runner_id may be NULL, so the relationship to group_type_ci_runners is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
runner_id bigintnullgroup_type_ci_runners.id 1:N · CASCADE
namespace_id bigintnullCHECK namespace_id IS NOT NULL

Indexes

  • (namespace_id) index_ci_runner_namespaces_on_namespace_id
  • UNIQUE (runner_id, namespace_id) index_ci_runner_namespaces_on_runner_id_and_namespace_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

ci_runner_projects

5 cols · no RLS · line 17971View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
runner_id bigintNOT NULLproject_type_ci_runners.id 1:N · CASCADE
created_at timestampnull
updated_at timestampnull
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (project_id) index_ci_runner_projects_on_project_id
  • UNIQUE (runner_id, project_id) index_unique_ci_runner_projects_on_runner_id_and_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

ci_runner_taggings

6 cols · no RLS · line 17989View in 3D
  • Polymorphic reference without referential integrity runner_type, runner_idrunner_id points at different tables depending on runner_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • Isolated tableci_runner_taggings references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
tag_id bigintNOT NULL
runner_id bigintNOT NULL
runner_type PKsmallintNOT NULL
organization_id bigintnull
tag_name textnullCHECK tag_name IS NOT NULL

Indexes

  • (runner_id, runner_type) index_ci_runner_taggings_on_runner_id_and_runner_type
  • UNIQUE (tag_id, runner_id, runner_type) index_ci_runner_taggings_on_tag_id_runner_id_and_runner_type
  • (organization_id) index_ci_runner_taggings_on_organization_id

Referenced by

  • nothing

Table checks: tag_name IS NOT NULL; char_length(tag_name) <= 1024

ci_runner_taggings_group_type

6 cols · no RLS · line 18001View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
tag_id bigintNOT NULL
runner_id bigintNOT NULLgroup_type_ci_runners.id 1:N · CASCADE
runner_type PKsmallintNOT NULLgroup_type_ci_runners.id 1:N · CASCADE
organization_id bigintnullCHECK organization_id IS NOT NULL
tag_name textnullCHECK tag_name IS NOT NULL

Indexes

  • (runner_id, runner_type) idx_ci_runner_taggings_group_type_on_runner_id_and_runner_type
  • UNIQUE (tag_id, runner_id, runner_type) idx_ci_runner_taggings_group_type_on_tag_id_runner_id_and_type
  • (organization_id) index_ci_runner_taggings_group_type_on_organization_id

Referenced by

  • nothing

Table checks: organization_id IS NOT NULL; tag_name IS NOT NULL; char_length(tag_name) <= 1024

ci_runner_taggings_instance_type

6 cols · no RLS · line 18022View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
tag_id bigintNOT NULL
runner_id bigintNOT NULLinstance_type_ci_runners.id 1:N · CASCADE
runner_type PKsmallintNOT NULLinstance_type_ci_runners.id 1:N · CASCADE
organization_id bigintnullCHECK organization_id IS NULL
tag_name textnullCHECK tag_name IS NOT NULL

Indexes

  • UNIQUE (tag_id, runner_id, runner_type) idx_ci_runner_taggings_inst_type_on_tag_id_runner_id_and_type
  • (runner_id, runner_type) idx_ci_runner_taggings_instance_type_on_runner_id_and_type
  • (organization_id) index_ci_runner_taggings_instance_type_on_organization_id

Referenced by

  • nothing

Table checks: organization_id IS NULL; tag_name IS NOT NULL; char_length(tag_name) <= 1024

ci_runner_taggings_project_type

6 cols · no RLS · line 18034View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
tag_id bigintNOT NULL
runner_id bigintNOT NULLproject_type_ci_runners.id 1:N · CASCADE
runner_type PKsmallintNOT NULLproject_type_ci_runners.id 1:N · CASCADE
organization_id bigintnullCHECK organization_id IS NOT NULL
tag_name textnullCHECK tag_name IS NOT NULL

Indexes

  • UNIQUE (tag_id, runner_id, runner_type) idx_ci_runner_taggings_proj_type_on_tag_id_runner_id_and_type
  • (organization_id) index_ci_runner_taggings_project_type_on_organization_id
  • (runner_id, runner_type) index_ci_runner_taggings_project_type_on_runner_id_runner_type

Referenced by

  • nothing

Table checks: organization_id IS NOT NULL; tag_name IS NOT NULL; char_length(tag_name) <= 1024

ci_runner_versions

2 cols · no RLS · line 18046View in 3D
  • Isolated tableci_runner_versions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
version PKtextNOT NULLCHECK char_length(version) <= 2048
status smallintnull

Indexes

  • UNIQUE (status, version) index_ci_runner_versions_on_unique_status_and_version

Referenced by

  • nothing

Table checks: char_length(version) <= 2048

ci_runners

26 cols · no RLS · line 18052View in 3D
  • Monetary value stored as float public_projects_minutes_cost_factorpublic_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.
  • Monetary value stored as float private_projects_minutes_cost_factorprivate_projects_minutes_cost_factor is binary floating point. 0.1 + 0.2 ≠ 0.3; sums drift; reconciliation against the ledger will be off by cents.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
creator_id bigintnull
created_at timestamptznull
updated_at timestamptznull
contacted_at timestamptznull
token_expires_at timestamptznull
public_projects_minutes_cost_factor double precisionNOT NULL1.0
private_projects_minutes_cost_factor double precisionNOT NULL1.0
access_level integerNOT NULL0
maximum_timeout integernull
runner_type PKsmallintNOT NULL
registration_type smallintNOT NULL0
creation_state smallintNOT NULL0
active booleanNOT NULLTRUE
run_untagged booleanNOT NULLTRUE
locked booleanNOT NULLFALSE
name textnullCHECK char_length(name) <= 256
token_encrypted textnullCHECK char_length(token_encrypted) <= 512
description textnullCHECK char_length(description) <= 1024
maintainer_note textnullCHECK char_length(maintainer_note) <= 1024
allowed_plans text[]NOT NULLCAST('{}' AS text[])
allowed_plan_ids bigint[]NOT NULLCAST('{}' AS bigint[])
organization_id bigintnull
allowed_plan_name_uids smallint[]NOT NULLCAST('{}' AS smallint[])
token_rotation_deadline timestamptznull
uuid uuidnull

Indexes

  • (contacted_at, id) WHERE active = FALSE index_ci_runners_on_contacted_at_and_id_where_inactive
  • (locked) index_ci_runners_on_locked
  • (token_expires_at, id) index_ci_runners_on_token_expires_at_and_id_desc
  • (token_expires_at, id) index_ci_runners_on_token_expires_at_desc_and_id_desc
  • (active, id) index_ci_runners_on_active_and_id
  • (contacted_at, id) index_ci_runners_on_contacted_at_and_id_desc
  • UNIQUE (token_encrypted, runner_type) index_ci_runners_on_token_encrypted_and_runner_type
  • (contacted_at, id) index_ci_runners_on_contacted_at_desc_and_id_desc
  • (created_at, id) WHERE active = FALSE index_ci_runners_on_created_at_and_id_where_inactive
  • (created_at, id) index_ci_runners_on_created_at_desc_and_id_desc
  • (created_at, id) index_ci_runners_on_created_at_and_id_desc
  • (creator_id) WHERE creator_id IS NOT NULL index_ci_runners_on_creator_id_where_creator_id_not_null
  • (description) index_ci_runners_on_description_trigram
  • (organization_id) index_ci_runners_on_organization_id
  • UNIQUE (uuid, runner_type) index_ci_runners_on_uuid

Referenced by

Table checks: char_length(token_encrypted) <= 512; char_length(name) <= 256; char_length(maintainer_note) <= 1024; char_length(description) <= 1024

ci_running_builds

8 cols · no RLS · line 18095View in 3D
  • Polymorphic reference without referential integrity runner_type, runner_idrunner_id points at different tables depending on runner_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
build_id bigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
project_id bigintNOT NULL
runner_id bigintNOT NULL
created_at timestamptzNOT NULLnow()
runner_type smallintNOT NULL
partition_id bigintNOT NULLp_ci_builds.partition_id 1:1 · CASCADE
runner_owner_namespace_xid bigintnull

Indexes

  • (runner_type, runner_owner_namespace_xid, runner_id) idx_ci_running_builds_on_runner_type_and_owner_xid_and_id
  • UNIQUE (build_id) index_ci_running_builds_on_build_id
  • UNIQUE (partition_id, build_id) index_ci_running_builds_on_partition_id_build_id
  • (project_id) index_ci_running_builds_on_project_id
  • (runner_id) index_ci_running_builds_on_runner_id

Referenced by

  • nothing

ci_secure_file_states

9 cols · no RLS · line 18115View in 3D
  • Isolated tableci_secure_file_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
ci_secure_file_id PKbigintNOT NULL
verification_state smallintNOT NULL0
verification_retry_count smallintnull
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_ci_secure_file_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_ci_secure_file_states_needs_verification
  • (ci_secure_file_id) index_ci_secure_file_states_on_ci_secure_file_id
  • (project_id) index_ci_secure_file_states_on_project_id
  • (verification_state) index_ci_secure_file_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_ci_secure_file_states_pending_verification

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(verification_failure) <= 255

ci_secure_files

11 cols · no RLS · line 18138View in 3D
  • Isolated tableci_secure_files references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store smallintNOT NULL1
name textNOT NULLCHECK char_length(name) <= 255
file textNOT NULLCHECK char_length(file) <= 255
checksum byteaNOT NULL
key_data textnullCHECK char_length(key_data) <= 128
metadata jsonbnull
expires_at timestamptznull

Indexes

  • (project_id) index_ci_secure_files_on_project_id

Referenced by

  • nothing

Table checks: char_length(file) <= 255; char_length(name) <= 255; char_length(key_data) <= 128

ci_sources_pipelines

8 cols · no RLS · line 18164View in 3D
  • Foreign key without index source_partition_id, source_job_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan ci_sources_pipelines to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_sources_pipelines maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
  • Foreign key without index source_partition_id, source_pipeline_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_sources_pipelines to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_sources_pipelines maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
  • Foreign key without index partition_id, pipeline_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_sources_pipelines to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_sources_pipelines maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
  • Nullable foreign key source_partition_id, source_job_idci_sources_pipelines.source_partition_id.source_job_id may be NULL, so the relationship to p_ci_builds is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key source_partition_id, source_pipeline_idci_sources_pipelines.source_partition_id.source_pipeline_id may be NULL, so the relationship to p_ci_pipelines is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key partition_id, pipeline_idci_sources_pipelines.partition_id.pipeline_id may be NULL, so the relationship to p_ci_pipelines is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintnullCHECK project_id IS NOT NULL
source_project_id bigintnull
source_job_id bigintnullp_ci_builds.partition_id 1:N · CASCADE
partition_id bigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
source_partition_id bigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
pipeline_id bigintnullp_ci_pipelines.partition_id 1:N · CASCADE
source_pipeline_id bigintnullp_ci_pipelines.partition_id 1:N · CASCADE

Indexes

  • (pipeline_id) index_ci_sources_pipelines_on_pipeline_id
  • (project_id) index_ci_sources_pipelines_on_project_id
  • (source_job_id) index_ci_sources_pipelines_on_source_job_id
  • (source_pipeline_id) index_ci_sources_pipelines_on_source_pipeline_id
  • (source_project_id) index_ci_sources_pipelines_on_source_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

ci_sources_projects

4 cols · no RLS · line 18185View in 3D
  • Foreign key without index partition_id, pipeline_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_pipelines must scan ci_sources_projects to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_sources_projects maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_pipelines rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
pipeline_id bigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE
source_project_id bigintNOT NULL
partition_id bigintNOT NULLp_ci_pipelines.partition_id 1:N · CASCADE

Indexes

  • (pipeline_id) index_ci_sources_projects_on_pipeline_id
  • UNIQUE (source_project_id, pipeline_id) index_ci_sources_projects_on_source_project_id_and_pipeline_id

Referenced by

  • nothing

ci_subscriptions_projects

4 cols · no RLS · line 18210View in 3D
  • Isolated tableci_subscriptions_projects references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
downstream_project_id bigintNOT NULL
upstream_project_id bigintNOT NULL
author_id bigintnull

Indexes

  • (author_id) index_ci_subscriptions_projects_author_id
  • (upstream_project_id) index_ci_subscriptions_projects_on_upstream_project_id
  • UNIQUE (downstream_project_id, upstream_project_id) index_ci_subscriptions_projects_unique_subscription

Referenced by

  • nothing

ci_triggers

8 cols · no RLS · line 18226View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tableci_triggers references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestampnull
updated_at timestampnull
project_id bigintnullCHECK project_id IS NOT NULL
owner_id bigintNOT NULL
description varcharnull
expires_at timestamptznull
token_encrypted textnullCHECK char_length(token_encrypted) <= 255

Indexes

  • (expires_at) index_ci_triggers_on_expires_at
  • (owner_id) index_ci_triggers_on_owner_id
  • (project_id, id) index_ci_triggers_on_project_id_and_id
  • UNIQUE (token_encrypted) index_ci_triggers_on_token_encrypted

Referenced by

  • nothing

Table checks: char_length(token_encrypted) <= 255; project_id IS NOT NULL

ci_unit_test_failures

6 cols · no RLS · line 18248View in 3D
  • Foreign key without index partition_id, build_id — PostgreSQL does not index FK columns automatically. Every DELETE/UPDATE on p_ci_builds must scan ci_unit_test_failures to check the constraint, and every join from the parent side is a sequential scan. The scan cost grows with the child table forever, so this gets worse on its own. An index is not free. Every write to ci_unit_test_failures maintains it — insert, update and delete alike — and it takes disk. Weigh that against how often p_ci_builds rows are actually deleted or re-keyed — if the answer is never, the scan never happens and the index only costs.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
failed_at timestamptzNOT NULL
unit_test_id bigintNOT NULLci_unit_tests.id 1:N · CASCADE
build_id bigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
partition_id bigintNOT NULLp_ci_builds.partition_id 1:N · CASCADE
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (build_id) index_ci_unit_test_failures_on_build_id
  • (project_id) index_ci_unit_test_failures_on_project_id
  • (failed_at) index_unit_test_failures_failed_at
  • UNIQUE (unit_test_id, failed_at, build_id) index_unit_test_failures_unique_columns

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

ci_unit_tests

5 cols · no RLS · line 18267View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
key_hash textNOT NULLCHECK char_length(key_hash) <= 64
name textNOT NULLCHECK char_length(name) <= 255
suite_name textNOT NULLCHECK char_length(suite_name) <= 255

Indexes

  • UNIQUE (project_id, key_hash) index_ci_unit_tests_on_project_id_and_key_hash

Referenced by

Table checks: char_length(name) <= 255; char_length(key_hash) <= 64; char_length(suite_name) <= 255

ci_variables

13 cols · no RLS · line 18287View in 3D
  • Enum-like column with no CHECK environment_scopeenvironment_scope is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Isolated tableci_variables references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
key varcharNOT NULL
encrypted_value textnull
encrypted_value_salt varcharnull
encrypted_value_iv varcharnull
project_id bigintNOT NULL
protected booleanNOT NULLFALSE
environment_scope varcharNOT NULLCAST('*' AS varchar)
masked booleanNOT NULLFALSE
variable_type smallintNOT NULL1
raw booleanNOT NULLFALSE
description textnullCHECK char_length(description) <= 255
hidden booleanNOT NULLFALSE

Indexes

  • (key) index_ci_variables_on_key
  • UNIQUE (project_id, key, environment_scope) index_ci_variables_on_project_id_and_key_and_environment_scope

Referenced by

  • nothing

Table checks: char_length(description) <= 255

cloud 2 tables

Tables whose names start with cloud_.

Entity-relationship diagram: cloud_connector_access, cloud_connector_keyscloud_connector_accessid PKbigintcreated_attimestamptzupdated_attimestamptzdatajsonbcatalogjsonbcloud_connector_keysid PKbigintcreated_attimestamptzupdated_attimestamptzsecret_keyjsonb

Relationships

No foreign keys in this domain.

cloud_connector_access

5 cols · no RLS · line 18313View in 3D
  • Isolated tablecloud_connector_access references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
data jsonbnull
catalog jsonbnull

Indexes

  • none

Referenced by

  • nothing

cloud_connector_keys

4 cols · no RLS · line 18330View in 3D
  • Isolated tablecloud_connector_keys references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
secret_key jsonbnull

Indexes

  • none

Referenced by

  • nothing

cluster 10 tables

Tables whose names start with cluster_.

Entity-relationship diagram: cluster_agent_migrations, cluster_agent_tokens, cluster_agent_url_configurations, cluster_agents, cluster_enabled_grants, cluster_groups, cluster_platforms_kubernetes, cluster_projects, cluster_providers_aws, cluster_providers_gcpcluster_agent_migrationsid PKbigintcluster_id FKbigintagent_id FKbigintproject_id FKbigintissue_id FKbigintcreated_attimestamptzupdated_attimestamptzagent_install_statussmallintagent_install_messagetextcluster_agent_tokensid PKbigintcreated_attimestamptzupdated_attimestamptzagent_id FKbiginttoken_encryptedtextcreated_by_user_id FKbigintdescriptiontextnametextlast_used_attimestamptzstatussmallintproject_id FKbigintcluster_agent_url_configurationsid PKbigintcreated_attimestamptzupdated_attimestamptzagent_id FKbigintproject_id FKbigintcreated_by_user_id FKbigintstatussmallinturltextca_certtextclient_keytextclient_certtexttls_hosttextpublic_keybyteaencrypted_private_keybyteaencrypted_private_key_ivbyteacluster_agentsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintnametextcreated_by_user_id FKbiginthas_vulnerabilitiesbooleanconnection_modesmallintis_receptivebooleancluster_enabled_grantsid PKbigintnamespace_id FKbigintcreated_attimestamptzcluster_groupsid PKbigintcluster_id FKbigintgroup_id FKbigintcluster_platforms_kubernetesid PKbigintcluster_id FKbigintcreated_attimestampupdated_attimestampapi_urltextca_certtextnamespacevarcharusernamevarcharencrypted_passwordtextencrypted_password_ivvarcharencrypted_tokentextencrypted_token_ivvarcharauthorization_typesmallintorganization_id FKbigintgroup_id FKbigintproject_id FKbigintcluster_projectsid PKbigintproject_id FKbigintcluster_id FKbigintcreated_attimestampupdated_attimestampcluster_providers_awsid PKbigintcluster_id FKbigintnum_nodesintegerstatusintegercreated_attimestamptzupdated_attimestamptzkey_namevarchar(255)role_arnvarchar(2048)regionvarchar(255)vpc_idvarchar(255)subnet_idsvarchar(255)[]security_group_idvarchar(255)instance_typevarchar(255)access_key_idvarchar(255)encrypted_secret_access_key_ivvarchar(255)encrypted_secret_access_keytextsession_tokentextstatus_reasontextkubernetes_versiontextorganization_id FKbigintgroup_id FKbigintproject_id FKbigintcluster_providers_gcpid PKbigintcluster_id FKbigintstatusintegernum_nodesintegercreated_attimestampupdated_attimestampstatus_reasontextgcp_project_idvarcharzonevarcharmachine_typevarcharoperation_idvarcharendpointvarcharencrypted_access_tokentextencrypted_access_token_ivvarcharlegacy_abacbooleancloud_runbooleanorganization_id FKbigintgroup_id FKbigintproject_id FKbigintclustersissuesnamespacesorganizationsprojectsuserscreated_by_user_idproject_idnamespace_idgroup_idcluster_idorganization_idgroup_idproject_idcluster_idproject_idcluster_idproject_idgroup_idorganization_idcluster_idgroup_idproject_idorganization_idcluster_idagent_idcluster_idissue_idproject_idproject_idcreated_by_user_idagent_idagent_idcreated_by_user_idproject_id

Relationships

cluster_agent_migrations

9 cols · no RLS · line 18346View in 3D
  • Nullable foreign key issue_idcluster_agent_migrations.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
cluster_id bigintNOT NULLclusters.id 1:1 · CASCADE
agent_id bigintNOT NULLcluster_agents.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
issue_id bigintnullissues.id 1:N · SET NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
agent_install_status smallintNOT NULL
agent_install_message textnullCHECK char_length(agent_install_message) <= 255

Indexes

  • (agent_id) index_cluster_agent_migrations_on_agent_id
  • UNIQUE (cluster_id) index_cluster_agent_migrations_on_cluster_id
  • (issue_id) index_cluster_agent_migrations_on_issue_id
  • (project_id) index_cluster_agent_migrations_on_project_id

Referenced by

  • nothing

Table checks: char_length(agent_install_message) <= 255

cluster_agent_tokens

11 cols · no RLS · line 18368View in 3D
  • Nullable foreign key project_idcluster_agent_tokens.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key created_by_user_idcluster_agent_tokens.created_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, created_by_user_idcluster_agent_tokens has several nullable FKs (project_id, created_by_user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
agent_id bigintNOT NULLcluster_agents.id 1:N · CASCADE
token_encrypted textNOT NULLCHECK char_length(token_encrypted) <= 255
created_by_user_id bigintnullusers.id 1:N · SET NULL
description textnullCHECK char_length(description) <= 1024
name textnullCHECK name IS NOT NULL
last_used_at timestamptznull
status smallintNOT NULL0
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (agent_id, status, last_used_at) index_cluster_agent_tokens_on_agent_id_status_last_used_at
  • (created_by_user_id) index_cluster_agent_tokens_on_created_by_user_id
  • (project_id) index_cluster_agent_tokens_on_project_id
  • UNIQUE (token_encrypted) index_cluster_agent_tokens_on_token_encrypted

Referenced by

Table checks: name IS NOT NULL; char_length(name) <= 255; char_length(description) <= 1024; project_id IS NOT NULL; char_length(token_encrypted) <= 255

cluster_agent_url_configurations

15 cols · no RLS · line 18396View in 3D
  • Nullable foreign key created_by_user_idcluster_agent_url_configurations.created_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
agent_id bigintNOT NULLcluster_agents.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_by_user_id bigintnullusers.id 1:N · SET NULL
status smallintNOT NULL0
url textNOT NULLCHECK char_length(url) <= 2048
ca_cert textnullCHECK char_length(ca_cert) <= 16384
client_key textnullCHECK char_length(client_key) <= 16384
client_cert textnullCHECK char_length(client_cert) <= 16384
tls_host textnullCHECK char_length(tls_host) <= 2048
public_key byteanull
encrypted_private_key byteanull
encrypted_private_key_iv byteanull

Indexes

  • (agent_id) index_cluster_agent_url_configurations_on_agent_id
  • (project_id) index_cluster_agent_url_configurations_on_project_id
  • (created_by_user_id) WHERE created_by_user_id IS NOT NULL index_cluster_agent_url_configurations_on_user_id

Referenced by

  • nothing

Table checks: char_length(tls_host) <= 2048; char_length(ca_cert) <= 16384; char_length(client_cert) <= 16384; char_length(client_key) <= 16384; char_length(url) <= 2048

cluster_agents

9 cols · no RLS · line 18428View in 3D
  • Nullable foreign key created_by_user_idcluster_agents.created_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
created_by_user_id bigintnullusers.id 1:N · SET NULL
has_vulnerabilities booleanNOT NULLFALSE
connection_mode smallintNOT NULL0
is_receptive booleanNOT NULLFALSE

Indexes

  • (created_by_user_id) index_cluster_agents_on_created_by_user_id
  • (project_id, has_vulnerabilities) index_cluster_agents_on_project_id_and_has_vulnerabilities
  • UNIQUE (project_id, name) index_cluster_agents_on_project_id_and_name

Referenced by

Table checks: char_length(name) <= 255

cluster_enabled_grants

3 cols · no RLS · line 18450View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:1 · CASCADE
created_at timestamptzNOT NULL

Indexes

  • UNIQUE (namespace_id) index_cluster_enabled_grants_on_namespace_id

Referenced by

  • nothing

cluster_groups

3 cols · no RLS · line 18465View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
cluster_id bigintNOT NULLclusters.id 1:N · CASCADE
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • UNIQUE (cluster_id, group_id) index_cluster_groups_on_cluster_id_and_group_id
  • (group_id) index_cluster_groups_on_group_id

Referenced by

  • nothing

cluster_platforms_kubernetes

16 cols · no RLS · line 18480View in 3D
  • Nullable foreign key organization_idcluster_platforms_kubernetes.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idcluster_platforms_kubernetes.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idcluster_platforms_kubernetes.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
cluster_id bigintNOT NULLclusters.id 1:1 · CASCADE
created_at timestampNOT NULL
updated_at timestampNOT NULL
api_url textnull
ca_cert textnull
namespace varcharnull
username varcharnull
encrypted_password textnull
encrypted_password_iv varcharnull
encrypted_token textnull
encrypted_token_iv varcharnull
authorization_type smallintnull
organization_id bigintnullorganizations.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE

Indexes

  • (group_id) idx_cluster_platforms_kubernetes_on_group_id
  • (organization_id) idx_cluster_platforms_kubernetes_on_organization_id
  • (project_id) idx_cluster_platforms_kubernetes_on_project_id
  • UNIQUE (cluster_id) index_cluster_platforms_kubernetes_on_cluster_id

Referenced by

  • nothing

Table checks: num_nonnulls(group_id, organization_id, project_id) = 1

cluster_projects

5 cols · no RLS · line 18509View in 3D
  • Junction table allows duplicate links cluster_id, project_idcluster_projects looks like a many-to-many link table but has no unique constraint across (cluster_id, project_id). The same pair can be inserted twice; every join through it will double-count.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
cluster_id bigintNOT NULLclusters.id 1:N · CASCADE
created_at timestampNOT NULL
updated_at timestampNOT NULL

Indexes

  • (cluster_id) index_cluster_projects_on_cluster_id
  • (project_id) index_cluster_projects_on_project_id

Referenced by

cluster_providers_aws

22 cols · no RLS · line 18526View in 3D
  • Nullable foreign key project_idcluster_providers_aws.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idcluster_providers_aws.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idcluster_providers_aws.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
cluster_id bigintNOT NULLclusters.id 1:1 · CASCADE
num_nodes integerNOT NULL
status integerNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
key_name varchar(255)NOT NULL
role_arn varchar(2048)NOT NULL
region varchar(255)NOT NULL
vpc_id varchar(255)NOT NULL
subnet_ids varchar(255)[]NOT NULLCAST('{}' AS varchar[])
security_group_id varchar(255)NOT NULL
instance_type varchar(255)NOT NULL
access_key_id varchar(255)null
encrypted_secret_access_key_iv varchar(255)null
encrypted_secret_access_key textnull
session_token textnull
status_reason textnull
kubernetes_version textNOT NULLCAST('1.14' AS text)CHECK char_length(kubernetes_version) <= 30
organization_id bigintnullorganizations.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE

Indexes

  • (group_id) idx_cluster_providers_aws_on_group_id
  • (organization_id) idx_cluster_providers_aws_on_organization_id
  • (project_id) idx_cluster_providers_aws_on_project_id
  • UNIQUE (cluster_id) index_cluster_providers_aws_on_cluster_id
  • (cluster_id, status) index_cluster_providers_aws_on_cluster_id_and_status

Referenced by

  • nothing

Table checks: num_nonnulls(group_id, organization_id, project_id) = 1; char_length(kubernetes_version) <= 30

cluster_providers_gcp

19 cols · no RLS · line 18562View in 3D
  • Nullable foreign key group_idcluster_providers_gcp.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idcluster_providers_gcp.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idcluster_providers_gcp.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK machine_typemachine_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
cluster_id bigintNOT NULLclusters.id 1:1 · CASCADE
status integernull
num_nodes integerNOT NULL
created_at timestampNOT NULL
updated_at timestampNOT NULL
status_reason textnull
gcp_project_id varcharNOT NULL
zone varcharNOT NULL
machine_type varcharnull
operation_id varcharnull
endpoint varcharnull
encrypted_access_token textnull
encrypted_access_token_iv varcharnull
legacy_abac booleanNOT NULLFALSE
cloud_run booleanNOT NULLFALSE
organization_id bigintnullorganizations.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE

Indexes

  • (group_id) idx_cluster_providers_gcp_on_group_id
  • (organization_id) idx_cluster_providers_gcp_on_organization_id
  • (project_id) idx_cluster_providers_gcp_on_project_id
  • (cloud_run) index_cluster_providers_gcp_on_cloud_run
  • UNIQUE (cluster_id) index_cluster_providers_gcp_on_cluster_id

Referenced by

  • nothing

Table checks: num_nonnulls(group_id, organization_id, project_id) = 1

clusters 3 tables

Tables whose names start with clusters_.

Entity-relationship diagram: clusters, clusters_kubernetes_namespaces, clusters_managed_resourcesclustersid PKbigintuser_id FKbigintprovider_typeintegerplatform_typeintegercreated_attimestampupdated_attimestampenabledbooleannamevarcharenvironment_scopevarcharcluster_typesmallintdomainvarcharmanagedbooleannamespace_per_environmentbooleanmanagement_project_id FKbigintcleanup_statussmallintcleanup_status_reasontexthelm_major_versionintegerproject_id FKbigintgroup_id FKbigintorganization_id FKbigintclusters_kubernetes_namespacesid PKbigintcluster_id FKbigintproject_id FKbigintcluster_project_id FKbigintcreated_attimestamptzupdated_attimestamptzencrypted_service_account_tokentextencrypted_service_account_token_ivvarcharnamespacevarcharservice_account_namevarcharenvironment_id FKbigintorganization_id FKbigintgroup_id FKbigintsharding_project_id FKbigintclusters_managed_resourcesid PKbigintbuild_idbigintproject_id FKbigintenvironment_id FKbigintcluster_agent_id FKbigintcreated_attimestamptzupdated_attimestamptzstatussmallinttemplate_nametexttracked_objectsjsonbdeletion_strategysmallintcluster_agentscluster_projectsenvironmentsnamespacesorganizationsprojectsusersorganization_idgroup_idmanagement_project_idproject_iduser_idcluster_agent_idproject_idenvironment_idorganization_idgroup_idsharding_project_idcluster_project_idcluster_idenvironment_idproject_id

Relationships

clusters

20 cols · no RLS · line 18594View in 3D
  • Nullable foreign key organization_idclusters.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idclusters.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key management_project_idclusters.management_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idclusters.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idclusters.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK environment_scopeenvironment_scope is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Either/or foreign keys without a CHECK organization_id, group_id, management_project_id, project_id, user_idclusters has several nullable FKs (organization_id, group_id, management_project_id, project_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintnullusers.id 1:N · SET NULL
provider_type integernull
platform_type integernull
created_at timestampNOT NULL
updated_at timestampNOT NULL
enabled booleannullTRUE
name varcharNOT NULL
environment_scope varcharNOT NULLCAST('*' AS varchar)
cluster_type smallintNOT NULL3
domain varcharnull
managed booleanNOT NULLTRUE
namespace_per_environment booleanNOT NULLTRUE
management_project_id bigintnullprojects.id 1:N · SET NULL
cleanup_status smallintNOT NULL1
cleanup_status_reason textnull
helm_major_version integerNOT NULL3
project_id bigintnullprojects.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (enabled, provider_type, id) index_clusters_on_enabled_and_provider_type_and_id
  • (enabled, cluster_type, id, created_at) index_clusters_on_enabled_cluster_type_id_and_created_at
  • (group_id) index_clusters_on_group_id
  • (management_project_id) WHERE management_project_id IS NOT NULL index_clusters_on_management_project_id
  • (organization_id) index_clusters_on_organization_id
  • (project_id) index_clusters_on_project_id
  • (user_id) index_clusters_on_user_id
  • (id) WHERE enabled = TRUE index_enabled_clusters_on_id

Referenced by

Table checks: num_nonnulls(group_id, organization_id, project_id) = 1

clusters_kubernetes_namespaces

14 cols · no RLS · line 18627View in 3D
  • Nullable foreign key organization_idclusters_kubernetes_namespaces.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idclusters_kubernetes_namespaces.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key sharding_project_idclusters_kubernetes_namespaces.sharding_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key cluster_project_idclusters_kubernetes_namespaces.cluster_project_id may be NULL, so the relationship to cluster_projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key environment_idclusters_kubernetes_namespaces.environment_id may be NULL, so the relationship to environments is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idclusters_kubernetes_namespaces.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK organization_id, group_id, sharding_project_id, cluster_project_id, environment_id, project_idclusters_kubernetes_namespaces has several nullable FKs (organization_id, group_id, sharding_project_id, cluster_project_id, environment_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
cluster_id bigintNOT NULLclusters.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · SET NULL
cluster_project_id bigintnullcluster_projects.id 1:N · SET NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
encrypted_service_account_token textnull
encrypted_service_account_token_iv varcharnull
namespace varcharNOT NULL
service_account_name varcharnull
environment_id bigintnullenvironments.id 1:N · SET NULL
organization_id bigintnullorganizations.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
sharding_project_id bigintnullprojects.id 1:N · CASCADE

Indexes

  • (group_id) idx_clusters_kubernetes_namespaces_on_group_id
  • (organization_id) idx_clusters_kubernetes_namespaces_on_organization_id
  • (sharding_project_id) idx_clusters_kubernetes_namespaces_on_sharding_project_id
  • (cluster_project_id) index_clusters_kubernetes_namespaces_on_cluster_project_id
  • (environment_id) index_clusters_kubernetes_namespaces_on_environment_id
  • (project_id) index_clusters_kubernetes_namespaces_on_project_id
  • UNIQUE (cluster_id, project_id, environment_id) index_kubernetes_namespaces_on_cluster_project_environment_id
  • UNIQUE (cluster_id, namespace) kubernetes_namespaces_cluster_and_namespace

Referenced by

  • nothing

Table checks: num_nonnulls(group_id, organization_id, sharding_project_id) = 1

clusters_managed_resources

11 cols · no RLS · line 18654View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
build_id bigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
environment_id bigintNOT NULLenvironments.id 1:N · CASCADE
cluster_agent_id bigintNOT NULLcluster_agents.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
template_name textnullCHECK char_length(template_name) <= 1024
tracked_objects jsonbNOT NULLCAST('[]' AS jsonb)
deletion_strategy smallintNOT NULL0

Indexes

  • UNIQUE (build_id) index_clusters_managed_resources_on_build_id
  • (cluster_agent_id) index_clusters_managed_resources_on_cluster_agent_id
  • (environment_id) index_clusters_managed_resources_on_environment_id
  • (project_id) index_clusters_managed_resources_on_project_id

Referenced by

  • nothing

Table checks: char_length(template_name) <= 1024

compliance 4 tables

Tables whose names start with compliance_.

Entity-relationship diagram: compliance_framework_security_policies, compliance_management_frameworks, compliance_requirements, compliance_requirements_controlscompliance_framework_security_policiesid PKbigintframework_id FKbigintpolicy_configuration_id FKbigintcreated_attimestamptzupdated_attimestamptzpolicy_indexsmallintproject_id FKbigintnamespace_id FKbigintsecurity_policy_id FKbigintcompliance_management_frameworksid PKbigintnametextdescriptiontextcolortextnamespace_id FKbigintpipeline_configuration_full_pathtextcreated_attimestamptzupdated_attimestamptzsource_idbiginttemplate_idtexttemplate_versionintegercompliance_requirementsid PKbigintcreated_attimestamptzupdated_attimestamptzframework_id FKbigintnamespace_id FKbigintnametextdescriptiontextcompliance_requirements_controlsid PKbigintcreated_attimestamptzupdated_attimestamptzcompliance_requirement_id FKbigintnamespace_id FKbigintnamesmallintcontrol_typesmallintexpressiontextencrypted_secret_tokenbyteaencrypted_secret_token_ivbyteaexternal_urltextexternal_control_nametextping_enabledbooleannamespacesprojectssecurity_orchestration_policy_configurationssecurity_policiesnamespace_idsecurity_policy_idnamespace_idproject_idframework_idpolicy_configuration_idnamespace_idframework_idnamespace_idcompliance_requirement_id

Relationships

compliance_framework_security_policies

9 cols · no RLS · line 18698View in 3D
  • Nullable foreign key security_policy_idcompliance_framework_security_policies.security_policy_id may be NULL, so the relationship to security_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idcompliance_framework_security_policies.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idcompliance_framework_security_policies.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK security_policy_id, namespace_id, project_idcompliance_framework_security_policies has several nullable FKs (security_policy_id, namespace_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
framework_id bigintNOT NULLcompliance_management_frameworks.id 1:N · CASCADE
policy_configuration_id bigintNOT NULLsecurity_orchestration_policy_configurations.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
policy_index smallintNOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
security_policy_id bigintnullsecurity_policies.id 1:N · CASCADE

Indexes

  • (framework_id) idx_compliance_security_policies_on_framework_id
  • (policy_configuration_id) idx_compliance_security_policies_on_policy_configuration_id
  • (security_policy_id, id) idx_compliance_security_policies_on_security_policy_and_id
  • (namespace_id) index_compliance_framework_security_policies_on_namespace_id
  • (project_id) index_compliance_framework_security_policies_on_project_id
  • UNIQUE (framework_id, policy_configuration_id, policy_index) WHERE security_policy_id IS NULL unique_compliance_security_policies_framework_id_policy_index
  • UNIQUE (security_policy_id, framework_id) WHERE security_policy_id IS NOT NULL unique_compliance_security_policies_security_policy_id

Referenced by

Table checks: num_nonnulls(namespace_id, project_id) = 1

compliance_management_frameworks

11 cols · no RLS · line 18720View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
description textNOT NULLCHECK char_length(description) <= 255
color textNOT NULLCHECK char_length(color) <= 10
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
pipeline_configuration_full_path textnullCHECK char_length(pipeline_configuration_full_path) <= 255
created_at timestamptznull
updated_at timestamptznull
source_id bigintnull
template_id textnullCHECK char_length(template_id) <= 255
template_version integernull

Indexes

  • (id, created_at, pipeline_configuration_full_path) i_compliance_frameworks_on_id_and_created_at
  • UNIQUE (namespace_id, name) idx_on_compliance_management_frameworks_namespace_id_name
  • (id) WHERE pipeline_configuration_full_path IS NOT NULL index_compliance_frameworks_id_where_frameworks_not_null
  • (name) index_compliance_management_frameworks_on_name_trigram

Referenced by

Table checks: char_length(color) <= 10; char_length(description) <= 255; char_length(name) <= 255; char_length(pipeline_configuration_full_path) <= 255; char_length(template_id) <= 255

compliance_requirements

7 cols · no RLS · line 18747View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
framework_id bigintNOT NULLcompliance_management_frameworks.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
description textNOT NULLCHECK char_length(description) <= 500

Indexes

  • (namespace_id) index_compliance_requirements_on_namespace_id
  • UNIQUE (framework_id, name) u_compliance_requirements_for_framework

Referenced by

Table checks: char_length(description) <= 500; char_length(name) <= 255

compliance_requirements_controls

13 cols · no RLS · line 18759View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
compliance_requirement_id bigintNOT NULLcompliance_requirements.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
name smallintNOT NULL
control_type smallintNOT NULL
expression textnullCHECK char_length(expression) <= 255
encrypted_secret_token byteanullCHECK octet_length(encrypted_secret_token) <= 256
encrypted_secret_token_iv byteanull
external_url textnullCHECK char_length(external_url) <= 1024
external_control_name textnullCHECK char_length(external_control_name) <= 255
ping_enabled booleanNOT NULLTRUE

Indexes

  • UNIQUE (compliance_requirement_id, external_control_name) WHERE external_control_name IS NOT NULL AND external_control_name <> CAST('' AS text) i_uniq_external_control_name_per_requirement
  • (namespace_id) idx_compliance_requirements_controls_on_namespace_id
  • (compliance_requirement_id) idx_compliance_requirements_controls_on_requirement_id
  • UNIQUE (compliance_requirement_id, name) WHERE control_type <> 1 uniq_compliance_controls_requirement_id_and_name

Referenced by

Table checks: char_length(expression) <= 255; char_length(external_url) <= 1024; octet_length(encrypted_secret_token) <= 256; char_length(external_control_name) <= 255

container 5 tables

Tables whose names start with container_.

Entity-relationship diagram: container_expiration_policies, container_registry_protection_rules, container_registry_protection_tag_rules, container_repositories, container_repository_statescontainer_expiration_policiesproject_id PKbigintcreated_attimestamptzupdated_attimestamptznext_run_attimestamptzname_regexvarchar(255)cadencevarchar(12)older_thanvarchar(12)keep_nintegerenabledbooleanname_regex_keeptextcontainer_registry_protection_rulesid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzrepository_path_patterntextminimum_access_level_for_pushsmallintminimum_access_level_for_deletesmallintcontainer_registry_protection_tag_rulesid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzminimum_access_level_for_pushsmallintminimum_access_level_for_deletesmallinttag_name_patterntextcontainer_repositoriesid PKbigintproject_id FKbigintnamevarcharcreated_attimestampupdated_attimestampstatussmallintexpiration_policy_started_attimestamptzexpiration_policy_cleanup_statussmallintexpiration_policy_completed_attimestamptzlast_cleanup_deleted_tags_countintegerdelete_started_attimestamptzstatus_updated_attimestamptzfailed_deletion_countintegernext_delete_attempt_attimestamptzcontainer_repository_statesverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzcontainer_repository_id PKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextproject_id FKbigintprojectsproject_idproject_idproject_idproject_idproject_idcontainer_repository_id

Relationships

container_expiration_policies

10 cols · no RLS · line 18814View in 3D
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
next_run_at timestamptznull
name_regex varchar(255)nullCAST('.*' AS varchar)
cadence varchar(12)NOT NULLCAST('1d' AS varchar)
older_than varchar(12)nullCAST('90d' AS varchar)
keep_n integernull10
enabled booleanNOT NULLFALSE
name_regex_keep textnullCHECK char_length(name_regex_keep) <= 255

Indexes

  • (project_id, next_run_at) WHERE enabled = TRUE idx_container_exp_policies_on_project_id_next_run_at
  • (project_id, next_run_at, enabled) idx_container_exp_policies_on_project_id_next_run_at_enabled
  • (next_run_at, enabled) index_container_expiration_policies_on_next_run_at_and_enabled

Referenced by

  • nothing

Table checks: char_length(name_regex_keep) <= 255

container_registry_protection_rules

7 cols · no RLS · line 18828View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
repository_path_pattern textnullCHECK repository_path_pattern IS NOT NULL
minimum_access_level_for_push smallintnull
minimum_access_level_for_delete smallintnull

Indexes

  • UNIQUE (project_id, repository_path_pattern) i_container_protection_unique_project_repository_path_pattern

Referenced by

  • nothing

Table checks: num_nonnulls(minimum_access_level_for_delete, minimum_access_level_for_push) > 0; repository_path_pattern IS NOT NULL; char_length(repository_path_pattern) <= 255

container_registry_protection_tag_rules

7 cols · no RLS · line 18850View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
minimum_access_level_for_push smallintnull
minimum_access_level_for_delete smallintnull
tag_name_pattern textNOT NULLCHECK char_length(tag_name_pattern) <= 255

Indexes

  • (project_id, minimum_access_level_for_push, minimum_access_level_for_delete) idx_container_registry_protection_tag_rules_on_min_access_level
  • UNIQUE (project_id, tag_name_pattern) WHERE minimum_access_level_for_push IS NULL AND minimum_access_level_for_delete IS NULL unique_protection_tag_rules_immutable
  • UNIQUE (project_id, tag_name_pattern) WHERE minimum_access_level_for_push IS NOT NULL AND minimum_access_level_for_delete IS NOT NULL unique_protection_tag_rules_mutable

Referenced by

  • nothing

Table checks: char_length(tag_name_pattern) <= 255; num_nonnulls(minimum_access_level_for_delete, minimum_access_level_for_push) <> 1

container_repositories

14 cols · no RLS · line 18871View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N
name varcharNOT NULL
created_at timestampNOT NULL
updated_at timestampNOT NULL
status smallintnull
expiration_policy_started_at timestamptznull
expiration_policy_cleanup_status smallintNOT NULL0
expiration_policy_completed_at timestamptznull
last_cleanup_deleted_tags_count integernull
delete_started_at timestamptznull
status_updated_at timestamptznull
failed_deletion_count integerNOT NULL0CHECK failed_deletion_count >= 0
next_delete_attempt_at timestamptznull

Indexes

  • (expiration_policy_cleanup_status, project_id, expiration_policy_started_at) idx_container_repos_on_exp_cleanup_status_project_id_start_date
  • (next_delete_attempt_at) WHERE status = 0 index_container_repositories_on_next_delete_attempt_at
  • (project_id, id) index_container_repositories_on_project_id_and_id
  • UNIQUE (project_id, name) index_container_repositories_on_project_id_and_name
  • (status, id) WHERE status IS NOT NULL index_container_repositories_on_status_and_id
  • (name) index_container_repository_on_name_trigram

Referenced by

Table checks: failed_deletion_count >= 0

container_repository_states

9 cols · no RLS · line 18898View in 3D
  • Nullable foreign key project_idcontainer_repository_states.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
container_repository_id PKbigintNOT NULLcontainer_repositories.id 1:1 · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_container_repository_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_container_repository_states_needs_verification
  • (project_id) index_container_repository_states_on_project_id
  • (verification_state) index_container_repository_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_container_repository_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255; project_id IS NOT NULL

custom 7 tables

Tables whose names start with custom_.

Entity-relationship diagram: custom_dashboard_search_data, custom_dashboard_versions, custom_dashboards, custom_emoji, custom_field_select_options, custom_fields, custom_software_licensescustom_dashboard_search_dataid PKbigintcustom_dashboard_id FKbigintnametextdescriptiontextsearch_vectortsvectorcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintcustom_dashboard_versionsid PKbigintcustom_dashboard_id FKbigintversion_numberintegerconfigjsonbupdated_by_id FKbigintcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintcustom_dashboardsid PKbigintnamespace_id FKbigintorganization_id FKbigintcreated_by_id FKbigintupdated_by_id FKbigintlock_versionintegernametextdescriptiontextconfigjsonbcreated_attimestamptzupdated_attimestamptzcustom_emojiid PKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptznametextfiletextexternalbooleancreator_id FKbigintcustom_field_select_optionsid PKbigintnamespace_id FKbigintcustom_field_id FKbigintcreated_attimestamptzupdated_attimestamptzpositionsmallintvaluetextcustom_fieldsid PKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzarchived_attimestamptzfield_typesmallintnametextcreated_by_id FKbigintupdated_by_id FKbigintcustom_software_licensesid PKbigintproject_id FKbigintnametextnamespacesorganizationsprojectsuserscreated_by_idnamespace_idorganization_idupdated_by_idcreator_idnamespace_idnamespace_idcreated_by_idupdated_by_idproject_idcustom_dashboard_idorganization_idorganization_idupdated_by_idcustom_dashboard_idcustom_field_idnamespace_id

Relationships

custom_dashboard_search_data

8 cols · no RLS · line 19038View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
custom_dashboard_id bigintNOT NULLcustom_dashboards.id 1:1 · CASCADE
name textNOT NULLCAST('' AS text)CHECK char_length(name) <= 255
description textNOT NULLCAST('' AS text)CHECK char_length(description) <= 2048
search_vector tsvectornull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE

Indexes

  • UNIQUE (custom_dashboard_id) index_custom_dashboard_search_data_on_custom_dashboard_id
  • (organization_id) index_custom_dashboard_search_data_on_organization_id
  • (search_vector) index_custom_dashboard_search_data_on_search_vector_gin

Referenced by

  • nothing

Table checks: char_length(name) <= 255; char_length(description) <= 2048

custom_dashboard_versions

8 cols · no RLS · line 19060View in 3D
  • Nullable foreign key updated_by_idcustom_dashboard_versions.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
custom_dashboard_id bigintNOT NULLcustom_dashboards.id 1:N
version_number integerNOT NULL
config jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(config) = CAST('object' AS text)
updated_by_id bigintnullusers.id 1:N · SET NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE

Indexes

  • (created_at) index_custom_dashboard_versions_on_created_at
  • (organization_id) index_custom_dashboard_versions_on_organization_id
  • (updated_by_id) index_custom_dashboard_versions_on_updated_by_id
  • UNIQUE (custom_dashboard_id, version_number) index_dashboard_versions_on_dashboard_and_version

Referenced by

  • nothing

Table checks: jsonb_typeof(config) = CAST('object' AS text)

custom_dashboards

11 cols · no RLS · line 19081View in 3D
  • Nullable foreign key created_by_idcustom_dashboards.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idcustom_dashboards.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key updated_by_idcustom_dashboards.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK created_by_id, namespace_id, updated_by_idcustom_dashboards has several nullable FKs (created_by_id, namespace_id, updated_by_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintnullnamespaces.id 1:N · SET NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
created_by_id bigintnullusers.id 1:N · SET NULL
updated_by_id bigintnullusers.id 1:N · SET NULL
lock_version integerNOT NULL0
name textNOT NULLCHECK char_length(name) <= 255
description textNOT NULLCAST('' AS text)CHECK char_length(description) <= 2048
config jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(config) = CAST('object' AS text)
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (organization_id, namespace_id, name) idx_unique_dashboard_name_org_namespace
  • (created_by_id) index_custom_dashboards_on_created_by_id
  • (namespace_id) index_custom_dashboards_on_namespace_id
  • (updated_by_id) index_custom_dashboards_on_updated_by_id

Referenced by

Table checks: char_length(name) <= 255; char_length(description) <= 2048; jsonb_typeof(config) = CAST('object' AS text)

custom_emoji

8 cols · no RLS · line 19107View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 36
file textNOT NULLCHECK char_length(file) <= 255
external booleanNOT NULLTRUE
creator_id bigintNOT NULLusers.id 1:N · CASCADE

Indexes

  • (creator_id) index_custom_emoji_on_creator_id
  • UNIQUE (namespace_id, name) index_custom_emoji_on_namespace_id_and_name

Referenced by

  • nothing

Table checks: char_length(name) <= 36; char_length(file) <= 255

custom_field_select_options

7 cols · no RLS · line 19129View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
custom_field_id bigintNOT NULLcustom_fields.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
position smallintNOT NULL
value textNOT NULLCHECK char_length(value) <= 255

Indexes

  • UNIQUE (custom_field_id, lower(value)) idx_custom_field_select_options_on_custom_field_id_lower_value
  • (namespace_id) index_custom_field_select_options_on_namespace_id

Referenced by

Table checks: char_length(value) <= 255

custom_fields

9 cols · no RLS · line 19149View in 3D
  • Nullable foreign key created_by_idcustom_fields.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key updated_by_idcustom_fields.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK created_by_id, updated_by_idcustom_fields has several nullable FKs (created_by_id, updated_by_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
archived_at timestamptznull
field_type smallintNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
created_by_id bigintnullusers.id 1:N · SET NULL
updated_by_id bigintnullusers.id 1:N · SET NULL

Indexes

  • UNIQUE (namespace_id, lower(name)) idx_custom_fields_on_namespace_id_and_lower_name
  • (created_by_id) index_custom_fields_on_created_by_id
  • (updated_by_id) index_custom_fields_on_updated_by_id

Referenced by

Table checks: char_length(name) <= 255

custom_software_licenses

3 cols · no RLS · line 19171View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255

Indexes

  • (lower(name)) idx_custom_software_licenses_lower_name
  • UNIQUE (project_id, name) index_custom_software_licenses_on_project_id_and_name

Referenced by

Table checks: char_length(name) <= 255

customer 2 tables

Tables whose names start with customer_.

Entity-relationship diagram: customer_relations_contacts, customer_relations_organizationscustomer_relations_contactsid PKbigintgroup_id FKbigintorganization_id FKbigintcreated_attimestamptzupdated_attimestamptzstatesmallintphonetextfirst_nametextlast_nametextemailtextdescriptiontextcustomer_relations_organizationsid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzstatesmallintdefault_ratenumeric(18, 2)nametextdescriptiontextnamespacesgroup_idgroup_idorganization_id

Relationships

customer_relations_contacts

11 cols · no RLS · line 19187View in 3D
  • Nullable foreign key organization_idcustomer_relations_contacts.organization_id may be NULL, so the relationship to customer_relations_organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
organization_id bigintnullcustomer_relations_organizations.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
state smallintNOT NULL1
phone textnullCHECK char_length(phone) <= 32
first_name textNOT NULLCHECK char_length(first_name) <= 255
last_name textNOT NULLCHECK char_length(last_name) <= 255
email textnullCHECK char_length(email) <= 255
description textnullCHECK char_length(description) <= 1024

Indexes

  • (group_id) index_customer_relations_contacts_on_group_id
  • (organization_id) index_customer_relations_contacts_on_organization_id
  • UNIQUE (group_id, lower(email), id) index_customer_relations_contacts_on_unique_email_per_group

Referenced by

Table checks: char_length(first_name) <= 255; char_length(description) <= 1024; char_length(last_name) <= 255; char_length(phone) <= 32; char_length(email) <= 255

customer_relations_organizations

8 cols · no RLS · line 19215View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
state smallintNOT NULL1
default_rate numeric(18, 2)null
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 1024

Indexes

  • UNIQUE (group_id, lower(name), id) index_organizations_on_unique_name_per_group

Referenced by

Table checks: char_length(name) <= 255; char_length(description) <= 1024

dast 14 tables

Tables whose names start with dast_.

Entity-relationship diagram: dast_pre_scan_verification_steps, dast_pre_scan_verifications, dast_profile_schedules, dast_profiles, dast_profiles_pipelines, dast_profiles_tags, dast_scanner_profiles, dast_scanner_profiles_builds, dast_site_profile_secret_variables, dast_site_profiles, dast_site_profiles_builds, dast_site_tokens, dast_site_validations, dast_sitesdast_pre_scan_verification_stepsid PKbigintdast_pre_scan_verification_id FKbigintcreated_attimestamptzupdated_attimestamptznametextverification_errorstext[]check_typesmallintproject_idbigintdast_pre_scan_verificationsid PKbigintdast_profile_id FKbigintci_pipeline_idbigintcreated_attimestamptzupdated_attimestamptzstatussmallintproject_idbigintdast_profile_schedulesid PKbigintproject_idbigintdast_profile_id FKbigintuser_idbigintnext_run_attimestamptzcreated_attimestamptzupdated_attimestamptzactivebooleancrontextcadencejsonbtimezonetextstarts_attimestamptzdast_profilesid PKbigintproject_idbigintdast_site_profile_id FKbigintdast_scanner_profile_id FKbigintcreated_attimestamptzupdated_attimestamptznametextdescriptiontextbranch_nametextdast_profiles_pipelinesdast_profile_id PKbigintci_pipeline_id PKbigintproject_idbigintdast_profiles_tagsid PKbigintdast_profile_id FKbiginttag_idbigintproject_idbiginttag_nametextdast_scanner_profilesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintspider_timeoutsmallinttarget_timeoutsmallintnametextscan_typesmallintuse_ajax_spiderbooleanshow_debug_messagesbooleandast_scanner_profiles_buildsdast_scanner_profile_id PKbigintci_build_id PKbigintproject_idbigintdast_site_profile_secret_variablesid PKbigintdast_site_profile_id FKbigintcreated_attimestamptzupdated_attimestamptzvariable_typesmallintkeytextencrypted_valuebyteaencrypted_value_ivbyteaproject_idbigintdast_site_profilesid PKbigintproject_idbigintdast_site_id FKbigintcreated_attimestamptzupdated_attimestamptznametextexcluded_urlstext[]auth_enabledbooleanauth_urltextauth_username_fieldtextauth_password_fieldtextauth_usernametexttarget_typesmallintscan_methodsmallintauth_submit_fieldtextscan_file_pathtextoptional_variablesjsonbdast_site_profiles_buildsdast_site_profile_id PKbigintci_build_id PKbigintproject_idbigintdast_site_tokensid PKbigintproject_idbigintcreated_attimestamptzupdated_attimestamptzexpired_attimestamptztokentexturltextdast_site_validationsid PKbigintdast_site_token_id FKbigintcreated_attimestamptzupdated_attimestamptzvalidation_started_attimestamptzvalidation_passed_attimestamptzvalidation_failed_attimestamptzvalidation_last_retried_attimestamptzvalidation_strategysmallinturl_basetexturl_pathtextstatetextproject_idbigintdast_sitesid PKbigintproject_idbigintcreated_attimestamptzupdated_attimestamptzurltextdast_site_validation_id FKbigintdast_scanner_profile_iddast_site_token_iddast_site_validation_iddast_site_iddast_scanner_profile_iddast_site_profile_iddast_site_profile_iddast_site_profile_iddast_profile_iddast_profile_iddast_profile_iddast_profile_iddast_pre_scan_verification_id

Relationships

dast_pre_scan_verification_steps

8 cols · no RLS · line 19237View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
dast_pre_scan_verification_id bigintNOT NULLdast_pre_scan_verifications.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textnullCHECK char_length(name) <= 255
verification_errors text[]NOT NULLCAST('{}' AS text[])
check_type smallintNOT NULL0
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (dast_pre_scan_verification_id) i_dast_pre_scan_verification_steps_on_pre_scan_verification_id
  • (project_id) index_dast_pre_scan_verification_steps_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(name) <= 255

dast_pre_scan_verifications

7 cols · no RLS · line 19259View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
dast_profile_id bigintNOT NULLdast_profiles.id 1:N · CASCADE
ci_pipeline_id bigintnull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • UNIQUE (ci_pipeline_id) index_dast_pre_scan_verifications_on_ci_pipeline_id
  • (dast_profile_id) index_dast_pre_scan_verifications_on_dast_profile_id
  • (project_id) index_dast_pre_scan_verifications_on_project_id

Referenced by

Table checks: project_id IS NOT NULL

dast_profile_schedules

12 cols · no RLS · line 19279View in 3D

{"owner":"group::dynamic analysis","description":"Scheduling for scans using DAST Profiles"}

ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
dast_profile_id bigintNOT NULLdast_profiles.id 1:1 · CASCADE
user_id bigintnull
next_run_at timestamptzNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
active booleanNOT NULLTRUE
cron textNOT NULLCHECK char_length(cron) <= 255
cadence jsonbNOT NULLCAST('{}' AS jsonb)
timezone textNOT NULLCHECK char_length(timezone) <= 255
starts_at timestamptzNOT NULLnow()

Indexes

  • (active, next_run_at) index_dast_profile_schedules_active_next_run_at
  • UNIQUE (dast_profile_id) index_dast_profile_schedules_on_dast_profile_id
  • (project_id) index_dast_profile_schedules_on_project_id
  • (user_id) index_dast_profile_schedules_on_user_id

Referenced by

  • nothing

Table checks: char_length(cron) <= 255; char_length(timezone) <= 255

dast_profiles

9 cols · no RLS · line 19307View in 3D

{"owner":"group::dynamic analysis","description":"Profile used to run a DAST on-demand scan"}

ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
dast_site_profile_id bigintNOT NULLdast_site_profiles.id 1:N · CASCADE
dast_scanner_profile_id bigintNOT NULLdast_scanner_profiles.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
description textNOT NULLCHECK char_length(description) <= 255
branch_name textnullCHECK char_length(branch_name) <= 255

Indexes

  • (dast_scanner_profile_id) index_dast_profiles_on_dast_scanner_profile_id
  • (dast_site_profile_id) index_dast_profiles_on_dast_site_profile_id
  • UNIQUE (project_id, name) index_dast_profiles_on_project_id_and_name

Referenced by

Table checks: char_length(name) <= 255; char_length(branch_name) <= 255; char_length(description) <= 255

dast_profiles_pipelines

3 cols · no RLS · line 19333View in 3D

{"owner":"group::dynamic analysis","description":"Join table between DAST Profiles and CI Pipelines"}

ColumnTypeNullDefaultReferencesNotes
dast_profile_id PKbigintNOT NULLdast_profiles.id 1:N · CASCADE
ci_pipeline_id PKbigintNOT NULL
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • UNIQUE (ci_pipeline_id) index_dast_profiles_pipelines_on_ci_pipeline_id
  • (project_id) index_dast_profiles_pipelines_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

dast_profiles_tags

5 cols · no RLS · line 19342View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
dast_profile_id bigintNOT NULLdast_profiles.id 1:N · CASCADE
tag_id bigintNOT NULL
project_id bigintnullCHECK project_id IS NOT NULL
tag_name textnullCHECK tag_name IS NOT NULL

Indexes

  • (dast_profile_id) i_dast_profiles_tags_on_scanner_profiles_id
  • (project_id) index_dast_profiles_tags_on_project_id
  • (tag_id) index_dast_profiles_tags_on_tag_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; tag_name IS NOT NULL; char_length(tag_name) <= 1024

dast_scanner_profiles

10 cols · no RLS · line 19362View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
spider_timeout smallintnull
target_timeout smallintnull
name textNOT NULLCHECK char_length(name) <= 255
scan_type smallintNOT NULL1
use_ajax_spider booleanNOT NULLFALSE
show_debug_messages booleanNOT NULLFALSE

Indexes

  • UNIQUE (project_id, name) index_dast_scanner_profiles_on_project_id_and_name

Referenced by

Table checks: char_length(name) <= 255

dast_scanner_profiles_builds

3 cols · no RLS · line 19376View in 3D

{"owner":"group::dynamic analysis","description":"Join table between DAST Scanner Profiles and CI Builds"}

ColumnTypeNullDefaultReferencesNotes
dast_scanner_profile_id PKbigintNOT NULLdast_scanner_profiles.id 1:N · CASCADE
ci_build_id PKbigintNOT NULL
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • UNIQUE (ci_build_id) dast_scanner_profiles_builds_on_ci_build_id
  • (project_id) index_dast_scanner_profiles_builds_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

dast_site_profile_secret_variables

9 cols · no RLS · line 19394View in 3D

{"owner":"group::dynamic analysis","description":"Secret variables used in DAST on-demand scans"}

ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
dast_site_profile_id bigintNOT NULLdast_site_profiles.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
variable_type smallintNOT NULL1
key textNOT NULLCHECK char_length(key) <= 255
encrypted_value byteaNOT NULLCHECK length(encrypted_value) <= 13352
encrypted_value_iv byteaNOT NULLCHECK length(encrypted_value_iv) <= 17
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (project_id) index_dast_site_profile_secret_variables_on_project_id
  • UNIQUE (dast_site_profile_id, key) index_site_profile_secret_variables_on_site_profile_id_and_key

Referenced by

  • nothing

Table checks: length(encrypted_value) <= 13352; char_length(key) <= 255; length(encrypted_value_iv) <= 17; project_id IS NOT NULL

dast_site_profiles

17 cols · no RLS · line 19421View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
dast_site_id bigintNOT NULLdast_sites.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
excluded_urls text[]NOT NULLCAST('{}' AS text[])
auth_enabled booleanNOT NULLFALSE
auth_url textnullCHECK char_length(auth_url) <= 1024
auth_username_field textnullCHECK char_length(auth_username_field) <= 255
auth_password_field textnullCHECK char_length(auth_password_field) <= 255
auth_username textnullCHECK char_length(auth_username) <= 255
target_type smallintNOT NULL0
scan_method smallintNOT NULL0
auth_submit_field textnullCHECK char_length(auth_submit_field) <= 255
scan_file_path textnullCHECK char_length(scan_file_path) <= 1024
optional_variables jsonbNOT NULLCAST('[]' AS jsonb)

Indexes

  • (dast_site_id) index_dast_site_profiles_on_dast_site_id
  • UNIQUE (project_id, name) index_dast_site_profiles_on_project_id_and_name

Referenced by

Table checks: char_length(auth_username_field) <= 255; char_length(name) <= 255; char_length(scan_file_path) <= 1024; char_length(auth_submit_field) <= 255; char_length(auth_password_field) <= 255; char_length(auth_url) <= 1024; char_length(auth_username) <= 255

dast_site_profiles_builds

3 cols · no RLS · line 19448View in 3D

{"owner":"group::dynamic analysis","description":"Join table between DAST Site Profiles and CI Builds"}

ColumnTypeNullDefaultReferencesNotes
dast_site_profile_id PKbigintNOT NULLdast_site_profiles.id 1:N · CASCADE
ci_build_id PKbigintNOT NULL
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • UNIQUE (ci_build_id) dast_site_profiles_builds_on_ci_build_id
  • (project_id) index_dast_site_profiles_builds_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

dast_site_tokens

7 cols · no RLS · line 19466View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
expired_at timestamptznull
token textNOT NULLCHECK char_length(token) <= 255
url textNOT NULLCHECK char_length(url) <= 255

Indexes

  • UNIQUE (project_id, url) index_dast_site_token_on_project_id_and_url
  • UNIQUE (token) index_dast_site_token_on_token
  • (project_id) index_dast_site_tokens_on_project_id

Referenced by

Table checks: char_length(token) <= 255; char_length(url) <= 255

dast_site_validations

13 cols · no RLS · line 19487View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
dast_site_token_id bigintNOT NULLdast_site_tokens.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
validation_started_at timestamptznull
validation_passed_at timestamptznull
validation_failed_at timestamptznull
validation_last_retried_at timestamptznull
validation_strategy smallintNOT NULL
url_base textNOT NULLCHECK char_length(url_base) <= 255
url_path textNOT NULLCHECK char_length(url_path) <= 255
state textNOT NULLCAST('pending' AS text)CHECK char_length(state) <= 255
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (dast_site_token_id) index_dast_site_validations_on_dast_site_token_id
  • (project_id) index_dast_site_validations_on_project_id
  • (url_base, state) index_dast_site_validations_on_url_base_and_state

Referenced by

Table checks: char_length(url_path) <= 255; char_length(state) <= 255; project_id IS NOT NULL; char_length(url_base) <= 255

dast_sites

6 cols · no RLS · line 19516View in 3D
  • Nullable foreign key dast_site_validation_iddast_sites.dast_site_validation_id may be NULL, so the relationship to dast_site_validations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
url textNOT NULLCHECK char_length(url) <= 255
dast_site_validation_id bigintnulldast_site_validations.id 1:N · SET NULL

Indexes

  • (dast_site_validation_id) index_dast_sites_on_dast_site_validation_id
  • UNIQUE (project_id, url) index_dast_sites_on_project_id_and_url

Referenced by

Table checks: char_length(url) <= 255

dependency 15 tables

Tables whose names start with dependency_.

Entity-relationship diagram: dependency_firewall_activity_stats, dependency_firewall_policy_rules, dependency_list_export_part_upload_states, dependency_list_export_part_uploads, dependency_list_export_parts, dependency_list_export_upload_states, dependency_list_export_uploads, dependency_list_exports, dependency_proxy_blob_states, dependency_proxy_blobs, dependency_proxy_group_settings, dependency_proxy_image_ttl_group_policies, dependency_proxy_manifest_states, dependency_proxy_manifests, dependency_proxy_packages_settingsdependency_firewall_activity_statsid PKbigintdependency_firewall_policy_rule_id FKbigintproject_id FKbigintcountbigintcreated_attimestamptzupdated_attimestamptzstat_timetimestamptzoutcomesmallintdependency_firewall_policy_rulesid PKbigintsecurity_policy_id FKbigintsecurity_policy_management_project_id FKbigintcreated_attimestamptzupdated_attimestamptzrule_indexintegertypesmallintcontentjsonbdependency_list_export_part_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzdependency_list_export_part_upload_id FKbigintorganization_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextdependency_list_export_part_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextdependency_list_export_partsid PKbigintdependency_list_export_id FKbigintstart_idbigintend_idbigintorganization_idbigintcreated_attimestamptzupdated_attimestamptzfile_storeintegerfiletextdependency_list_export_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzdependency_list_export_upload_id FKbigintorganization_id FKbigintnamespace_id FKbigintproject_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextdependency_list_export_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextdependency_list_exportsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintuser_idbigintfile_storeintegerstatussmallintfiletextgroup_idbigintpipeline_idbigintexport_typesmallintorganization_idbigintexpires_attimestamptzsend_emailbooleandependency_proxy_blob_statesverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzdependency_proxy_blob_id PKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextgroup_idbigintdependency_proxy_blobsid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzsizebigintfile_storeintegerfile_namevarcharfiletextstatussmallintread_attimestamptzdependency_proxy_group_settingsid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzenabledbooleanidentityjsonbsecretjsonbdependency_proxy_image_ttl_group_policiescreated_attimestamptzupdated_attimestamptzgroup_id PKbigintttlintegerenabledbooleandependency_proxy_manifest_statesverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzdependency_proxy_manifest_id PKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextgroup_id FKbigintdependency_proxy_manifestsid PKbigintcreated_attimestamptzupdated_attimestamptzgroup_id FKbigintsizebigintfile_storesmallintfile_nametextfiletextdigesttextcontent_typetextstatussmallintread_attimestamptzdependency_proxy_packages_settingscreated_attimestamptzupdated_attimestamptzproject_id PKbigintenabledbooleanmaven_external_registry_urltextencrypted_maven_external_registry_usernamebyteaencrypted_maven_external_registry_username_ivbyteaencrypted_maven_external_registry_passwordbyteaencrypted_maven_external_registry_password_ivbyteanpm_external_registry_urltextencrypted_npm_external_registry_basic_authbyteaencrypted_npm_external_registry_basic_auth_ivbyteaencrypted_npm_external_registry_auth_tokenbyteaencrypted_npm_external_registry_auth_token_ivbyteanamespacesorganizationsprojectssecurity_policiessecurity_policy_management_project_idsecurity_policy_iddependency_list_export_part_upload_idorganization_iddependency_list_export_idproject_idorganization_iddependency_list_export_upload_idnamespace_idgroup_idgroup_idgroup_idgroup_idproject_iddependency_firewall_policy_rule_idproject_idgroup_iddependency_proxy_manifest_id

Relationships

dependency_firewall_activity_stats

8 cols · no RLS · line 19535View in 3D
  • Nullable foreign key dependency_firewall_policy_rule_iddependency_firewall_activity_stats.dependency_firewall_policy_rule_id may be NULL, so the relationship to dependency_firewall_policy_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
dependency_firewall_policy_rule_id bigintnulldependency_firewall_policy_rules.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
count bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
stat_time timestamptzNOT NULL
outcome smallintNOT NULL

Indexes

  • (project_id, stat_time) i_dep_fw_activity_stats_project_time
  • UNIQUE (dependency_firewall_policy_rule_id, project_id, stat_time, outcome) i_dep_fw_activity_stats_unique

Referenced by

  • nothing

Table checks: outcome <> 2 OR dependency_firewall_policy_rule_id IS NULL

dependency_firewall_policy_rules

8 cols · no RLS · line 19556View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
security_policy_id bigintNOT NULLsecurity_policies.id 1:N · CASCADE
security_policy_management_project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
rule_index integerNOT NULL0
type smallintNOT NULL0
content jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (security_policy_management_project_id) i_dep_fw_rules_pol_mgmt_proj_id
  • UNIQUE (security_policy_id, rule_index) i_dep_fw_rules_uniq_rule_idx

Referenced by

dependency_list_export_part_upload_states

10 cols · no RLS · line 19576View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
dependency_list_export_part_upload_id bigintNOT NULLdependency_list_export_part_uploads.id 1:1 · CASCADE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_dlep_upl_states_failed_verification
  • (dependency_list_export_part_upload_id) WHERE verification_state = 0 OR verification_state = 3 idx_dlep_upl_states_needs_verification_id
  • UNIQUE (dependency_list_export_part_upload_id) idx_dlep_upl_states_on_dlep_upl_id
  • (organization_id) idx_dlep_upl_states_on_organization_id
  • (dependency_list_export_part_upload_id, verification_started_at) WHERE verification_state = 1 idx_dlep_upl_states_on_verification_started
  • (verification_state) idx_dlep_upl_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_dlep_upl_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

dependency_list_export_part_uploads

16 cols · no RLS · line 19599View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnullCHECK organization_id IS NOT NULL
namespace_id bigintnull
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • (model_id, model_type, uploader, created_at) dependency_list_export_part_u_model_id_model_type_uploader__idx
  • (checksum) dependency_list_export_part_uploads_checksum_idx
  • (namespace_id) dependency_list_export_part_uploads_namespace_id_idx
  • (organization_id) dependency_list_export_part_uploads_organization_id_idx
  • (project_id) dependency_list_export_part_uploads_project_id_idx
  • (store) dependency_list_export_part_uploads_store_idx
  • (uploaded_by_user_id) dependency_list_export_part_uploads_uploaded_by_user_id_idx
  • (uploader, path) dependency_list_export_part_uploads_uploader_path_idx
  • UNIQUE (id) idx_dependency_list_export_part_uploads_on_id

Referenced by

Table checks: char_length(path) <= 511; organization_id IS NOT NULL; char_length(checksum) <= 64

dependency_list_export_parts

9 cols · no RLS · line 19621View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
dependency_list_export_id bigintNOT NULLdependency_list_exports.id 1:N · CASCADE
start_id bigintNOT NULL
end_id bigintNOT NULL
organization_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store integernull
file textnullCHECK char_length(file) <= 255

Indexes

  • (dependency_list_export_id) index_dependency_list_export_parts_on_dependency_list_export_id
  • (organization_id) index_dependency_list_export_parts_on_organization_id

Referenced by

  • nothing

Table checks: char_length(file) <= 255

dependency_list_export_upload_states

12 cols · no RLS · line 19643View in 3D
  • Nullable foreign key project_iddependency_list_export_upload_states.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_iddependency_list_export_upload_states.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_iddependency_list_export_upload_states.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
dependency_list_export_upload_id bigintNOT NULLdependency_list_export_uploads.id 1:1 · CASCADE
organization_id bigintnullorganizations.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_dle_upl_states_failed_verification
  • (dependency_list_export_upload_id) WHERE verification_state = 0 OR verification_state = 3 idx_dle_upl_states_needs_verification_id
  • UNIQUE (dependency_list_export_upload_id) idx_dle_upl_states_on_dle_upl_id
  • (dependency_list_export_upload_id, verification_started_at) WHERE verification_state = 1 idx_dle_upl_states_on_verification_started
  • (verification_state) idx_dle_upl_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_dle_upl_states_pending_verification
  • (namespace_id) index_dependency_list_export_upload_states_on_namespace_id
  • (organization_id) index_dependency_list_export_upload_states_on_organization_id
  • (project_id) index_dependency_list_export_upload_states_on_project_id

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255; num_nonnulls(namespace_id, organization_id, project_id) = 1

dependency_list_export_uploads

16 cols · no RLS · line 19669View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnull
namespace_id bigintnull
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • (model_id, model_type, uploader, created_at) dependency_list_export_upload_model_id_model_type_uploader__idx
  • (checksum) dependency_list_export_uploads_checksum_idx
  • (namespace_id) dependency_list_export_uploads_namespace_id_idx
  • (organization_id) dependency_list_export_uploads_organization_id_idx
  • (project_id) dependency_list_export_uploads_project_id_idx
  • (store) dependency_list_export_uploads_store_idx
  • (uploaded_by_user_id) dependency_list_export_uploads_uploaded_by_user_id_idx
  • (uploader, path) dependency_list_export_uploads_uploader_path_idx
  • UNIQUE (id) idx_dependency_list_export_uploads_on_id

Referenced by

Table checks: char_length(path) <= 511; char_length(checksum) <= 64; num_nonnulls(namespace_id, organization_id, project_id) = 1

dependency_list_exports

14 cols · no RLS · line 19691View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintnull
user_id bigintnull
file_store integernull
status smallintNOT NULL0
file textnullCHECK char_length(file) <= 255
group_id bigintnull
pipeline_id bigintnull
export_type smallintNOT NULL0
organization_id bigintnull
expires_at timestamptznull
send_email booleanNOT NULLFALSE

Indexes

  • (group_id) index_dependency_list_exports_on_group_id
  • (organization_id) index_dependency_list_exports_on_organization_id
  • (pipeline_id) index_dependency_list_exports_on_pipeline_id
  • (project_id) index_dependency_list_exports_on_project_id
  • (user_id) index_dependency_list_exports_on_user_id

Referenced by

Table checks: num_nonnulls(group_id, organization_id, project_id) = 1; char_length(file) <= 255

dependency_proxy_blob_states

9 cols · no RLS · line 19719View in 3D

{"owner":"group::geo","description":"Geo-specific table to store the verification state of DependencyProxy::Blob objects"}

  • Isolated tabledependency_proxy_blob_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
dependency_proxy_blob_id PKbigintNOT NULL
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
group_id bigintnullCHECK group_id IS NOT NULL

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_dependency_proxy_blob_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_dependency_proxy_blob_states_needs_verification
  • (dependency_proxy_blob_id) index_dependency_proxy_blob_states_on_dependency_proxy_blob_id
  • (group_id) index_dependency_proxy_blob_states_on_group_id
  • (verification_state) index_dependency_proxy_blob_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_dependency_proxy_blob_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255; group_id IS NOT NULL

dependency_proxy_blobs

10 cols · no RLS · line 19735View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
size bigintnull
file_store integernull
file_name varcharNOT NULL
file textNOT NULL
status smallintNOT NULL0
read_at timestamptzNOT NULLnow()

Indexes

  • (group_id, file_name) index_dependency_proxy_blobs_on_group_id_and_file_name
  • (group_id, status, read_at, id) index_dependency_proxy_blobs_on_group_id_status_read_at_id
  • (status) index_dependency_proxy_blobs_on_status

Referenced by

  • nothing

dependency_proxy_group_settings

7 cols · no RLS · line 19757View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
enabled booleanNOT NULLTRUE
identity jsonbnull
secret jsonbnull

Indexes

  • (group_id) index_dependency_proxy_group_settings_on_group_id

Referenced by

  • nothing

Table checks: num_nonnulls(identity, secret) = 2 OR num_nulls(identity, secret) = 2

dependency_proxy_image_ttl_group_policies

5 cols · no RLS · line 19777View in 3D
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
ttl integernull90
enabled booleanNOT NULLFALSE

Indexes

  • none

Referenced by

  • nothing

dependency_proxy_manifest_states

9 cols · no RLS · line 19785View in 3D
  • Nullable foreign key group_iddependency_proxy_manifest_states.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
dependency_proxy_manifest_id PKbigintNOT NULLdependency_proxy_manifests.id 1:1 · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • (group_id) index_dependency_proxy_manifest_states_on_group_id
  • (verification_retry_at) WHERE verification_state = 3 index_manifest_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_manifest_states_needs_verification
  • (dependency_proxy_manifest_id) index_manifest_states_on_dependency_proxy_manifest_id
  • (verification_state) index_manifest_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_manifest_states_pending_verification

Referenced by

  • nothing

Table checks: group_id IS NOT NULL; char_length(verification_failure) <= 255

dependency_proxy_manifests

12 cols · no RLS · line 19799View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
size bigintnull
file_store smallintnull
file_name textNOT NULLCHECK char_length(file_name) <= 255
file textNOT NULLCHECK char_length(file) <= 255
digest textNOT NULLCHECK char_length(digest) <= 255
content_type textnullCHECK char_length(content_type) <= 255
status smallintNOT NULL0
read_at timestamptzNOT NULLnow()

Indexes

  • UNIQUE (group_id, file_name, status) index_dep_prox_manifests_on_group_id_file_name_and_status
  • (group_id, status, read_at, id) index_dependency_proxy_manifests_on_group_id_status_read_at_id
  • (status) index_dependency_proxy_manifests_on_status

Referenced by

Table checks: char_length(file) <= 255; char_length(content_type) <= 255; char_length(file_name) <= 255; char_length(digest) <= 255

dependency_proxy_packages_settings

14 cols · no RLS · line 19827View in 3D
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
enabled booleannullFALSE
maven_external_registry_url textnullCHECK char_length(maven_external_registry_url) <= 255
encrypted_maven_external_registry_username byteanullCHECK octet_length(encrypted_maven_external_registry_username) <= 1020
encrypted_maven_external_registry_username_iv byteanullCHECK octet_length(encrypted_maven_external_registry_username_iv) <= 1020
encrypted_maven_external_registry_password byteanullCHECK octet_length(encrypted_maven_external_registry_password) <= 1020
encrypted_maven_external_registry_password_iv byteanullCHECK octet_length(encrypted_maven_external_registry_password_iv) <= 1020
npm_external_registry_url textnullCHECK char_length(npm_external_registry_url) <= 255
encrypted_npm_external_registry_basic_auth byteanullCHECK octet_length(encrypted_npm_external_registry_basic_auth) <= 1020
encrypted_npm_external_registry_basic_auth_iv byteanullCHECK octet_length(encrypted_npm_external_registry_basic_auth_iv) <= 1020
encrypted_npm_external_registry_auth_token byteanullCHECK octet_length(encrypted_npm_external_registry_auth_token) <= 1020
encrypted_npm_external_registry_auth_token_iv byteanullCHECK octet_length(encrypted_npm_external_registry_auth_token_iv) <= 1020

Indexes

  • (project_id) WHERE enabled = TRUE AND maven_external_registry_url IS NOT NULL idx_dep_proxy_pkgs_settings_enabled_maven_on_project_id

Referenced by

  • nothing

Table checks: char_length(npm_external_registry_url) <= 255; num_nulls(encrypted_maven_external_registry_username, encrypted_maven_external_registry_password) = 0 OR num_nulls(encrypted_maven_external_registry_username, encrypted_maven_external_registry_password) = 2; octet_length(encrypted_maven_external_registry_username) <= 1020; octet_length(encrypted_npm_external_registry_auth_token) <= 1020; octet_length(encrypted_npm_external_registry_basic_auth) <= 1020; octet_length(encrypted_npm_external_registry_basic_auth_iv) <= 1020; num_nulls(encrypted_npm_external_registry_basic_auth, encrypted_npm_external_registry_auth_token) > 0; char_length(maven_external_registry_url) <= 255; octet_length(encrypted_maven_external_registry_password) <= 1020; octet_length(encrypted_npm_external_registry_auth_token_iv) <= 1020; octet_length(encrypted_maven_external_registry_password_iv) <= 1020; octet_length(encrypted_maven_external_registry_username_iv) <= 1020

deploy 2 tables

Tables whose names start with deploy_.

Entity-relationship diagram: deploy_keys_projects, deploy_tokensdeploy_keys_projectsid PKbigintdeploy_key_idbigintproject_id FKbigintcreated_attimestampupdated_attimestampcan_pushbooleandeploy_tokensid PKbigintrevokedbooleanread_repositorybooleanread_registrybooleanexpires_attimestamptzcreated_attimestamptznamevarcharusernamevarchartoken_encryptedvarchar(255)deploy_token_typesmallintwrite_registrybooleanread_package_registrybooleanwrite_package_registrybooleancreator_id FKbigintread_virtual_registrybooleanproject_id FKbigintgroup_id FKbigintwrite_virtual_registrybooleanseven_days_notification_sent_attimestamptzthirty_days_notification_sent_attimestamptzsixty_days_notification_sent_attimestamptznamespacesprojectsusersproject_idproject_idcreator_idgroup_id

Relationships

deploy_keys_projects

6 cols · no RLS · line 19856View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
deploy_key_id bigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestampnull
updated_at timestampnull
can_push booleanNOT NULLFALSE

Indexes

  • (deploy_key_id) index_deploy_keys_projects_on_deploy_key_id
  • (project_id) index_deploy_keys_projects_on_project_id

Referenced by

  • nothing

deploy_tokens

21 cols · no RLS · line 19874View in 3D
  • Nullable foreign key project_iddeploy_tokens.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key creator_iddeploy_tokens.creator_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_iddeploy_tokens.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, creator_id, group_iddeploy_tokens has several nullable FKs (project_id, creator_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
revoked booleannullFALSE
read_repository booleanNOT NULLFALSE
read_registry booleanNOT NULLFALSE
expires_at timestamptzNOT NULL
created_at timestamptzNOT NULL
name varcharNOT NULL
username varcharnull
token_encrypted varchar(255)null
deploy_token_type smallintNOT NULL2
write_registry booleanNOT NULLFALSE
read_package_registry booleanNOT NULLFALSE
write_package_registry booleanNOT NULLFALSE
creator_id bigintnullusers.id 1:N · SET NULL
read_virtual_registry booleanNOT NULLFALSE
project_id bigintnullprojects.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
write_virtual_registry booleanNOT NULLFALSE
seven_days_notification_sent_at timestamptznull
thirty_days_notification_sent_at timestamptznull
sixty_days_notification_sent_at timestamptznull

Indexes

  • (creator_id) index_deploy_tokens_on_creator_id
  • (group_id) index_deploy_tokens_on_group_id
  • (project_id) index_deploy_tokens_on_project_id
  • UNIQUE (token_encrypted) index_deploy_tokens_on_token_encrypted
  • (expires_at, id) WHERE revoked = FALSE AND seven_days_notification_sent_at IS NULL index_dts_on_expiring_at_seven_days_notification_sent_at
  • (expires_at, id) WHERE revoked = FALSE AND sixty_days_notification_sent_at IS NULL index_dts_on_expiring_at_sixty_days_notification_sent_at
  • (expires_at, id) WHERE revoked = FALSE AND thirty_days_notification_sent_at IS NULL index_dts_on_expiring_at_thirty_days_notification_sent_at

Referenced by

Table checks: num_nonnulls(group_id, project_id) = 1

deployment 3 tables

Tables whose names start with deployment_.

Entity-relationship diagram: deployment_approvals, deployment_clusters, deployment_merge_requestsdeployment_approvalsid PKbigintdeployment_id FKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptzstatussmallintcommenttextapproval_rule_id FKbigintproject_id FKbigintci_build_idbigintdeployment_clustersdeployment_id PKbigintcluster_idbigintkubernetes_namespacevarchar(255)project_id FKbigintdeployment_merge_requestsdeployment_id PKbigintmerge_request_id PKbigintenvironment_id FKbigintproject_id FKbigintdeploymentsenvironmentsmerge_requestsprojectsprotected_environment_approval_rulesusersuser_iddeployment_idapproval_rule_idproject_idproject_iddeployment_idproject_idenvironment_idmerge_request_iddeployment_id

Relationships

deployment_approvals

10 cols · no RLS · line 19908View in 3D
  • Nullable foreign key approval_rule_iddeployment_approvals.approval_rule_id may be NULL, so the relationship to protected_environment_approval_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_iddeployment_approvals.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK approval_rule_id, project_iddeployment_approvals has several nullable FKs (approval_rule_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
deployment_id bigintNOT NULLdeployments.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL
comment textnullCHECK char_length(comment) <= 255
approval_rule_id bigintnullprotected_environment_approval_rules.id 1:N · SET NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
ci_build_id bigintnull

Indexes

  • (approval_rule_id) index_deployment_approvals_on_approval_rule_id
  • (ci_build_id) index_deployment_approvals_on_ci_build_id
  • (created_at, id) index_deployment_approvals_on_created_at_and_id
  • UNIQUE (deployment_id, user_id, approval_rule_id) index_deployment_approvals_on_deployment_user_approval_rule
  • (project_id) index_deployment_approvals_on_project_id
  • (user_id) index_deployment_approvals_on_user_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(comment) <= 255

deployment_clusters

4 cols · no RLS · line 19932View in 3D
  • Nullable foreign key project_iddeployment_clusters.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
deployment_id PKbigintNOT NULLdeployments.id 1:1 · CASCADE
cluster_id bigintNOT NULL
kubernetes_namespace varchar(255)null
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (cluster_id, kubernetes_namespace) idx_deployment_clusters_on_cluster_id_and_kubernetes_namespace
  • UNIQUE (cluster_id, deployment_id) index_deployment_clusters_on_cluster_id_and_deployment_id
  • (project_id) index_deployment_clusters_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

deployment_merge_requests

4 cols · no RLS · line 19940View in 3D
  • Nullable foreign key project_iddeployment_merge_requests.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key environment_iddeployment_merge_requests.environment_id may be NULL, so the relationship to environments is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, environment_iddeployment_merge_requests has several nullable FKs (project_id, environment_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
deployment_id PKbigintNOT NULLdeployments.id 1:N · CASCADE
merge_request_id PKbigintNOT NULLmerge_requests.id 1:N · CASCADE
environment_id bigintnullenvironments.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (environment_id, merge_request_id) idx_environment_merge_requests_unique_index
  • (merge_request_id) index_deployment_merge_requests_on_merge_request_id
  • (project_id) index_deployment_merge_requests_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

design 8 tables

Tables whose names start with design_.

Entity-relationship diagram: design_management_action_upload_states, design_management_action_uploads, design_management_designs, design_management_designs_versions, design_management_repositories, design_management_repository_states, design_management_versions, design_user_mentionsdesign_management_action_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzdesign_management_action_upload_id FKbigintnamespace_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextdesign_management_action_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextdesign_management_designsid PKbigintproject_id FKbigintissue_id FKbigintfilenamevarcharrelative_positionintegeriidintegercached_markdown_versionintegerdescriptiontextdescription_htmltextimported_fromsmallintnamespace_id FKbigintdesign_management_designs_versionsid PKbigintdesign_id FKbigintversion_id FKbiginteventsmallintimage_v432x230varchar(255)namespace_id FKbigintdesign_management_repositoriesid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptznamespace_id FKbigintdesign_management_repository_statesverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzdesign_management_repository_id PKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextnamespace_id FKbigintdesign_management_versionsid PKbigintshabyteaissue_id FKbigintcreated_attimestamptzauthor_id FKbigintnamespace_id FKbigintdesign_user_mentionsid PKbigintdesign_id FKbigintmentioned_users_idsbigint[]mentioned_projects_idsbigint[]mentioned_groups_idsbigint[]note_id FKbigintnamespace_id FKbigintissuesnamespacesnotesprojectsusersnamespace_iddesign_management_action_upload_idnamespace_idproject_idissue_idnamespace_idproject_idnamespace_idauthor_idissue_idnamespace_iddesign_idversion_idnamespace_iddesign_management_repository_idnamespace_idnote_iddesign_id

Relationships

design_management_action_upload_states

10 cols · no RLS · line 19998View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
design_management_action_upload_id bigintNOT NULLdesign_management_action_uploads.id 1:1 · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_design_management_action_upload_states_failed_verification
  • (verified_at) WHERE verification_state = 0 idx_design_management_action_upload_states_pending_verification
  • UNIQUE (design_management_action_upload_id) idx_design_management_action_upload_states_upload_id
  • (design_management_action_upload_id) WHERE verification_state = 0 OR verification_state = 3 idx_design_management_action_upload_states_verification_id
  • (design_management_action_upload_id, verification_started_at) WHERE verification_state = 1 idx_design_management_action_upload_states_verification_started
  • (verification_state) idx_design_management_action_upload_states_verification_state
  • (namespace_id) index_design_management_action_upload_states_on_namespace_id

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

design_management_action_uploads

16 cols · no RLS · line 20021View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnull
namespace_id bigintnullCHECK namespace_id IS NOT NULL
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • (model_id, model_type, uploader, created_at) design_management_action_uplo_model_id_model_type_uploader__idx
  • (checksum) design_management_action_uploads_checksum_idx
  • (namespace_id) design_management_action_uploads_namespace_id_idx
  • (organization_id) design_management_action_uploads_organization_id_idx
  • (project_id) design_management_action_uploads_project_id_idx
  • (store) design_management_action_uploads_store_idx
  • (uploaded_by_user_id) design_management_action_uploads_uploaded_by_user_id_idx
  • (uploader, path) design_management_action_uploads_uploader_path_idx
  • UNIQUE (id) index_design_management_action_uploads_on_id

Referenced by

Table checks: char_length(path) <= 511; namespace_id IS NOT NULL; char_length(checksum) <= 64

design_management_designs

11 cols · no RLS · line 20043View in 3D
  • Nullable foreign key namespace_iddesign_management_designs.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key issue_iddesign_management_designs.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK namespace_id, issue_iddesign_management_designs has several nullable FKs (namespace_id, issue_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
issue_id bigintnullissues.id 1:N · CASCADE
filename varcharNOT NULLCHECK char_length(CAST(filename AS text)) <= 255
relative_position integernull
iid integernullCHECK iid IS NOT NULL
cached_markdown_version integernull
description textnullCHECK char_length(description) <= 1000000
description_html textnull
imported_from smallintNOT NULL0
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (issue_id, relative_position, id) index_design_management_designs_issue_id_relative_position_id
  • UNIQUE (project_id, iid) index_design_management_designs_on_iid_and_project_id
  • UNIQUE (issue_id, filename) index_design_management_designs_on_issue_id_and_filename
  • (namespace_id) index_design_management_designs_on_namespace_id
  • (project_id) index_design_management_designs_on_project_id
  • (issue_id, id) index_on_design_management_designs_issue_id_and_id

Referenced by

Table checks: char_length(CAST(filename AS text)) <= 255; char_length(description) <= 1000000; iid IS NOT NULL; namespace_id IS NOT NULL

design_management_designs_versions

6 cols · no RLS · line 20070View in 3D
  • Nullable foreign key namespace_iddesign_management_designs_versions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
design_id bigintNOT NULLdesign_management_designs.id 1:N · CASCADE
version_id bigintNOT NULLdesign_management_versions.id 1:N · CASCADE
event smallintNOT NULL0
image_v432x230 varchar(255)null
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • UNIQUE (design_id, version_id) design_management_designs_versions_uniqueness
  • (design_id) index_design_management_designs_versions_on_design_id
  • (event) index_design_management_designs_versions_on_event
  • (namespace_id) index_design_management_designs_versions_on_namespace_id
  • (version_id) index_design_management_designs_versions_on_version_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

design_management_repositories

5 cols · no RLS · line 20089View in 3D
  • Nullable foreign key namespace_iddesign_management_repositories.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (namespace_id) index_design_management_repositories_on_namespace_id
  • UNIQUE (project_id) index_design_management_repositories_on_project_id

Referenced by

Table checks: namespace_id IS NOT NULL

design_management_repository_states

9 cols · no RLS · line 20107View in 3D
  • Nullable foreign key namespace_iddesign_management_repository_states.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
design_management_repository_id PKbigintNOT NULLdesign_management_repositories.id 1:1 · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_design_management_repository_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_design_management_repository_states_needs_verification
  • (namespace_id) index_design_management_repository_states_on_namespace_id
  • (verification_state) index_design_management_repository_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_design_management_repository_states_pending_verification

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL; char_length(verification_failure) <= 255

design_management_versions

6 cols · no RLS · line 20121View in 3D
  • Nullable foreign key namespace_iddesign_management_versions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key author_iddesign_management_versions.author_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key issue_iddesign_management_versions.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK namespace_id, author_id, issue_iddesign_management_versions has several nullable FKs (namespace_id, author_id, issue_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
sha byteaNOT NULL
issue_id bigintnullissues.id 1:N · CASCADE
created_at timestamptzNOT NULL
author_id bigintnullusers.id 1:N · SET NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (author_id) WHERE author_id IS NOT NULL index_design_management_versions_on_author_id
  • (issue_id, id) index_design_management_versions_on_issue_id_and_id
  • (namespace_id) index_design_management_versions_on_namespace_id
  • UNIQUE (sha, issue_id) index_design_management_versions_on_sha_and_issue_id

Referenced by

Table checks: namespace_id IS NOT NULL

design_user_mentions

7 cols · no RLS · line 20140View in 3D
  • Nullable foreign key namespace_iddesign_user_mentions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
design_id bigintNOT NULLdesign_management_designs.id 1:N · CASCADE
mentioned_users_ids bigint[]null
mentioned_projects_ids bigint[]null
mentioned_groups_ids bigint[]null
note_id bigintNOT NULLnotes.id 1:1 · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • UNIQUE (design_id, note_id) design_user_mentions_on_design_id_and_note_id_unique_index
  • (namespace_id) index_design_user_mentions_on_namespace_id
  • UNIQUE (note_id) index_design_user_mentions_on_note_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

dora 3 tables

Tables whose names start with dora_.

Entity-relationship diagram: dora_configurations, dora_daily_metrics, dora_performance_scoresdora_configurationsid PKbigintproject_id FKbigintbranches_for_lead_time_for_changestext[]dora_daily_metricsid PKbigintenvironment_id FKbigintdatedatedeployment_frequencyintegerlead_time_for_changes_in_secondsintegertime_to_restore_service_in_secondsintegerincidents_countintegerproject_id FKbigintdora_performance_scoresid PKbigintproject_id FKbigintdatedatedeployment_frequencysmallintlead_time_for_changessmallinttime_to_restore_servicesmallintchange_failure_ratesmallintenvironmentsprojectsproject_idproject_idenvironment_idproject_id

Relationships

dora_configurations

3 cols · no RLS · line 20251View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:1 · CASCADE
branches_for_lead_time_for_changes text[]NOT NULLCAST('{}' AS text[])

Indexes

  • UNIQUE (project_id) index_dora_configurations_on_project_id

Referenced by

  • nothing

dora_daily_metrics

8 cols · no RLS · line 20266View in 3D
  • Nullable foreign key project_iddora_daily_metrics.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
environment_id bigintNOT NULLenvironments.id 1:N · CASCADE
date dateNOT NULL
deployment_frequency integernullCHECK deployment_frequency >= 0
lead_time_for_changes_in_seconds integernullCHECK lead_time_for_changes_in_seconds >= 0
time_to_restore_service_in_seconds integernull
incidents_count integernull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (environment_id, date) index_dora_daily_metrics_on_environment_id_and_date
  • (project_id, date) index_dora_daily_metrics_on_project_id_and_date

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; deployment_frequency >= 0; lead_time_for_changes_in_seconds >= 0

dora_performance_scores

7 cols · no RLS · line 20289View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
date dateNOT NULL
deployment_frequency smallintnull
lead_time_for_changes smallintnull
time_to_restore_service smallintnull
change_failure_rate smallintnull

Indexes

  • UNIQUE (project_id, date) index_dora_performance_scores_on_project_id_and_date

Referenced by

  • nothing

duo 9 tables

Tables whose names start with duo_.

Entity-relationship diagram: duo_workflow_session_artifacts, duo_workflows_checkpoint_writes, duo_workflows_events, duo_workflows_workflow_merge_requests, duo_workflows_workflow_notes, duo_workflows_workflow_pipelines, duo_workflows_workflow_work_items, duo_workflows_workflows, duo_workflows_workloadsduo_workflow_session_artifactsid PKbigintcreated_attimestamptzupdated_attimestamptzworkflow_id FKbigintproject_id FKbigintnamespace_id FKbigintuser_id FKbigintstatussmallintworkflow_definitiontextcredits_useddouble precisionmodel_usedtextworkflow_created_attimestamptzworkflow_updated_attimestamptzduo_workflows_checkpoint_writesid PKbigintworkflow_id FKbigintproject_id FKbigintidxintegerthread_tstexttasktextchanneltextwrite_typetextdatatextnamespace_id FKbigintduo_workflows_eventsid PKbigintworkflow_id FKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzevent_typesmallintevent_statussmallintmessagetextcorrelation_id_valuetextnamespace_id FKbigintduo_workflows_workflow_merge_requestsid PKbigintworkflow_id FKbigintmerge_request_id FKbigintproject_id FKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzlink_typesmallintduo_workflows_workflow_notesid PKbigintworkflow_id FKbigintnote_id FKbigintproject_id FKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzlink_typesmallintduo_workflows_workflow_pipelinesid PKbigintworkflow_id FKbigintpipeline_idbigintproject_id FKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzlink_typesmallintduo_workflows_workflow_work_itemsid PKbigintworkflow_id FKbigintwork_item_id FKbigintproject_id FKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzlink_typesmallintduo_workflows_workflowsid PKbigintuser_id FKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzstatussmallintgoaltextagent_privilegessmallint[]workflow_definitiontextallow_agent_to_request_userbooleanpre_approved_agent_privilegessmallint[]imagetextenvironmentsmallintnamespace_id FKbigintai_catalog_item_version_id FKbigintissue_id FKbigintmerge_request_id FKbigintservice_account_id FKbiginttool_call_approvalsjsonbai_catalog_item_id FKbigintsummarytextmessaging_callback_contextjsonbtitletextmodel_metadata_jsontextincremental_checkpoints_enabledbooleanagent_typetextjsonl_sha256textidempotency_keytextsync_typesmallintagent_identity_id FKbigintflow_metadata_jsontextweb_search_enabledbooleantrigger_sourcesmallinttrigger_flow_trigger_idbigintduo_workflows_workloadsid PKbigintproject_id FKbigintworkflow_id FKbigintworkload_idbigintai_agent_identitiesai_catalog_item_versionsai_catalog_itemsissuesmerge_requestsnamespacesnotesprojectsusersproject_idai_catalog_item_version_idnamespace_iduser_idissue_idai_catalog_item_idservice_account_idagent_identity_idmerge_request_idworkflow_idproject_idnamespace_iduser_idnamespace_idproject_idworkflow_idnamespace_idworkflow_idproject_idproject_idmerge_request_idworkflow_idnamespace_idnamespace_idproject_idworkflow_idnote_idnamespace_idproject_idworkflow_idproject_idnamespace_idwork_item_idworkflow_idworkflow_idproject_id

Relationships

duo_workflow_session_artifacts

13 cols · no RLS · line 20336View in 3D
  • Nullable foreign key project_idduo_workflow_session_artifacts.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idduo_workflow_session_artifacts.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, namespace_idduo_workflow_session_artifacts has several nullable FKs (project_id, namespace_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
workflow_id bigintNOT NULLduo_workflows_workflows.id 1:1 · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
status smallintNOT NULL0
workflow_definition textNOT NULLCAST('software_development' AS text)CHECK char_length(workflow_definition) <= 255
credits_used double precisionNOT NULL0.0
model_used textNOT NULLCAST('' AS text)CHECK char_length(model_used) <= 255
workflow_created_at timestamptzNOT NULL
workflow_updated_at timestamptzNOT NULL

Indexes

  • (namespace_id, workflow_updated_at, workflow_id) index_duo_wf_session_artifacts_on_ns_wf_updated_wf_id
  • (project_id, workflow_updated_at) index_duo_wf_session_artifacts_on_project_id_updated_at
  • (user_id) index_duo_wf_session_artifacts_on_user_id
  • UNIQUE (workflow_id) index_duo_wf_session_artifacts_on_workflow_id

Referenced by

  • nothing

Table checks: char_length(workflow_definition) <= 255; char_length(model_used) <= 255; namespace_id IS NOT NULL

duo_workflows_checkpoint_writes

10 cols · no RLS · line 20364View in 3D
  • Nullable foreign key namespace_idduo_workflows_checkpoint_writes.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idduo_workflows_checkpoint_writes.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
workflow_id bigintNOT NULLduo_workflows_workflows.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
idx integerNOT NULL
thread_ts textNOT NULLCHECK char_length(thread_ts) <= 255
task textNOT NULLCHECK char_length(task) <= 255
channel textNOT NULLCHECK char_length(channel) <= 255
write_type textNOT NULLCHECK char_length(write_type) <= 255
data textNOT NULLCHECK char_length(data) <= 10000
namespace_id bigintnullnamespaces.id 1:N · CASCADE

Indexes

  • (namespace_id) index_duo_workflows_checkpoint_writes_on_namespace_id
  • (project_id) index_duo_workflows_checkpoint_writes_on_project_id
  • (workflow_id, thread_ts) index_duo_workflows_checkpoint_writes_thread_ts

Referenced by

  • nothing

Table checks: char_length(data) <= 10000; num_nonnulls(namespace_id, project_id) = 1; char_length(write_type) <= 255; char_length(task) <= 255; char_length(channel) <= 255; char_length(thread_ts) <= 255

duo_workflows_events

10 cols · no RLS · line 20392View in 3D
  • Nullable foreign key namespace_idduo_workflows_events.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idduo_workflows_events.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
workflow_id bigintNOT NULLduo_workflows_workflows.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
event_type smallintNOT NULL
event_status smallintNOT NULL
message textnullCHECK char_length(message) <= 16384
correlation_id_value textnullCHECK char_length(correlation_id_value) <= 128
namespace_id bigintnullnamespaces.id 1:N · CASCADE

Indexes

  • UNIQUE (correlation_id_value, project_id) i_duo_workflows_events_on_correlation_id_project_id
  • (namespace_id) index_duo_workflows_events_on_namespace_id
  • (project_id) index_duo_workflows_events_on_project_id
  • (workflow_id) index_duo_workflows_events_on_workflow_id

Referenced by

  • nothing

Table checks: char_length(message) <= 16384; char_length(correlation_id_value) <= 128; num_nonnulls(namespace_id, project_id) = 1

duo_workflows_workflow_merge_requests

8 cols · no RLS · line 20417View in 3D
  • Nullable foreign key project_idduo_workflows_workflow_merge_requests.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idduo_workflows_workflow_merge_requests.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
workflow_id bigintNOT NULLduo_workflows_workflows.id 1:N · CASCADE
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
link_type smallintNOT NULL

Indexes

  • (merge_request_id) index_duo_wf_wf_mrs_on_merge_request_id
  • (namespace_id) index_duo_wf_wf_mrs_on_namespace_id
  • (project_id) index_duo_wf_wf_mrs_on_project_id
  • UNIQUE (workflow_id, merge_request_id, link_type) index_duo_wf_wf_mrs_on_workflow_id_and_merge_request_id

Referenced by

  • nothing

Table checks: num_nonnulls(namespace_id, project_id) = 1

duo_workflows_workflow_notes

8 cols · no RLS · line 20438View in 3D
  • Nullable foreign key namespace_idduo_workflows_workflow_notes.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idduo_workflows_workflow_notes.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
workflow_id bigintNOT NULLduo_workflows_workflows.id 1:N · CASCADE
note_id bigintNOT NULLnotes.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
link_type smallintNOT NULL

Indexes

  • (namespace_id) index_duo_wf_wf_notes_on_namespace_id
  • (note_id) index_duo_wf_wf_notes_on_note_id
  • (project_id) index_duo_wf_wf_notes_on_project_id
  • UNIQUE (workflow_id, note_id, link_type) index_duo_wf_wf_notes_on_workflow_id_and_note_id

Referenced by

  • nothing

Table checks: num_nonnulls(namespace_id, project_id) = 1

duo_workflows_workflow_pipelines

8 cols · no RLS · line 20459View in 3D
  • Nullable foreign key namespace_idduo_workflows_workflow_pipelines.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idduo_workflows_workflow_pipelines.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
workflow_id bigintNOT NULLduo_workflows_workflows.id 1:N · CASCADE
pipeline_id bigintNOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
link_type smallintNOT NULL

Indexes

  • (namespace_id) index_duo_wf_wf_pipelines_on_namespace_id
  • (pipeline_id) index_duo_wf_wf_pipelines_on_pipeline_id
  • (project_id) index_duo_wf_wf_pipelines_on_project_id
  • UNIQUE (workflow_id, pipeline_id, link_type) index_duo_wf_wf_pipelines_on_workflow_id_and_pipeline_id

Referenced by

  • nothing

Table checks: num_nonnulls(namespace_id, project_id) = 1

duo_workflows_workflow_work_items

8 cols · no RLS · line 20480View in 3D
  • Nullable foreign key project_idduo_workflows_workflow_work_items.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idduo_workflows_workflow_work_items.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
workflow_id bigintNOT NULLduo_workflows_workflows.id 1:N · CASCADE
work_item_id bigintNOT NULLissues.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
link_type smallintNOT NULL

Indexes

  • (namespace_id) index_duo_wf_wf_wi_on_namespace_id
  • (project_id) index_duo_wf_wf_wi_on_project_id
  • (work_item_id) index_duo_wf_wf_wi_on_work_item_id
  • UNIQUE (workflow_id, work_item_id, link_type) index_duo_wf_wf_wi_on_workflow_id_and_work_item_id

Referenced by

  • nothing

Table checks: num_nonnulls(namespace_id, project_id) = 1

duo_workflows_workflows

34 cols · no RLS · line 20501View in 3D
  • Nullable foreign key project_idduo_workflows_workflows.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key ai_catalog_item_version_idduo_workflows_workflows.ai_catalog_item_version_id may be NULL, so the relationship to ai_catalog_item_versions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idduo_workflows_workflows.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key issue_idduo_workflows_workflows.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key ai_catalog_item_idduo_workflows_workflows.ai_catalog_item_id may be NULL, so the relationship to ai_catalog_items is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key service_account_idduo_workflows_workflows.service_account_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key agent_identity_idduo_workflows_workflows.agent_identity_id may be NULL, so the relationship to ai_agent_identities is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key merge_request_idduo_workflows_workflows.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, ai_catalog_item_version_id, namespace_id, issue_id, ai_catalog_item_id, service_account_id, agent_identity_id, merge_request_idduo_workflows_workflows has several nullable FKs (project_id, ai_catalog_item_version_id, namespace_id, issue_id, ai_catalog_item_id, service_account_id, agent_identity_id, merge_request_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • Wide table (34 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
goal textnullCHECK char_length(goal) <= 16384
agent_privileges smallint[]NOT NULLCAST('{1,2}' AS smallint[])
workflow_definition textNOT NULLCAST('software_development' AS text)CHECK char_length(workflow_definition) <= 255
allow_agent_to_request_user booleanNOT NULLTRUE
pre_approved_agent_privileges smallint[]NOT NULLCAST('{1,2}' AS smallint[])
image textnullCHECK char_length(image) <= 2048
environment smallintnull
namespace_id bigintnullnamespaces.id 1:N · CASCADE
ai_catalog_item_version_id bigintnullai_catalog_item_versions.id 1:N · SET NULL
issue_id bigintnullissues.id 1:N · CASCADE
merge_request_id bigintnullmerge_requests.id 1:N · CASCADE
service_account_id bigintnullusers.id 1:N · SET NULL
tool_call_approvals jsonbNOT NULLCAST('{}' AS jsonb)
ai_catalog_item_id bigintnullai_catalog_items.id 1:N · SET NULL
summary textnullCHECK char_length(summary) <= 1024
messaging_callback_context jsonbnull
title textnullCHECK char_length(title) <= 40
model_metadata_json textnullCHECK char_length(model_metadata_json) <= 1024
incremental_checkpoints_enabled booleanNOT NULLFALSE
agent_type textnullCHECK char_length(agent_type) <= 50
jsonl_sha256 textnullCHECK char_length(jsonl_sha256) <= 64
idempotency_key textnullCHECK char_length(idempotency_key) <= 255
sync_type smallintnull
agent_identity_id bigintnullai_agent_identities.id 1:N · SET NULL
flow_metadata_json textnullCHECK char_length(flow_metadata_json) <= 1024
web_search_enabled booleanNOT NULLFALSE
trigger_source smallintNOT NULL0
trigger_flow_trigger_id bigintnull

Indexes

  • (status, updated_at, id) idx_workflows_status_updated_at_id
  • (user_id, updated_at) WHERE workflow_definition <> CAST('chat' AS text) index_duo_workflows_on_user_id_and_updated_at
  • (agent_identity_id) WHERE agent_identity_id IS NOT NULL index_duo_workflows_workflows_on_agent_identity_id
  • (ai_catalog_item_id) index_duo_workflows_workflows_on_ai_catalog_item_id
  • (ai_catalog_item_version_id) index_duo_workflows_workflows_on_ai_catalog_item_version_id
  • (issue_id) index_duo_workflows_workflows_on_issue_id
  • (merge_request_id) index_duo_workflows_workflows_on_merge_request_id
  • (namespace_id) index_duo_workflows_workflows_on_namespace_id
  • (namespace_id, created_at) WHERE workflow_definition <> CAST('chat' AS text) index_duo_workflows_workflows_on_namespace_id_created_at
  • (project_id) index_duo_workflows_workflows_on_project_id
  • UNIQUE (project_id, user_id, idempotency_key) WHERE idempotency_key IS NOT NULL AND project_id IS NOT NULL index_duo_workflows_workflows_on_project_user_idempotency_key
  • (service_account_id) index_duo_workflows_workflows_on_service_account_id
  • (user_id) index_duo_workflows_workflows_on_user_id
  • (project_id, environment, created_at) WHERE workflow_definition <> CAST('chat' AS text) index_duo_workflows_workflows_project_environment_created_at

Referenced by

Table checks: char_length(title) <= 40; char_length(summary) <= 1024; char_length(goal) <= 16384; char_length(image) <= 2048; char_length(flow_metadata_json) <= 1024; char_length(agent_type) <= 50; num_nonnulls(namespace_id, project_id) = 1; char_length(idempotency_key) <= 255; char_length(jsonl_sha256) <= 64; char_length(model_metadata_json) <= 1024; char_length(workflow_definition) <= 255; num_nonnulls(issue_id, merge_request_id) <= 1

duo_workflows_workloads

4 cols · no RLS · line 20559View in 3D
  • Junction table allows duplicate links project_id, workflow_idduo_workflows_workloads looks like a many-to-many link table but has no unique constraint across (project_id, workflow_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
workflow_id bigintNOT NULLduo_workflows_workflows.id 1:N · CASCADE
workload_id bigintNOT NULL

Indexes

  • (project_id) index_duo_workflows_workloads_on_project_id
  • (workflow_id) index_duo_workflows_workloads_on_workflow_id
  • (workload_id) index_duo_workflows_workloads_on_workload_id

Referenced by

  • nothing

elastic 5 tables

Tables whose names start with elastic_.

Entity-relationship diagram: elastic_group_index_statuses, elastic_index_settings, elastic_reindexing_slices, elastic_reindexing_subtasks, elastic_reindexing_taskselastic_group_index_statusesnamespace_id PKbigintcreated_attimestamptzupdated_attimestamptzwiki_indexed_attimestamptzlast_wiki_commitbyteaelastic_index_settingsid PKbigintcreated_attimestamptzupdated_attimestamptznumber_of_replicassmallintnumber_of_shardssmallintalias_nametextelastic_reindexing_slicesid PKbigintcreated_attimestamptzupdated_attimestamptzelastic_reindexing_subtask_id FKbigintelastic_slicesmallintelastic_max_slicesmallintretry_attemptsmallintelastic_tasktextelastic_reindexing_subtasksid PKbigintelastic_reindexing_task_id FKbigintalias_nametextindex_name_fromtextindex_name_totextelastic_tasktextdocuments_count_targetintegerdocuments_countintegercreated_attimestamptzupdated_attimestamptzelastic_reindexing_tasksid PKbigintcreated_attimestamptzupdated_attimestamptzstatesmallintin_progressbooleanerror_messagetextdelete_original_index_attimestamptzmax_slices_runningsmallintslice_multipliersmallinttargetstext[]optionsjsonbnamespacesnamespace_idelastic_reindexing_task_idelastic_reindexing_subtask_id

Relationships

elastic_group_index_statuses

5 cols · no RLS · line 20597View in 3D
ColumnTypeNullDefaultReferencesNotes
namespace_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
wiki_indexed_at timestamptznull
last_wiki_commit byteanull

Indexes

  • none

Referenced by

  • nothing

elastic_index_settings

6 cols · no RLS · line 20605View in 3D
  • Isolated tableelastic_index_settings references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
number_of_replicas smallintNOT NULL1
number_of_shards smallintNOT NULL5
alias_name textNOT NULLCHECK char_length(alias_name) <= 255

Indexes

  • UNIQUE (alias_name) index_elastic_index_settings_on_alias_name

Referenced by

  • nothing

Table checks: char_length(alias_name) <= 255

elastic_reindexing_slices

8 cols · no RLS · line 20624View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
elastic_reindexing_subtask_id bigintNOT NULLelastic_reindexing_subtasks.id 1:N · CASCADE
elastic_slice smallintNOT NULL0
elastic_max_slice smallintNOT NULL0
retry_attempt smallintNOT NULL0
elastic_task textnullCHECK char_length(elastic_task) <= 255

Indexes

  • (elastic_reindexing_subtask_id) idx_elastic_reindexing_slices_on_elastic_reindexing_subtask_id

Referenced by

  • nothing

Table checks: char_length(elastic_task) <= 255

elastic_reindexing_subtasks

10 cols · no RLS · line 20645View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
elastic_reindexing_task_id bigintNOT NULLelastic_reindexing_tasks.id 1:N · CASCADE
alias_name textNOT NULLCHECK char_length(alias_name) <= 255
index_name_from textNOT NULLCHECK char_length(index_name_from) <= 255
index_name_to textNOT NULLCHECK char_length(index_name_to) <= 255
elastic_task textnullCHECK char_length(elastic_task) <= 255
documents_count_target integernull
documents_count integernull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (elastic_reindexing_task_id) index_elastic_reindexing_subtasks_on_elastic_reindexing_task_id

Referenced by

Table checks: char_length(elastic_task) <= 255; char_length(alias_name) <= 255; char_length(index_name_from) <= 255; char_length(index_name_to) <= 255

elastic_reindexing_tasks

11 cols · no RLS · line 20671View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
state smallintNOT NULL0
in_progress booleanNOT NULLTRUE
error_message textnullCHECK char_length(error_message) <= 255
delete_original_index_at timestamptznull
max_slices_running smallintNOT NULL60
slice_multiplier smallintNOT NULL2
targets text[]null
options jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • UNIQUE (in_progress) WHERE in_progress index_elastic_reindexing_tasks_on_in_progress
  • (state) index_elastic_reindexing_tasks_on_state

Referenced by

Table checks: char_length(error_message) <= 255

elasticsearch 2 tables

Tables whose names start with elasticsearch_.

Entity-relationship diagram: elasticsearch_indexed_namespaces, elasticsearch_indexed_projectselasticsearch_indexed_namespacescreated_attimestamptzupdated_attimestamptznamespace_id PKbigintelasticsearch_indexed_projectscreated_attimestamptzupdated_attimestamptzproject_id PKbigintnamespacesprojectsnamespace_idproject_id

Relationships

elasticsearch_indexed_namespaces

3 cols · no RLS · line 20695View in 3D
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id PKbigintNOT NULLnamespaces.id 1:1 · CASCADE

Indexes

  • (created_at) index_elasticsearch_indexed_namespaces_on_created_at

Referenced by

  • nothing

elasticsearch_indexed_projects

3 cols · no RLS · line 20701View in 3D
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE

Indexes

  • none

Referenced by

  • nothing

enabled 2 tables

Tables whose names start with enabled_.

Entity-relationship diagram: enabled_foundational_flow_check_results, enabled_foundational_flowsenabled_foundational_flow_check_resultsid PKbigintorganization_id FKbigintenabled_foundational_flow_id FKbigintcheck_idsmallintstatussmallintmessagetextcreated_attimestamptzupdated_attimestamptzenabled_foundational_flowsid PKbigintnamespace_id FKbigintproject_id FKbigintcatalog_item_id FKbigintcreated_attimestamptzupdated_attimestamptzai_catalog_itemsnamespacesorganizationsprojectsproject_idcatalog_item_idnamespace_idenabled_foundational_flow_idorganization_id

Relationships

enabled_foundational_flow_check_results

8 cols · no RLS · line 20729View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
enabled_foundational_flow_id bigintNOT NULLenabled_foundational_flows.id 1:N · CASCADE
check_id smallintNOT NULL
status smallintNOT NULL
message textnullCHECK char_length(message) <= 4096
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (enabled_foundational_flow_id, check_id) idx_enabled_foundational_flow_check_results_on_flow_and_check
  • (organization_id) idx_enabled_foundational_flow_check_results_on_organization

Referenced by

  • nothing

Table checks: char_length(message) <= 4096

enabled_foundational_flows

6 cols · no RLS · line 20750View in 3D
  • Nullable foreign key project_idenabled_foundational_flows.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idenabled_foundational_flows.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
catalog_item_id bigintNOT NULLai_catalog_items.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (namespace_id, catalog_item_id) WHERE namespace_id IS NOT NULL idx_enabled_flows_on_namespace_catalog_item
  • UNIQUE (project_id, catalog_item_id) WHERE project_id IS NOT NULL idx_enabled_flows_on_project_catalog_item
  • (catalog_item_id) index_enabled_foundational_flows_on_catalog_item_id
  • (namespace_id) index_enabled_foundational_flows_on_namespace_id
  • (project_id) index_enabled_foundational_flows_on_project_id

Referenced by

Table checks: num_nonnulls(namespace_id, project_id) = 1

epic 2 tables

Tables whose names start with epic_.

Entity-relationship diagram: epic_issues, epic_user_mentionsepic_issuesid PKbigintepic_id FKbigintissue_id FKbigintrelative_positionintegernamespace_id FKbigintwork_item_parent_link_id FKbigintepic_user_mentionsid PKbigintepic_id FKbigintmentioned_users_idsbigint[]mentioned_projects_idsbigint[]mentioned_groups_idsbigint[]note_id FKbigintgroup_id FKbigintepicsissuesnamespacesnoteswork_item_parent_linkswork_item_parent_link_idnamespace_idissue_idepic_idgroup_idnote_idepic_id

Relationships

epic_issues

6 cols · no RLS · line 20805View in 3D
  • Nullable foreign key work_item_parent_link_idepic_issues.work_item_parent_link_id may be NULL, so the relationship to work_item_parent_links is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idepic_issues.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK work_item_parent_link_id, namespace_idepic_issues has several nullable FKs (work_item_parent_link_id, namespace_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
epic_id bigintNOT NULLepics.id 1:N · CASCADE
issue_id bigintNOT NULLissues.id 1:1 · CASCADE
relative_position integernull
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL
work_item_parent_link_id bigintnullwork_item_parent_links.id 1:1 · CASCADECHECK work_item_parent_link_id IS NOT NULL

Indexes

  • (epic_id, issue_id) index_epic_issues_on_epic_id_and_issue_id
  • UNIQUE (issue_id) index_epic_issues_on_issue_id
  • (namespace_id) index_epic_issues_on_namespace_id
  • UNIQUE (work_item_parent_link_id) index_unique_parent_link_id_on_epic_issues

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL; work_item_parent_link_id IS NOT NULL

epic_user_mentions

7 cols · no RLS · line 20824View in 3D
  • Nullable foreign key group_idepic_user_mentions.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key note_idepic_user_mentions.note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK group_id, note_idepic_user_mentions has several nullable FKs (group_id, note_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
epic_id bigintNOT NULLepics.id 1:N · CASCADE
mentioned_users_ids bigint[]null
mentioned_projects_ids bigint[]null
mentioned_groups_ids bigint[]null
note_id bigintnullnotes.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • UNIQUE (epic_id, note_id) epic_user_mentions_on_epic_id_and_note_id_index
  • UNIQUE (epic_id) WHERE note_id IS NULL epic_user_mentions_on_epic_id_index
  • (group_id) index_epic_user_mentions_on_group_id
  • UNIQUE (note_id) WHERE note_id IS NOT NULL index_epic_user_mentions_on_note_id

Referenced by

  • nothing

Table checks: group_id IS NOT NULL

error 3 tables

Tables whose names start with error_.

Entity-relationship diagram: error_tracking_client_keys, error_tracking_error_events, error_tracking_errorserror_tracking_client_keysid PKbigintproject_id FKbigintactivebooleanpublic_keytextcreated_attimestamptzupdated_attimestamptzerror_tracking_error_eventsid PKbiginterror_id FKbigintdescriptiontextenvironmenttextleveltextoccurred_attimestamptzpayloadjsonbcreated_attimestamptzupdated_attimestamptzproject_id FKbiginterror_tracking_errorsid PKbigintproject_id FKbigintnametextdescriptiontextactortextfirst_seen_attimestamptzlast_seen_attimestamptzplatformtextcreated_attimestamptzupdated_attimestamptzevents_countbigintstatussmallintprojectsproject_idproject_idproject_iderror_id

Relationships

error_tracking_client_keys

6 cols · no RLS · line 20901View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
active booleanNOT NULLTRUE
public_key textNOT NULLCHECK char_length(public_key) <= 255
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (project_id, public_key) WHERE active = TRUE index_error_tracking_client_for_enabled_check
  • (project_id) index_error_tracking_client_keys_on_project_id

Referenced by

  • nothing

Table checks: char_length(public_key) <= 255

error_tracking_error_events

10 cols · no RLS · line 20920View in 3D
  • Nullable foreign key project_iderror_tracking_error_events.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
error_id bigintNOT NULLerror_tracking_errors.id 1:N · CASCADE
description textNOT NULLCHECK char_length(description) <= 1024
environment textnullCHECK char_length(environment) <= 255
level textnullCHECK char_length(level) <= 255
occurred_at timestamptzNOT NULL
payload jsonbNOT NULLCAST('{}' AS jsonb)
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (error_id) index_error_tracking_error_events_on_error_id
  • (project_id) index_error_tracking_error_events_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(description) <= 1024; char_length(level) <= 255; char_length(environment) <= 255

error_tracking_errors

12 cols · no RLS · line 20946View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
description textNOT NULLCHECK char_length(description) <= 1024
actor textNOT NULLCHECK char_length(actor) <= 255
first_seen_at timestamptzNOT NULLnow()
last_seen_at timestamptzNOT NULLnow()
platform textnullCHECK char_length(platform) <= 255
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
events_count bigintNOT NULL0
status smallintNOT NULL0

Indexes

  • (project_id) index_error_tracking_errors_on_project_id
  • (project_id, status, id) index_et_errors_on_project_id_and_status_and_id
  • (project_id, status, events_count, id) index_et_errors_on_project_id_and_status_events_count_id_desc
  • (project_id, status, first_seen_at, id) index_et_errors_on_project_id_and_status_first_seen_at_id_desc
  • (project_id, status, last_seen_at, id) index_et_errors_on_project_id_and_status_last_seen_at_id_desc

Referenced by

Table checks: char_length(name) <= 255; char_length(actor) <= 255; char_length(description) <= 1024; char_length(platform) <= 255

external 4 tables

Tables whose names start with external_.

Entity-relationship diagram: external_approval_rules, external_pull_requests, external_status_checks, external_status_checks_protected_branchesexternal_approval_rulesid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzexternal_urltextnametextexternal_pull_requestsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintpull_request_iidintegerstatussmallintsource_branchvarchar(255)target_branchvarchar(255)source_repositoryvarchar(255)target_repositoryvarchar(255)source_shabyteatarget_shabyteaexternal_status_checksid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzexternal_urltextnametextencrypted_shared_secretbyteaencrypted_shared_secret_ivbyteaexternal_status_checks_protected_branchesid PKbigintexternal_status_check_id FKbigintprotected_branch_id FKbigintproject_id FKbigintprojectsprotected_branchesproject_idproject_idproject_idprotected_branch_idexternal_status_check_id

Relationships

external_approval_rules

6 cols · no RLS · line 21034View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
external_url textNOT NULLCHECK char_length(external_url) <= 255
name textNOT NULLCHECK char_length(name) <= 255

Indexes

  • UNIQUE (project_id, external_url) idx_on_external_approval_rules_project_id_external_url
  • UNIQUE (project_id, name) idx_on_external_approval_rules_project_id_name

Referenced by

  • nothing

Table checks: char_length(name) <= 255; char_length(external_url) <= 255

external_pull_requests

12 cols · no RLS · line 21054View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
pull_request_iid integerNOT NULL
status smallintNOT NULL
source_branch varchar(255)NOT NULL
target_branch varchar(255)NOT NULL
source_repository varchar(255)NOT NULL
target_repository varchar(255)NOT NULL
source_sha byteaNOT NULL
target_sha byteaNOT NULL

Indexes

  • UNIQUE (project_id, source_branch, target_branch) index_external_pull_requests_on_project_and_branches

Referenced by

external_status_checks

8 cols · no RLS · line 21078View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
external_url textNOT NULLCHECK char_length(external_url) <= 255
name textNOT NULLCHECK char_length(name) <= 255
encrypted_shared_secret byteanull
encrypted_shared_secret_iv byteanull

Indexes

  • (id, project_id) idx_external_status_checks_on_id_and_project_id
  • UNIQUE (project_id, external_url) idx_on_external_status_checks_project_id_external_url
  • UNIQUE (project_id, name) idx_on_external_status_checks_project_id_name

Referenced by

Table checks: char_length(name) <= 255; char_length(external_url) <= 255

external_status_checks_protected_branches

4 cols · no RLS · line 21100View in 3D
  • Nullable foreign key project_idexternal_status_checks_protected_branches.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
external_status_check_id bigintNOT NULLexternal_status_checks.id 1:N · CASCADE
protected_branch_id bigintNOT NULLprotected_branches.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (external_status_check_id) index_esc_protected_branches_on_external_status_check_id
  • (protected_branch_id) index_esc_protected_branches_on_protected_branch_id
  • (project_id) index_external_status_checks_protected_branches_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

fork 2 tables

Tables whose names start with fork_.

Entity-relationship diagram: fork_network_members, fork_networksfork_network_membersid PKbigintfork_network_id FKbigintproject_id FKbigintforked_from_project_id FKbigintfork_networksid PKbigintroot_project_id FKbigintdeleted_root_project_namevarcharorganization_idbigintprojectsroot_project_idforked_from_project_idfork_network_idproject_id

Relationships

fork_network_members

4 cols · no RLS · line 21151View in 3D
  • Nullable foreign key forked_from_project_idfork_network_members.forked_from_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
fork_network_id bigintNOT NULLfork_networks.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:1 · CASCADE
forked_from_project_id bigintnullprojects.id 1:N · SET NULL

Indexes

  • (fork_network_id) index_fork_network_members_on_fork_network_id
  • (forked_from_project_id) index_fork_network_members_on_forked_from_project_id
  • UNIQUE (project_id) index_fork_network_members_on_project_id

Referenced by

  • nothing

fork_networks

4 cols · no RLS · line 21167View in 3D
  • Nullable foreign key root_project_idfork_networks.root_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
root_project_id bigintnullprojects.id 1:1 · SET NULL
deleted_root_project_name varcharnull
organization_id bigintNOT NULL

Indexes

  • (organization_id) index_fork_networks_on_organization_id
  • UNIQUE (root_project_id) index_fork_networks_on_root_project_id

Referenced by

geo 8 tables

Tables whose names start with geo_.

Entity-relationship diagram: geo_cache_invalidation_events, geo_ci_job_artifact_verification_summaries, geo_event_log, geo_events, geo_node_namespace_links, geo_node_organization_links, geo_node_statuses, geo_nodesgeo_cache_invalidation_eventsid PKbigintkeyvarchargeo_ci_job_artifact_verification_summariesid PKbigintbucket_numberintegertotal_countintegerverified_countintegerfailed_countintegerstatesmallintlast_calculated_attimestamptzstate_changed_attimestamptzcreated_attimestamptzupdated_attimestamptzgeo_event_logid PKbigintcreated_attimestampcache_invalidation_event_id FKbigintgeo_event_id FKbigintgeo_eventsid PKbigintreplicable_namevarchar(255)event_namevarchar(255)payloadjsonbcreated_attimestamptzgeo_node_namespace_linksid PKbigintgeo_node_id FKbigintnamespace_idbigintcreated_attimestampupdated_attimestampgeo_node_organization_linksid PKbigintgeo_node_id FKbigintorganization_idbigintcreated_attimestamptzupdated_attimestamptzgeo_node_statusesid PKbigintgeo_node_id FKbigintdb_replication_lag_secondsintegerlast_event_idbigintlast_event_datetimestampcursor_last_event_idbigintcursor_last_event_datetimestampcreated_attimestampupdated_attimestamplast_successful_status_check_attimestampstatus_messagevarcharreplication_slots_countintegerreplication_slots_used_countintegerreplication_slots_max_retained_wal_bytesbigintversionvarcharrevisionvarcharstorage_configuration_digestbyteaprojects_countintegerstatusjsonbgeo_nodesid PKbigintprimarybooleanoauth_application_idbigintenabledbooleanaccess_keyvarcharencrypted_secret_access_keyvarcharencrypted_secret_access_key_ivvarcharclone_url_prefixvarcharfiles_max_capacityintegerrepos_max_capacityintegerurlvarcharselective_sync_typevarcharselective_sync_shardstextverification_max_capacityintegerminimum_reverification_intervalintegerinternal_urlvarcharnamevarcharcontainer_repositories_max_capacityintegercreated_attimestamptzupdated_attimestamptzsync_object_storagebooleanblob_download_timeoutintegerchecksum_mismatch_report_thresholdintegerchecksum_mismatch_self_heal_cooldown_minutesintegercache_invalidation_event_idgeo_event_idgeo_node_idgeo_node_idgeo_node_id

Relationships

geo_cache_invalidation_events

2 cols · no RLS · line 21183View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
key varcharNOT NULL

Indexes

  • none

Referenced by

geo_ci_job_artifact_verification_summaries

10 cols · no RLS · line 21197View in 3D
  • Isolated tablegeo_ci_job_artifact_verification_summaries references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
bucket_number integerNOT NULL
total_count integerNOT NULL0
verified_count integerNOT NULL0
failed_count integerNOT NULL0
state smallintNOT NULL0
last_calculated_at timestamptznull
state_changed_at timestamptzNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (bucket_number) idx_geo_ci_job_artifact_verification_summaries_on_bucket
  • (state) WHERE state = ANY(ARRAY[1, 2]) idx_geo_ci_job_artifact_verification_summaries_on_state

Referenced by

  • nothing

geo_event_log

4 cols · no RLS · line 21219View in 3D
  • Nullable foreign key cache_invalidation_event_idgeo_event_log.cache_invalidation_event_id may be NULL, so the relationship to geo_cache_invalidation_events is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key geo_event_idgeo_event_log.geo_event_id may be NULL, so the relationship to geo_events is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK cache_invalidation_event_id, geo_event_idgeo_event_log has several nullable FKs (cache_invalidation_event_id, geo_event_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestampNOT NULL
cache_invalidation_event_id bigintnullgeo_cache_invalidation_events.id 1:N · CASCADE
geo_event_id bigintnullgeo_events.id 1:N · CASCADE

Indexes

  • (cache_invalidation_event_id) WHERE cache_invalidation_event_id IS NOT NULL index_geo_event_log_on_cache_invalidation_event_id
  • (geo_event_id) WHERE geo_event_id IS NOT NULL index_geo_event_log_on_geo_event_id

Referenced by

  • nothing

geo_events

5 cols · no RLS · line 21235View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
replicable_name varchar(255)NOT NULL
event_name varchar(255)NOT NULL
payload jsonbNOT NULLCAST('{}' AS jsonb)
created_at timestamptzNOT NULL

Indexes

  • none

Referenced by

geo_node_statuses

19 cols · no RLS · line 21286View in 3D
  • TIMESTAMP without time zone last_event_datelast_event_date stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone cursor_last_event_datecursor_last_event_date stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone last_successful_status_check_atlast_successful_status_check_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
geo_node_id bigintNOT NULLgeo_nodes.id 1:1 · CASCADE
db_replication_lag_seconds integernull
last_event_id bigintnull
last_event_date timestampnull
cursor_last_event_id bigintnull
cursor_last_event_date timestampnull
created_at timestampNOT NULL
updated_at timestampNOT NULL
last_successful_status_check_at timestampnull
status_message varcharnull
replication_slots_count integernull
replication_slots_used_count integernull
replication_slots_max_retained_wal_bytes bigintnull
version varcharnull
revision varcharnull
storage_configuration_digest byteanull
projects_count integernull
status jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • UNIQUE (geo_node_id) index_geo_node_statuses_on_geo_node_id

Referenced by

  • nothing

geo_nodes

24 cols · no RLS · line 21317View in 3D
  • Enum-like column with no CHECK selective_sync_typeselective_sync_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
primary booleanNOT NULLFALSE
oauth_application_id bigintnull
enabled booleanNOT NULLTRUE
access_key varcharnull
encrypted_secret_access_key varcharnull
encrypted_secret_access_key_iv varcharnull
clone_url_prefix varcharnull
files_max_capacity integerNOT NULL10
repos_max_capacity integerNOT NULL10
url varcharNOT NULL
selective_sync_type varcharnull
selective_sync_shards textnull
verification_max_capacity integerNOT NULL10
minimum_reverification_interval integerNOT NULL90
internal_url varcharnull
name varcharNOT NULL
container_repositories_max_capacity integerNOT NULL2
created_at timestamptznull
updated_at timestamptznull
sync_object_storage booleanNOT NULLFALSE
blob_download_timeout integerNOT NULL28800
checksum_mismatch_report_threshold integerNOT NULL3
checksum_mismatch_self_heal_cooldown_minutes integerNOT NULL60

Indexes

  • (access_key) index_geo_nodes_on_access_key
  • UNIQUE (name) index_geo_nodes_on_name
  • (primary) index_geo_nodes_on_primary

Referenced by

gitlab 2 tables

Tables whose names start with gitlab_.

Entity-relationship diagram: gitlab_subscription_histories, gitlab_subscriptionsgitlab_subscription_historiesid PKbigintgitlab_subscription_created_attimestamptzgitlab_subscription_updated_attimestamptzstart_datedateend_datedatetrial_ends_ondatenamespace_idbiginthosted_plan_idbigintmax_seats_usedintegerseatsintegertrialbooleanchange_typesmallintgitlab_subscription_idbigintcreated_attimestamptztrial_starts_ondateauto_renewbooleantrial_extension_typesmallintseats_in_useintegerhosted_plan_name_uidsmallintcontract_overages_allowedbooleangitlab_subscriptionsid PKbigintcreated_attimestamptzupdated_attimestamptzstart_datedateend_datedatetrial_ends_ondatenamespace_id FKbiginthosted_plan_id FKbigintmax_seats_usedintegerseatsintegertrialbooleantrial_starts_ondateauto_renewbooleanseats_in_useintegerseats_owedintegertrial_extension_typesmallintmax_seats_used_changed_attimestamptzlast_seat_refresh_attimestamptzhosted_plan_name_uidsmallintcontract_overages_allowedbooleannamespacesplanshosted_plan_idnamespace_id

Relationships

gitlab_subscription_histories

20 cols · no RLS · line 21373View in 3D
  • Isolated tablegitlab_subscription_histories references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
gitlab_subscription_created_at timestamptznull
gitlab_subscription_updated_at timestamptznull
start_date datenull
end_date datenull
trial_ends_on datenull
namespace_id bigintnullCHECK namespace_id IS NOT NULL
hosted_plan_id bigintnull
max_seats_used integernull
seats integernull
trial booleannull
change_type smallintnull
gitlab_subscription_id bigintNOT NULL
created_at timestamptznull
trial_starts_on datenull
auto_renew booleannull
trial_extension_type smallintnull
seats_in_use integernull
hosted_plan_name_uid smallintnull
contract_overages_allowed booleannull

Indexes

  • (namespace_id, change_type, hosted_plan_id) i_gitlab_subscription_histories_on_namespace_change_type_plan
  • (end_date) index_gitlab_subscription_histories_on_end_date
  • (gitlab_subscription_id) index_gitlab_subscription_histories_on_gitlab_subscription_id
  • (hosted_plan_name_uid) index_gitlab_subscription_histories_on_hosted_plan_name_uid

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

gitlab_subscriptions

20 cols · no RLS · line 21406View in 3D
  • Nullable foreign key hosted_plan_idgitlab_subscriptions.hosted_plan_id may be NULL, so the relationship to plans is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idgitlab_subscriptions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK hosted_plan_id, namespace_idgitlab_subscriptions has several nullable FKs (hosted_plan_id, namespace_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
start_date datenull
end_date datenull
trial_ends_on datenull
namespace_id bigintnullnamespaces.id 1:1 · CASCADECHECK namespace_id IS NOT NULL
hosted_plan_id bigintnullplans.id 1:N · CASCADE
max_seats_used integernull0
seats integernull0
trial booleannullFALSE
trial_starts_on datenull
auto_renew booleannull
seats_in_use integerNOT NULL0
seats_owed integerNOT NULL0
trial_extension_type smallintnull
max_seats_used_changed_at timestamptznull
last_seat_refresh_at timestamptznull
hosted_plan_name_uid smallintnull
contract_overages_allowed booleanNOT NULLTRUE

Indexes

  • (end_date, namespace_id) index_gitlab_subscriptions_on_end_date_and_namespace_id
  • (hosted_plan_id, trial) index_gitlab_subscriptions_on_hosted_plan_id_and_trial
  • (hosted_plan_name_uid, trial) index_gitlab_subscriptions_on_hosted_plan_name_uid_and_trial
  • (max_seats_used_changed_at, namespace_id) index_gitlab_subscriptions_on_max_seats_used_changed_at
  • UNIQUE (namespace_id) index_gitlab_subscriptions_on_namespace_id
  • (trial, trial_starts_on) index_gitlab_subscriptions_on_trial_and_trial_starts_on

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

govern 2 tables

Tables whose names start with govern_.

Entity-relationship diagram: govern_policies, govern_policy_enforcementsgovern_policiesid PKbigintorganization_idbigintnamespace_idbigintcreated_attimestamptzupdated_attimestamptzversionintegertrigger_typesmallintmodesmallintlifecycle_statesmallintnametextdescriptiontextscope_regotextpolicy_scopejsonbrulesjsonbactionsjsonbgovern_policy_enforcementsid PKbigintorganization_idbigintgovern_policy_id FKbigintproject_idbigintcreated_attimestamptzupdated_attimestamptzlast_evaluated_attimestamptzstatesmallintgovern_policy_id

Relationships

govern_policies

15 cols · no RLS · line 21439View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULL
namespace_id bigintnull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
version integerNOT NULL1
trigger_type smallintNOT NULL
mode smallintNOT NULL2
lifecycle_state smallintNOT NULL0
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 4096
scope_rego textnullCHECK char_length(scope_rego) <= 4096
policy_scope jsonbnull
rules jsonbNOT NULLCAST('[]' AS jsonb)
actions jsonbNOT NULLCAST('[]' AS jsonb)

Indexes

  • (namespace_id) index_govern_policies_on_namespace_id
  • (organization_id, trigger_type, lifecycle_state, id) index_govern_policies_on_org_trigger_lifecycle_and_id
  • UNIQUE (organization_id, name) unique_govern_policies_organization_id_and_name

Referenced by

Table checks: char_length(description) <= 4096; char_length(scope_rego) <= 4096; char_length(name) <= 255

govern_policy_enforcements

8 cols · no RLS · line 21469View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULL
govern_policy_id bigintNOT NULLgovern_policies.id 1:N · CASCADE
project_id bigintnull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
last_evaluated_at timestamptznull
state smallintNOT NULL0

Indexes

  • (govern_policy_id) index_govern_policy_enforcements_on_govern_policy_id
  • (organization_id) index_govern_policy_enforcements_on_organization_id
  • (project_id) index_govern_policy_enforcements_on_project_id
  • UNIQUE (organization_id, govern_policy_id, project_id) WHERE project_id IS NOT NULL unique_govern_policy_enforcements_org_policy_and_project

Referenced by

  • nothing

gpg 3 tables

Tables whose names start with gpg_.

Entity-relationship diagram: gpg_key_subkeys, gpg_keys, gpg_signaturesgpg_key_subkeysid PKbigintgpg_key_id FKbigintkeyidbyteafingerprintbyteauser_id FKbigintgpg_keysid PKbigintcreated_attimestamptzupdated_attimestamptzuser_id FKbigintprimary_keyidbyteafingerprintbyteakeytextexternally_verifiedbooleanexternally_verified_attimestamptzgpg_signaturesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintgpg_key_id FKbigintcommit_shabyteagpg_key_primary_keyidbyteagpg_key_user_nametextgpg_key_user_emailtextverification_statussmallintgpg_key_subkey_id FKbigintcommitter_emailtextprojectsusersuser_iduser_idgpg_key_idproject_idgpg_key_subkey_idgpg_key_id

Relationships

gpg_key_subkeys

5 cols · no RLS · line 21489View in 3D
  • Nullable foreign key user_idgpg_key_subkeys.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
gpg_key_id bigintNOT NULLgpg_keys.id 1:N · CASCADE
keyid byteanull
fingerprint byteanull
user_id bigintnullusers.id 1:N · CASCADECHECK user_id IS NOT NULL

Indexes

  • UNIQUE (fingerprint) index_gpg_key_subkeys_on_fingerprint
  • (gpg_key_id) index_gpg_key_subkeys_on_gpg_key_id
  • UNIQUE (keyid) index_gpg_key_subkeys_on_keyid
  • (user_id) index_gpg_key_subkeys_on_user_id

Referenced by

Table checks: user_id IS NOT NULL

gpg_keys

9 cols · no RLS · line 21507View in 3D
  • Nullable foreign key user_idgpg_keys.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
user_id bigintnullusers.id 1:N · CASCADECHECK user_id IS NOT NULL
primary_keyid byteanull
fingerprint byteanull
key textnull
externally_verified booleanNOT NULLFALSE
externally_verified_at timestamptznull

Indexes

  • (user_id) WHERE externally_verified = TRUE idx_gpg_keys_on_user_externally_verified
  • UNIQUE (fingerprint) index_gpg_keys_on_fingerprint
  • UNIQUE (primary_keyid) index_gpg_keys_on_primary_keyid
  • (user_id) index_gpg_keys_on_user_id

Referenced by

Table checks: user_id IS NOT NULL

gpg_signatures

12 cols · no RLS · line 21529View in 3D
  • Nullable foreign key project_idgpg_signatures.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key gpg_key_subkey_idgpg_signatures.gpg_key_subkey_id may be NULL, so the relationship to gpg_key_subkeys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key gpg_key_idgpg_signatures.gpg_key_id may be NULL, so the relationship to gpg_keys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, gpg_key_subkey_id, gpg_key_idgpg_signatures has several nullable FKs (project_id, gpg_key_subkey_id, gpg_key_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
gpg_key_id bigintnullgpg_keys.id 1:N · SET NULL
commit_sha byteanull
gpg_key_primary_keyid byteanull
gpg_key_user_name textnull
gpg_key_user_email textnull
verification_status smallintNOT NULL0
gpg_key_subkey_id bigintnullgpg_key_subkeys.id 1:N · SET NULL
committer_email textnullCHECK char_length(committer_email) <= 255

Indexes

  • UNIQUE (commit_sha, project_id) index_gpg_signatures_on_commit_sha_and_project_id
  • (gpg_key_id, id) index_gpg_signatures_on_gpg_key_id_and_id
  • (gpg_key_primary_keyid) index_gpg_signatures_on_gpg_key_primary_keyid
  • (gpg_key_subkey_id) index_gpg_signatures_on_gpg_key_subkey_id
  • (project_id) index_gpg_signatures_on_project_id

Referenced by

  • nothing

Table checks: char_length(committer_email) <= 255; project_id IS NOT NULL

import 10 tables

Tables whose names start with import_.

Entity-relationship diagram: import_export_upload_upload_states, import_export_upload_uploads, import_export_uploads, import_failures, import_offline_configurations, import_offline_exports, import_placeholder_memberships, import_placeholder_user_details, import_source_user_placeholder_references, import_source_usersimport_export_upload_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzimport_export_upload_upload_id FKbigintproject_id FKbigintnamespace_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextimport_export_upload_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextimport_export_uploadsid PKbigintupdated_attimestamptzproject_id FKbigintimport_filetextexport_filetextgroup_id FKbigintremote_import_urltextuser_id FKbigintimport_failuresid PKbigintrelation_indexintegerproject_id FKbigintcreated_attimestamptzrelation_keyvarchar(64)exception_classvarchar(128)correlation_id_valuevarchar(128)exception_messagevarchar(255)retry_countintegergroup_id FKbigintsourcevarchar(128)external_identifiersjsonbuser_id FKbigintorganization_id FKbigintimport_offline_configurationsid PKbigintoffline_export_id FKbigintorganization_id FKbigintcreated_attimestamptzupdated_attimestamptzprovidersmallintbuckettextexport_prefixtextobject_storage_credentialsjsonbbulk_import_id FKbigintentity_prefix_mappingjsonbsource_hostnametextimport_offline_exportsid PKbigintuser_id FKbigintorganization_id FKbigintcreated_attimestamptzupdated_attimestamptzstatussmallinthas_failuresbooleansource_hostnametextimport_placeholder_membershipsid PKbigintsource_user_id FKbigintnamespace_id FKbigintgroup_id FKbigintproject_id FKbigintcreated_attimestamptzexpires_atdateaccess_levelsmallintimport_placeholder_user_detailsid PKbigintplaceholder_user_id FKbigintnamespace_id FKbigintdeletion_attemptsintegerorganization_id FKbigintlast_deletion_attempt_attimestamptzcreated_attimestamptzupdated_attimestamptzimport_source_user_placeholder_referencesid PKbigintsource_user_id FKbigintnamespace_id FKbigintnumeric_keybigintcreated_attimestamptzmodeltextuser_reference_columntextcomposite_keyjsonbalias_versionsmallintimport_source_usersid PKbigintplaceholder_user_id FKbigintreassign_to_user_id FKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzstatussmallintsource_usernametextsource_nametextsource_user_identifiertextsource_hostnametextimport_typetextreassigned_by_user_id FKbigintreassignment_errortextreassignment_tokentextbulk_importsnamespacesorganizationsprojectsusersproject_idimport_export_upload_upload_idnamespace_iduser_idgroup_idproject_idgroup_idorganization_iduser_idproject_idorganization_iduser_idplaceholder_user_idorganization_idnamespace_idreassigned_by_user_idreassign_to_user_idplaceholder_user_idnamespace_idorganization_idbulk_import_idoffline_export_idnamespace_idgroup_idproject_idsource_user_idnamespace_idsource_user_id

Relationships

import_export_upload_upload_states

11 cols · no RLS · line 22162View in 3D
  • Nullable foreign key project_idimport_export_upload_upload_states.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idimport_export_upload_upload_states.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
import_export_upload_upload_id bigintNOT NULLimport_export_upload_uploads.id 1:1 · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_ie_upload_upload_states_failed_verification
  • (import_export_upload_upload_id) WHERE verification_state = 0 OR verification_state = 3 idx_ie_upload_upload_states_needs_verification_id
  • (import_export_upload_upload_id, verification_started_at) WHERE verification_state = 1 idx_ie_upload_upload_states_on_verification_started
  • (verification_state) idx_ie_upload_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_ie_upload_upload_states_pending_verification
  • UNIQUE (import_export_upload_upload_id) idx_import_export_upload_upload_states_on_upload_id
  • (namespace_id) index_import_export_upload_upload_states_on_namespace_id
  • (project_id) index_import_export_upload_upload_states_on_project_id

Referenced by

  • nothing

Table checks: num_nonnulls(namespace_id, project_id) = 1; char_length(verification_failure) <= 255

import_export_upload_uploads

16 cols · no RLS · line 22187View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnull
namespace_id bigintnull
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • UNIQUE (id) idx_ie_upload_uploads_on_id
  • (checksum) import_export_upload_uploads_checksum_idx
  • (model_id, model_type, uploader, created_at) import_export_upload_uploads_model_id_model_type_uploader_c_idx
  • (namespace_id) import_export_upload_uploads_namespace_id_idx
  • (organization_id) import_export_upload_uploads_organization_id_idx
  • (project_id) import_export_upload_uploads_project_id_idx
  • (store) import_export_upload_uploads_store_idx
  • (uploaded_by_user_id) import_export_upload_uploads_uploaded_by_user_id_idx
  • (uploader, path) import_export_upload_uploads_uploader_path_idx

Referenced by

Table checks: char_length(path) <= 511; num_nonnulls(namespace_id, project_id) = 1; char_length(checksum) <= 64

import_export_uploads

8 cols · no RLS · line 22209View in 3D
  • Nullable foreign key user_idimport_export_uploads.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idimport_export_uploads.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idimport_export_uploads.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK user_id, group_id, project_idimport_export_uploads has several nullable FKs (user_id, group_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
updated_at timestamptzNOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
import_file textnull
export_file textnull
group_id bigintnullnamespaces.id 1:N · CASCADE
remote_import_url textnullCHECK char_length(remote_import_url) <= 2048
user_id bigintnullusers.id 1:N · SET NULL

Indexes

  • (updated_at, id) WHERE import_file IS NOT NULL idx_import_export_uploads_updated_at_id_import_file
  • (group_id) WHERE group_id IS NOT NULL index_import_export_uploads_on_group_id_non_unique
  • (project_id) index_import_export_uploads_on_project_id
  • (updated_at) index_import_export_uploads_on_updated_at
  • (user_id) index_import_export_uploads_on_user_id

Referenced by

  • nothing

Table checks: char_length(remote_import_url) <= 2048; num_nonnulls(group_id, project_id) = 1

import_failures

14 cols · no RLS · line 22231View in 3D
  • Nullable foreign key group_idimport_failures.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idimport_failures.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idimport_failures.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idimport_failures.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK group_id, organization_id, user_id, project_idimport_failures has several nullable FKs (group_id, organization_id, user_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
relation_index integernull
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
relation_key varchar(64)null
exception_class varchar(128)null
correlation_id_value varchar(128)null
exception_message varchar(255)null
retry_count integernull
group_id bigintnullnamespaces.id 1:N · CASCADE
source varchar(128)null
external_identifiers jsonbNOT NULLCAST('{}' AS jsonb)
user_id bigintnullusers.id 1:N · CASCADE
organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (correlation_id_value) index_import_failures_on_correlation_id_value
  • (external_identifiers) WHERE external_identifiers <> CAST('{}' AS jsonb) index_import_failures_on_external_identifiers
  • (group_id) WHERE group_id IS NOT NULL index_import_failures_on_group_id_not_null
  • (organization_id) index_import_failures_on_organization_id
  • (project_id, correlation_id_value) WHERE retry_count = 0 index_import_failures_on_project_id_and_correlation_id_value
  • (project_id) WHERE project_id IS NOT NULL index_import_failures_on_project_id_not_null
  • (user_id) WHERE user_id IS NOT NULL index_import_failures_on_user_id_not_null

Referenced by

  • nothing

Table checks: num_nonnulls(group_id, organization_id, project_id) = 1

import_offline_configurations

12 cols · no RLS · line 22258View in 3D
  • Nullable foreign key bulk_import_idimport_offline_configurations.bulk_import_id may be NULL, so the relationship to bulk_imports is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key offline_export_idimport_offline_configurations.offline_export_id may be NULL, so the relationship to import_offline_exports is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
offline_export_id bigintnullimport_offline_exports.id 1:N · CASCADE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
provider smallintNOT NULL
bucket textNOT NULLCHECK char_length(bucket) <= 256
export_prefix textNOT NULLCHECK char_length(export_prefix) <= 255
object_storage_credentials jsonbNOT NULL
bulk_import_id bigintnullbulk_imports.id 1:N · CASCADE
entity_prefix_mapping jsonbNOT NULLCAST('{}' AS jsonb)
source_hostname textnullCHECK char_length(source_hostname) <= 255

Indexes

  • (bulk_import_id) index_import_offline_configurations_on_bulk_import_id
  • (offline_export_id) index_import_offline_configurations_on_offline_export_id
  • (organization_id) index_import_offline_configurations_on_organization_id

Referenced by

  • nothing

Table checks: char_length(source_hostname) <= 255; char_length(bucket) <= 256; num_nonnulls(bulk_import_id, offline_export_id) = 1; char_length(export_prefix) <= 255

import_offline_exports

8 cols · no RLS · line 22286View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
has_failures booleanNOT NULLFALSE
source_hostname textnullCHECK char_length(source_hostname) <= 255

Indexes

  • (organization_id) index_import_offline_exports_on_organization_id
  • (user_id) index_import_offline_exports_on_user_id

Referenced by

Table checks: char_length(source_hostname) <= 255

import_placeholder_memberships

8 cols · no RLS · line 22307View in 3D
  • Nullable foreign key group_idimport_placeholder_memberships.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idimport_placeholder_memberships.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK group_id, project_idimport_placeholder_memberships has several nullable FKs (group_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
source_user_id bigintNOT NULLimport_source_users.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
expires_at datenull
access_level smallintNOT NULL

Indexes

  • UNIQUE (source_user_id, group_id) idx_import_placeholder_memberships_on_source_user_group_id
  • (source_user_id, id) idx_import_placeholder_memberships_on_source_user_id_and_id
  • UNIQUE (source_user_id, project_id) idx_import_placeholder_memberships_on_source_user_project_id
  • (group_id) index_import_placeholder_memberships_on_group_id
  • (namespace_id) index_import_placeholder_memberships_on_namespace_id
  • (project_id) index_import_placeholder_memberships_on_project_id

Referenced by

  • nothing

import_placeholder_user_details

8 cols · no RLS · line 22327View in 3D
  • Nullable foreign key namespace_idimport_placeholder_user_details.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
placeholder_user_id bigintNOT NULLusers.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · SET NULL
deletion_attempts integerNOT NULL0
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
last_deletion_attempt_at timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (deletion_attempts, last_deletion_attempt_at, id) WHERE namespace_id IS NULL index_import_placeholder_user_details_on_eligible_for_deletion
  • (namespace_id) index_import_placeholder_user_details_on_namespace_id
  • (organization_id) index_import_placeholder_user_details_on_organization_id
  • (placeholder_user_id) index_import_placeholder_user_details_on_placeholder_user_id

Referenced by

  • nothing

import_source_user_placeholder_references

9 cols · no RLS · line 22347View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
source_user_id bigintNOT NULLimport_source_users.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
numeric_key bigintnull
created_at timestamptzNOT NULL
model textNOT NULLCHECK char_length(model) <= 150
user_reference_column textNOT NULLCHECK char_length(user_reference_column) <= 50
composite_key jsonbnull
alias_version smallintNOT NULL

Indexes

  • (source_user_id, model, user_reference_column, alias_version, id) idx_import_source_user_placeholder_references_on_user_model_id
  • (namespace_id) index_import_source_user_placeholder_references_on_namespace_id
  • (source_user_id, id) index_import_source_user_placeholder_refs_on_source_user_id_id

Referenced by

  • nothing

Table checks: char_length(user_reference_column) <= 50; char_length(model) <= 150

import_source_users

15 cols · no RLS · line 22370View in 3D
  • Nullable foreign key reassigned_by_user_idimport_source_users.reassigned_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key reassign_to_user_idimport_source_users.reassign_to_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key placeholder_user_idimport_source_users.placeholder_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK reassigned_by_user_id, reassign_to_user_id, placeholder_user_idimport_source_users has several nullable FKs (reassigned_by_user_id, reassign_to_user_id, placeholder_user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
placeholder_user_id bigintnullusers.id 1:N · SET NULL
reassign_to_user_id bigintnullusers.id 1:N · SET NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
source_username textnullCHECK char_length(source_username) <= 255
source_name textnullCHECK char_length(source_name) <= 255
source_user_identifier textNOT NULLCHECK char_length(source_user_identifier) <= 255
source_hostname textNOT NULLCHECK char_length(source_hostname) <= 255
import_type textNOT NULLCHECK char_length(import_type) <= 255
reassigned_by_user_id bigintnullusers.id 1:N · SET NULL
reassignment_error textnullCHECK char_length(reassignment_error) <= 255
reassignment_token textnullCHECK char_length(reassignment_token) <= 32

Indexes

  • (namespace_id, source_hostname, import_type, id) WHERE source_name IS NULL OR source_username IS NULL idx_namespace_hostname_import_type_id_source_name_and_username
  • (namespace_id, status) index_import_source_users_on_namespace_id_and_status
  • UNIQUE (namespace_id, reassignment_token) index_import_source_users_on_namespace_id_reassignment_token
  • (placeholder_user_id) index_import_source_users_on_placeholder_user_id
  • (reassigned_by_user_id) index_import_source_users_on_reassigned_by_user_id
  • UNIQUE (reassign_to_user_id, namespace_id, source_hostname, import_type) unique_import_source_users_on_reassign_to_user_id_and_import
  • UNIQUE (source_user_identifier, namespace_id, source_hostname, import_type) unique_import_source_users_source_identifier_and_import_source

Referenced by

Table checks: char_length(reassignment_error) <= 255; char_length(import_type) <= 255; char_length(source_username) <= 255; char_length(source_name) <= 255; char_length(source_user_identifier) <= 255; char_length(reassignment_token) <= 32; char_length(source_hostname) <= 255

issuable 6 tables

Tables whose names start with issuable_.

Entity-relationship diagram: issuable_metric_image_upload_states, issuable_metric_image_uploads, issuable_metric_images, issuable_resource_links, issuable_severities, issuable_slasissuable_metric_image_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzissuable_metric_image_upload_id FKbigintnamespace_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextissuable_metric_image_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextissuable_metric_imagesid PKbigintissue_id FKbigintcreated_attimestamptzupdated_attimestamptzfile_storesmallintfiletexturltexturl_texttextnamespace_id FKbigintissuable_resource_linksid PKbigintissue_id FKbigintlink_texttextlinktextlink_typesmallintcreated_attimestamptzupdated_attimestamptzis_uniquebooleannamespace_id FKbigintissuable_severitiesid PKbigintissue_id FKbigintseveritysmallintnamespace_id FKbigintissuable_slasid PKbigintissue_id FKbigintdue_attimestamptzlabel_appliedbooleanissuable_closedbooleannamespace_id FKbigintissuesnamespacesnamespace_idissuable_metric_image_upload_idnamespace_idissue_idnamespace_idissue_idnamespace_idissue_idnamespace_idissue_id

Relationships

issuable_metric_image_upload_states

10 cols · no RLS · line 22861View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
issuable_metric_image_upload_id bigintNOT NULLissuable_metric_image_uploads.id 1:1 · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_issuable_metric_image_upload_states_failed_verification
  • (issuable_metric_image_upload_id) WHERE verification_state = 0 OR verification_state = 3 idx_issuable_metric_image_upload_states_needs_verification_id
  • UNIQUE (issuable_metric_image_upload_id) idx_issuable_metric_image_upload_states_on_imi_upload_id
  • (namespace_id) idx_issuable_metric_image_upload_states_on_namespace_id
  • (verification_state) idx_issuable_metric_image_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_issuable_metric_image_upload_states_pending_verification
  • (issuable_metric_image_upload_id, verification_started_at) WHERE verification_state = 1 idx_issuable_metric_image_upload_states_verification_started

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

issuable_metric_image_uploads

16 cols · no RLS · line 22884View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnull
namespace_id bigintnullCHECK namespace_id IS NOT NULL
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • UNIQUE (id) idx_issuable_metric_image_uploads_on_id
  • (checksum) issuable_metric_image_uploads_checksum_idx
  • (model_id, model_type, uploader, created_at) issuable_metric_image_uploads_model_id_model_type_uploader__idx
  • (namespace_id) issuable_metric_image_uploads_namespace_id_idx
  • (organization_id) issuable_metric_image_uploads_organization_id_idx
  • (project_id) issuable_metric_image_uploads_project_id_idx
  • (store) issuable_metric_image_uploads_store_idx
  • (uploaded_by_user_id) issuable_metric_image_uploads_uploaded_by_user_id_idx
  • (uploader, path) issuable_metric_image_uploads_uploader_path_idx

Referenced by

Table checks: char_length(path) <= 511; namespace_id IS NOT NULL; char_length(checksum) <= 64

issuable_metric_images

9 cols · no RLS · line 22906View in 3D
  • Nullable foreign key namespace_idissuable_metric_images.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
issue_id bigintNOT NULLissues.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store smallintnull
file textNOT NULLCHECK char_length(file) <= 255
url textnullCHECK char_length(url) <= 255
url_text textnullCHECK char_length(url_text) <= 128
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (issue_id) index_issuable_metric_images_on_issue_id
  • (namespace_id) index_issuable_metric_images_on_namespace_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL; char_length(url_text) <= 128; char_length(url) <= 255; char_length(file) <= 255

issuable_severities

4 cols · no RLS · line 22955View in 3D
  • Nullable foreign key namespace_idissuable_severities.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
issue_id bigintNOT NULLissues.id 1:1 · CASCADE
severity smallintNOT NULL0
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • UNIQUE (issue_id) index_issuable_severities_on_issue_id
  • (namespace_id) index_issuable_severities_on_namespace_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

issuable_slas

6 cols · no RLS · line 22972View in 3D
  • Nullable foreign key namespace_idissuable_slas.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
issue_id bigintNOT NULLissues.id 1:1 · CASCADE
due_at timestamptzNOT NULL
label_applied booleanNOT NULLFALSE
issuable_closed booleanNOT NULLFALSE
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (due_at, id) WHERE label_applied = FALSE AND issuable_closed = FALSE index_issuable_slas_on_due_at_id_label_applied_issuable_closed
  • UNIQUE (issue_id) index_issuable_slas_on_issue_id
  • (namespace_id) index_issuable_slas_on_namespace_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

jira 4 tables

Tables whose names start with jira_.

Entity-relationship diagram: jira_connect_installations, jira_connect_subscriptions, jira_imports, jira_tracker_datajira_connect_installationsid PKbigintclient_keyvarcharencrypted_shared_secretvarcharencrypted_shared_secret_ivvarcharbase_urlvarcharinstance_urltextorganization_id FKbigintdisplay_urltextcloud_idtextjira_api_base_urltextencrypted_forge_system_tokentextencrypted_forge_system_token_ivtextjira_connect_subscriptionsid PKbigintjira_connect_installation_id FKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzjira_importsid PKbigintproject_id FKbigintuser_id FKbigintlabel_id FKbigintcreated_attimestamptzupdated_attimestamptzfinished_attimestamptzjira_project_xidbiginttotal_issue_countintegerimported_issues_countintegerfailed_to_import_countintegerstatussmallintjidvarchar(255)jira_project_keyvarchar(255)jira_project_namevarchar(255)scheduled_attimestamptzerror_messagetextjira_tracker_dataid PKbigintcreated_attimestamptzupdated_attimestamptzencrypted_urlvarcharencrypted_url_ivvarcharencrypted_api_urlvarcharencrypted_api_url_ivvarcharencrypted_usernamevarcharencrypted_username_ivvarcharencrypted_passwordvarcharencrypted_password_ivvarcharjira_issue_transition_idvarcharproject_keytextissues_enabledbooleandeployment_typesmallintvulnerabilities_issuetypetextvulnerabilities_enabledbooleanjira_issue_transition_automaticbooleanintegration_id FKbigintjira_issue_prefixtextjira_issue_regextextjira_auth_typesmallintproject_keystext[]customize_jira_issue_enabledbooleanproject_id FKbigintgroup_id FKbigintorganization_id FKbigintjira_check_enabledbooleanjira_assignee_check_enabledbooleanjira_status_check_enabledbooleanjira_exists_check_enabledbooleanjira_allowed_statuses_stringtextintegrationslabelsnamespacesorganizationsprojectsusersorganization_idproject_idlabel_iduser_idorganization_idgroup_idintegration_idproject_idnamespace_idjira_connect_installation_id

Relationships

jira_connect_installations

12 cols · no RLS · line 23241View in 3D
  • Nullable foreign key organization_idjira_connect_installations.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
client_key varcharnull
encrypted_shared_secret varcharnull
encrypted_shared_secret_iv varcharnull
base_url varcharnull
instance_url textnullCHECK char_length(instance_url) <= 255
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL
display_url textnullCHECK char_length(display_url) <= 255
cloud_id textnullCHECK char_length(cloud_id) <= 255
jira_api_base_url textnullCHECK char_length(jira_api_base_url) <= 512
encrypted_forge_system_token textnullCHECK char_length(encrypted_forge_system_token) <= 8192
encrypted_forge_system_token_iv textnullCHECK char_length(encrypted_forge_system_token_iv) <= 255

Indexes

  • UNIQUE (organization_id, client_key) idx_jira_connect_installations_on_org_id_client_key_uniq
  • (instance_url) index_jira_connect_installations_on_instance_url
  • (organization_id, cloud_id) index_jira_connect_installations_on_org_id_cloud_id

Referenced by

Table checks: char_length(cloud_id) <= 255; char_length(jira_api_base_url) <= 512; char_length(instance_url) <= 255; char_length(encrypted_forge_system_token) <= 8192; organization_id IS NOT NULL; char_length(encrypted_forge_system_token_iv) <= 255; char_length(display_url) <= 255

jira_connect_subscriptions

5 cols · no RLS · line 23272View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
jira_connect_installation_id bigintNOT NULLjira_connect_installations.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (jira_connect_installation_id, namespace_id) idx_jira_connect_subscriptions_on_installation_id_namespace_id
  • (namespace_id) index_jira_connect_subscriptions_on_namespace_id

Referenced by

  • nothing

jira_imports

17 cols · no RLS · line 23289View in 3D
  • Nullable foreign key label_idjira_imports.label_id may be NULL, so the relationship to labels is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idjira_imports.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK label_id, user_idjira_imports has several nullable FKs (label_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
user_id bigintnullusers.id 1:N · SET NULL
label_id bigintnulllabels.id 1:N · SET NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
finished_at timestamptznull
jira_project_xid bigintNOT NULL
total_issue_count integerNOT NULL0
imported_issues_count integerNOT NULL0
failed_to_import_count integerNOT NULL0
status smallintNOT NULL0
jid varchar(255)null
jira_project_key varchar(255)NOT NULL
jira_project_name varchar(255)NOT NULL
scheduled_at timestamptznull
error_message textnullCHECK char_length(error_message) <= 1000

Indexes

  • (label_id) index_jira_imports_on_label_id
  • (project_id, jira_project_key) index_jira_imports_on_project_id_and_jira_project_key
  • (user_id) index_jira_imports_on_user_id

Referenced by

  • nothing

Table checks: char_length(error_message) <= 1000

jira_tracker_data

32 cols · no RLS · line 23319View in 3D
  • Nullable foreign key organization_idjira_tracker_data.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idjira_tracker_data.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key integration_idjira_tracker_data.integration_id may be NULL, so the relationship to integrations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idjira_tracker_data.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK organization_id, group_id, integration_id, project_idjira_tracker_data has several nullable FKs (organization_id, group_id, integration_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • Wide table (32 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
encrypted_url varcharnull
encrypted_url_iv varcharnull
encrypted_api_url varcharnull
encrypted_api_url_iv varcharnull
encrypted_username varcharnull
encrypted_username_iv varcharnull
encrypted_password varcharnull
encrypted_password_iv varcharnull
jira_issue_transition_id varcharnull
project_key textnullCHECK char_length(project_key) <= 255
issues_enabled booleanNOT NULLFALSE
deployment_type smallintNOT NULL0
vulnerabilities_issuetype textnullCHECK char_length(vulnerabilities_issuetype) <= 255
vulnerabilities_enabled booleanNOT NULLFALSE
jira_issue_transition_automatic booleanNOT NULLFALSE
integration_id bigintnullintegrations.id 1:N · CASCADE
jira_issue_prefix textnullCHECK char_length(jira_issue_prefix) <= 255
jira_issue_regex textnullCHECK char_length(jira_issue_regex) <= 255
jira_auth_type smallintNOT NULL0
project_keys text[]NOT NULLCAST('{}' AS text[])
customize_jira_issue_enabled booleannullFALSE
project_id bigintnullprojects.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
organization_id bigintnullorganizations.id 1:N · CASCADE
jira_check_enabled booleanNOT NULLFALSE
jira_assignee_check_enabled booleanNOT NULLFALSE
jira_status_check_enabled booleanNOT NULLFALSE
jira_exists_check_enabled booleanNOT NULLFALSE
jira_allowed_statuses_string textnullCHECK char_length(jira_allowed_statuses_string) <= 1024

Indexes

  • (group_id) index_jira_tracker_data_on_group_id
  • (integration_id) index_jira_tracker_data_on_integration_id
  • (organization_id) index_jira_tracker_data_on_organization_id
  • (project_id) index_jira_tracker_data_on_project_id

Referenced by

  • nothing

Table checks: char_length(vulnerabilities_issuetype) <= 255; char_length(project_key) <= 255; char_length(jira_issue_prefix) <= 255; char_length(jira_issue_regex) <= 255; char_length(jira_allowed_statuses_string) <= 1024; num_nonnulls(group_id, organization_id, project_id) = 1

label 2 tables

Tables whose names start with label_.

Entity-relationship diagram: label_links, label_prioritieslabel_linksid PKbigintlabel_id FKbiginttarget_idbiginttarget_typevarcharcreated_attimestampupdated_attimestampnamespace_id FKbigintlabel_prioritiesid PKbigintproject_id FKbigintlabel_id FKbigintpriorityintegercreated_attimestampupdated_attimestamplabelsnamespacesprojectsnamespace_idlabel_idlabel_idproject_id

Relationships

label_priorities

6 cols · no RLS · line 23455View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
label_id bigintNOT NULLlabels.id 1:N · CASCADE
priority integerNOT NULL
created_at timestampNOT NULL
updated_at timestampNOT NULL

Indexes

  • (label_id) index_label_priorities_on_label_id
  • (priority) index_label_priorities_on_priority
  • UNIQUE (project_id, label_id) index_label_priorities_on_project_id_and_label_id

Referenced by

  • nothing

ldap 2 tables

Tables whose names start with ldap_.

Entity-relationship diagram: ldap_admin_role_links, ldap_group_linksldap_admin_role_linksid PKbigintmember_role_id FKbigintcreated_attimestamptzupdated_attimestamptzprovidertextcntextfiltertextsync_statussmallintsync_started_attimestamptzsync_ended_attimestamptzlast_successful_sync_attimestamptzsync_errortextorganization_id FKbigintldap_group_linksid PKbigintcnvarchargroup_accessintegergroup_idbigintcreated_attimestampupdated_attimestampprovidervarcharfiltervarcharmember_role_id FKbigintmember_rolesorganizationsorganization_idmember_role_idmember_role_id

Relationships

lfs 4 tables

Tables whose names start with lfs_.

Entity-relationship diagram: lfs_file_locks, lfs_object_states, lfs_objects, lfs_objects_projectslfs_file_locksid PKbigintproject_id FKbigintuser_id FKbigintcreated_attimestamppathvarchar(511)lfs_object_statesverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzlfs_object_id PKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextlfs_objectsid PKbigintoidvarcharsizebigintcreated_attimestampupdated_attimestampfilevarcharfile_storeintegerlfs_objects_projectsid PKbigintlfs_object_idbigintproject_id FKbigintcreated_attimestampupdated_attimestamprepository_typesmallintoidtextprojectsusersuser_idproject_idproject_id

Relationships

lfs_file_locks

5 cols · no RLS · line 23552View in 3D
  • Junction table allows duplicate links project_id, user_idlfs_file_locks looks like a many-to-many link table but has no unique constraint across (project_id, user_id). The same pair can be inserted twice; every join through it will double-count.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestampNOT NULL
path varchar(511)null

Indexes

  • UNIQUE (project_id, path) index_lfs_file_locks_on_project_id_and_path
  • (user_id) index_lfs_file_locks_on_user_id

Referenced by

  • nothing

lfs_object_states

8 cols · no RLS · line 23569View in 3D
  • Isolated tablelfs_object_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
lfs_object_id PKbigintNOT NULL
verification_state smallintNOT NULL0
verification_retry_count smallintnull
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_lfs_object_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_lfs_object_states_needs_verification
  • (lfs_object_id) index_lfs_object_states_on_lfs_object_id
  • (verification_state) index_lfs_object_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_lfs_object_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

lfs_objects

7 cols · no RLS · line 23590View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tablelfs_objects references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
oid varcharNOT NULL
size bigintNOT NULL
created_at timestampnull
updated_at timestampnull
file varcharnull
file_store integernull1CHECK file_store IS NOT NULL

Indexes

  • (file) index_lfs_objects_on_file
  • (file_store) index_lfs_objects_on_file_store
  • UNIQUE (oid) index_lfs_objects_on_oid

Referenced by

  • nothing

Table checks: file_store IS NOT NULL

lfs_objects_projects

7 cols · no RLS · line 23610View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
lfs_object_id bigintnull
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestampnull
updated_at timestampnull
repository_type smallintnull
oid textnullCHECK char_length(oid) <= 255

Indexes

  • (lfs_object_id) index_lfs_objects_projects_on_lfs_object_id
  • (oid) index_lfs_objects_projects_on_oid
  • (project_id, lfs_object_id) index_lfs_objects_projects_on_project_id_and_lfs_object_id
  • UNIQUE (project_id, lfs_object_id) WHERE repository_type IS NULL lfs_objects_projects_on_project_id_lfs_object_id_null_repo_type
  • UNIQUE (project_id, lfs_object_id, repository_type) WHERE repository_type IS NOT NULL lfs_objects_projects_on_project_id_lfs_object_id_with_repo_type

Referenced by

  • nothing

Table checks: char_length(oid) <= 255

member 2 tables

Tables whose names start with member_.

Entity-relationship diagram: member_approvals, member_rolesmember_approvalsid PKbigintreviewed_attimestamptzcreated_attimestamptzupdated_attimestamptzmember_id FKbigintmember_namespace_id FKbigintrequested_by_idbigintreviewed_by_idbigintnew_access_levelintegerold_access_levelintegerstatussmallintuser_idbigintmember_role_id FKbigintmetadatajsonbmember_rolesid PKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzbase_access_levelintegernametextdescriptiontextoccupies_seatbooleanpermissionsjsonborganization_id FKbigintmembersnamespacesorganizationsorganization_idnamespace_idmember_namespace_idmember_role_idmember_id

Relationships

member_approvals

14 cols · no RLS · line 23706View in 3D
  • Nullable foreign key member_role_idmember_approvals.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key member_idmember_approvals.member_id may be NULL, so the relationship to members is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK member_role_id, member_idmember_approvals has several nullable FKs (member_role_id, member_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
reviewed_at timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
member_id bigintnullmembers.id 1:N · CASCADE
member_namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
requested_by_id bigintnull
reviewed_by_id bigintnull
new_access_level integerNOT NULL
old_access_level integernull
status smallintNOT NULL0
user_id bigintNOT NULL
member_role_id bigintnullmember_roles.id 1:N · SET NULL
metadata jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (member_id) index_member_approval_on_member_id
  • (member_namespace_id) index_member_approval_on_member_namespace_id
  • (requested_by_id) index_member_approval_on_requested_by_id
  • (reviewed_by_id) index_member_approval_on_reviewed_by_id
  • (member_namespace_id, status) WHERE status = 0 index_member_approvals_on_member_namespace_id_status
  • (member_role_id) index_member_approvals_on_member_role_id
  • (user_id) index_member_approvals_on_user_id
  • UNIQUE (user_id, member_namespace_id) WHERE status = 0 unique_idx_member_approvals_on_pending_status

Referenced by

  • nothing

member_roles

10 cols · no RLS · line 23732View in 3D
  • Nullable foreign key organization_idmember_roles.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idmember_roles.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
base_access_level integernull
name textNOT NULLCAST('Custom' AS text)CHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 255
occupies_seat booleanNOT NULLFALSE
permissions jsonbNOT NULLCAST('{}' AS jsonb)
organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (base_access_level) idx_member_roles_on_base_access_level
  • UNIQUE (name) WHERE namespace_id IS NULL index_member_roles_on_name_unique
  • (namespace_id) index_member_roles_on_namespace_id
  • UNIQUE (namespace_id, name) WHERE namespace_id IS NOT NULL index_member_roles_on_namespace_id_name_unique
  • (occupies_seat) index_member_roles_on_occupies_seat
  • (organization_id) index_member_roles_on_organization_id
  • (permissions) index_member_roles_on_permissions

Referenced by

Table checks: char_length(description) <= 255; char_length(name) <= 255; num_nonnulls(namespace_id, organization_id) = 1

members 2 tables

Tables whose names start with members_.

Entity-relationship diagram: members, members_deletion_schedulesmembersid PKbigintaccess_levelintegersource_idbigintsource_typevarcharuser_idbigintnotification_levelintegertypevarcharcreated_attimestampupdated_attimestampcreated_by_idbigintinvite_emailvarcharinvite_tokenvarcharinvite_accepted_attimestamprequested_attimestampexpires_atdateldapbooleanoverridebooleanstatesmallintinvite_email_successbooleanmember_namespace_id FKbigintmember_role_id FKbigintexpiry_notified_attimestamptzrequest_accepted_attimestamptzmembers_deletion_schedulesid PKbigintnamespace_id FKbigintuser_id FKbigintscheduled_by_id FKbigintcreated_attimestamptzupdated_attimestamptzip_addressinetmember_rolesnamespacesusersmember_namespace_idmember_role_idscheduled_by_iduser_idnamespace_id

Relationships

members

23 cols · no RLS · line 23757View in 3D
  • Nullable foreign key member_namespace_idmembers.member_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key member_role_idmembers.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK source_typesource_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Enum-like column with no CHECK typetype is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity source_type, source_idsource_id points at different tables depending on source_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • Either/or foreign keys without a CHECK member_namespace_id, member_role_idmembers has several nullable FKs (member_namespace_id, member_role_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone invite_accepted_atinvite_accepted_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone requested_atrequested_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
access_level integerNOT NULL
source_id bigintNOT NULL
source_type varcharNOT NULL
user_id bigintnull
notification_level integerNOT NULL
type varcharnull
created_at timestampnull
updated_at timestampnull
created_by_id bigintnull
invite_email varcharnull
invite_token varcharnull
invite_accepted_at timestampnull
requested_at timestampnull
expires_at datenull
ldap booleanNOT NULLFALSE
override booleanNOT NULLFALSE
state smallintnull0
invite_email_success booleanNOT NULLTRUE
member_namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK member_namespace_id IS NOT NULL
member_role_id bigintnullmember_roles.id 1:N · SET NULL
expiry_notified_at timestamptznull
request_accepted_at timestamptznull

Indexes

  • (created_at) WHERE invite_token IS NOT NULL AND user_id IS NULL idx_members_created_at_user_id_invite_token
  • (user_id, source_id, source_type, member_role_id) idx_members_on_user_and_source_and_source_type_and_member_role
  • (access_level) index_members_on_access_level
  • (expires_at) index_members_on_expires_at
  • (expires_at, access_level, id) WHERE requested_at IS NULL AND expiry_notified_at IS NULL index_members_on_expiring_at_access_level_id
  • (invite_email) index_members_on_invite_email
  • UNIQUE (invite_token) index_members_on_invite_token
  • (lower(CAST(invite_email AS text))) WHERE invite_token IS NOT NULL index_members_on_lower_invite_email_with_token
  • (member_namespace_id, type, requested_at, id) index_members_on_member_namespace_id_compound
  • (member_role_id) index_members_on_member_role_id
  • (requested_at) index_members_on_requested_at
  • (source_id, source_type, access_level, user_id) WHERE member_role_id IS NULL index_members_on_source_access_level_user_id_member_role_null
  • (source_id, source_type, type, access_level) index_members_on_source_and_type_and_access_level
  • (source_id, source_type, type, id) WHERE invite_token IS NULL index_members_on_source_and_type_and_id
  • (source_id, source_type, state, type, access_level, user_id) WHERE requested_at IS NULL AND invite_token IS NULL index_members_on_source_state_type_access_level_and_user_id
  • (user_id, access_level) WHERE requested_at IS NULL index_members_on_user_id_and_access_level_requested_at_is_null
  • (user_id, created_at) WHERE ldap = TRUE AND CAST(type AS text) = CAST('GroupMember' AS text) AND CAST(source_type AS text) = CAST('Namespace' AS text) index_members_on_user_id_created_at
  • (source_id, source_type) WHERE requested_at IS NULL AND CAST(type AS text) = CAST('ProjectMember' AS text) index_non_requested_project_members_on_source_id_and_type
  • (id) WHERE access_level = 5 AND CAST(source_type AS text) = CAST('Namespace' AS text) AND requested_at IS NULL tmp_idx_members_on_access_level_source_type_requested_at_id

Referenced by

Table checks: member_namespace_id IS NOT NULL

members_deletion_schedules

7 cols · no RLS · line 23784View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
scheduled_by_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
ip_address inetnull

Indexes

  • UNIQUE (namespace_id, user_id) idx_members_deletion_schedules_on_namespace_id_and_user_id
  • (scheduled_by_id) index_members_deletion_schedules_on_scheduled_by_id
  • (user_id) index_members_deletion_schedules_on_user_id

Referenced by

  • nothing

ml 10 tables

Tables whose names start with ml_.

Entity-relationship diagram: ml_candidate_metadata, ml_candidate_metrics, ml_candidate_params, ml_candidates, ml_experiment_metadata, ml_experiments, ml_model_metadata, ml_model_version_metadata, ml_model_versions, ml_modelsml_candidate_metadataid PKbigintcreated_attimestamptzupdated_attimestamptzcandidate_id FKbigintnametextvaluetextproject_id FKbigintml_candidate_metricsid PKbigintcreated_attimestamptzupdated_attimestamptzcandidate_id FKbigintvaluedouble precisionstepintegeris_nanbyteanametexttracked_atbigintproject_id FKbigintml_candidate_paramsid PKbigintcreated_attimestamptzupdated_attimestamptzcandidate_id FKbigintnametextvaluetextproject_id FKbigintml_candidatesid PKbigintcreated_attimestamptzupdated_attimestamptzexperiment_id FKbigintuser_id FKbigintstart_timebigintend_timebigintstatussmallintnametextpackage_id FKbiginteiduuidproject_id FKbigintinternal_idbigintci_build_idbigintmodel_version_id FKbigintml_experiment_metadataid PKbigintcreated_attimestamptzupdated_attimestamptzexperiment_id FKbigintnametextvaluetextproject_id FKbigintml_experimentsid PKbigintcreated_attimestamptzupdated_attimestamptziidbigintproject_id FKbigintuser_id FKbigintnametextdeleted_ontimestamptzmodel_id FKbigintml_model_metadataid PKbigintcreated_attimestamptzupdated_attimestamptzmodel_id FKbigintnametextvaluetextproject_id FKbigintml_model_version_metadataid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintmodel_version_id FKbigintnametextvaluetextml_model_versionsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintmodel_id FKbigintpackage_id FKbigintversiontextdescriptiontextsemver_majorintegersemver_minorintegersemver_patchintegersemver_prereleasetextcached_markdown_versionintegerdescription_htmltextml_modelsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintnametextdescriptiontextuser_id FKbigintcached_markdown_versionintegerdescription_htmltextpackages_packagesprojectsusersproject_iduser_idproject_iduser_idmodel_idproject_idmodel_idpackage_idmodel_idproject_idproject_idexperiment_idpackage_idmodel_version_iduser_idproject_idexperiment_idmodel_version_idproject_idproject_idcandidate_idproject_idcandidate_idproject_idcandidate_id

Relationships

ml_candidate_metadata

7 cols · no RLS · line 24485View in 3D
  • Nullable foreign key project_idml_candidate_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
candidate_id bigintNOT NULLml_candidates.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
value textNOT NULLCHECK char_length(value) <= 5000
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (candidate_id, name) index_ml_candidate_metadata_on_candidate_id_and_name
  • (name) index_ml_candidate_metadata_on_name
  • (project_id) index_ml_candidate_metadata_on_project_id

Referenced by

  • nothing

Table checks: char_length(name) <= 255; char_length(value) <= 5000; project_id IS NOT NULL

ml_candidate_metrics

10 cols · no RLS · line 24507View in 3D
  • Nullable foreign key project_idml_candidate_metrics.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key candidate_idml_candidate_metrics.candidate_id may be NULL, so the relationship to ml_candidates is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, candidate_idml_candidate_metrics has several nullable FKs (project_id, candidate_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
candidate_id bigintnullml_candidates.id 1:N · CASCADECHECK candidate_id IS NOT NULL
value double precisionnull
step integernull
is_nan byteanull
name textNOT NULLCHECK char_length(name) <= 250
tracked_at bigintnull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (candidate_id) index_ml_candidate_metrics_on_candidate_id
  • (project_id) index_ml_candidate_metrics_on_project_id

Referenced by

  • nothing

Table checks: char_length(name) <= 250; candidate_id IS NOT NULL; project_id IS NOT NULL

ml_candidate_params

7 cols · no RLS · line 24532View in 3D
  • Nullable foreign key project_idml_candidate_params.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key candidate_idml_candidate_params.candidate_id may be NULL, so the relationship to ml_candidates is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, candidate_idml_candidate_params has several nullable FKs (project_id, candidate_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
candidate_id bigintnullml_candidates.id 1:N · CASCADECHECK candidate_id IS NOT NULL
name textNOT NULLCHECK char_length(name) <= 250
value textNOT NULLCHECK char_length(value) <= 250
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (candidate_id) index_ml_candidate_params_on_candidate_id
  • UNIQUE (candidate_id, name) index_ml_candidate_params_on_candidate_id_on_name
  • (project_id) index_ml_candidate_params_on_project_id

Referenced by

  • nothing

Table checks: char_length(name) <= 250; char_length(value) <= 250; candidate_id IS NOT NULL; project_id IS NOT NULL

ml_candidates

15 cols · no RLS · line 24555View in 3D
  • Nullable foreign key project_idml_candidates.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key package_idml_candidates.package_id may be NULL, so the relationship to packages_packages is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key model_version_idml_candidates.model_version_id may be NULL, so the relationship to ml_model_versions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idml_candidates.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, package_id, model_version_id, user_idml_candidates has several nullable FKs (project_id, package_id, model_version_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
experiment_id bigintNOT NULLml_experiments.id 1:N · CASCADE
user_id bigintnullusers.id 1:N · SET NULL
start_time bigintnull
end_time bigintnull
status smallintNOT NULL0
name textnullCHECK char_length(name) <= 255
package_id bigintnullpackages_packages.id 1:N · SET NULL
eid uuidnullCHECK eid IS NOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
internal_id bigintnull
ci_build_id bigintnull
model_version_id bigintnullml_model_versions.id 1:1 · CASCADE

Indexes

  • (ci_build_id) index_ml_candidates_on_ci_build_id
  • UNIQUE (experiment_id, eid) index_ml_candidates_on_experiment_id_and_eid
  • UNIQUE (model_version_id) index_ml_candidates_on_model_version_id
  • (package_id) index_ml_candidates_on_package_id
  • (project_id) index_ml_candidates_on_project_id
  • (project_id, internal_id) index_ml_candidates_on_project_id_on_internal_id
  • (user_id) index_ml_candidates_on_user_id

Referenced by

Table checks: project_id IS NOT NULL; char_length(name) <= 255; eid IS NOT NULL

ml_experiment_metadata

7 cols · no RLS · line 24585View in 3D
  • Nullable foreign key project_idml_experiment_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
experiment_id bigintNOT NULLml_experiments.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
value textNOT NULLCHECK char_length(value) <= 5000
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (experiment_id, name) index_ml_experiment_metadata_on_experiment_id_and_name
  • (project_id) index_ml_experiment_metadata_on_project_id

Referenced by

  • nothing

Table checks: char_length(name) <= 255; char_length(value) <= 5000; project_id IS NOT NULL

ml_experiments

9 cols · no RLS · line 24607View in 3D
  • Nullable foreign key user_idml_experiments.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key model_idml_experiments.model_id may be NULL, so the relationship to ml_models is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK user_id, model_idml_experiments has several nullable FKs (user_id, model_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
iid bigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
user_id bigintnullusers.id 1:N · SET NULL
name textNOT NULLCHECK char_length(name) <= 255
deleted_on timestamptznull
model_id bigintnullml_models.id 1:N · CASCADE

Indexes

  • (model_id) index_ml_experiments_on_model_id
  • UNIQUE (project_id, iid) index_ml_experiments_on_project_id_and_iid
  • UNIQUE (project_id, name) index_ml_experiments_on_project_id_and_name
  • (user_id) index_ml_experiments_on_user_id

Referenced by

Table checks: char_length(name) <= 255

ml_model_metadata

7 cols · no RLS · line 24629View in 3D
  • Nullable foreign key project_idml_model_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
model_id bigintNOT NULLml_models.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
value textNOT NULLCHECK char_length(value) <= 5000
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_ml_model_metadata_on_project_id
  • UNIQUE (model_id, name) unique_index_ml_model_metadata_name

Referenced by

  • nothing

Table checks: char_length(value) <= 5000; char_length(name) <= 255; project_id IS NOT NULL

ml_model_version_metadata

7 cols · no RLS · line 24651View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
model_version_id bigintNOT NULLml_model_versions.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
value textNOT NULLCHECK char_length(value) <= 5000

Indexes

  • (project_id) index_ml_model_version_metadata_on_project_id
  • UNIQUE (model_version_id, name) unique_index_ml_model_version_metadata_name

Referenced by

  • nothing

Table checks: char_length(name) <= 255; char_length(value) <= 5000

ml_model_versions

14 cols · no RLS · line 24672View in 3D
  • Nullable foreign key package_idml_model_versions.package_id may be NULL, so the relationship to packages_packages is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
model_id bigintNOT NULLml_models.id 1:N · CASCADE
package_id bigintnullpackages_packages.id 1:N · SET NULL
version textNOT NULLCHECK char_length(version) <= 255
description textnullCHECK char_length(description) <= 10000
semver_major integernull
semver_minor integernull
semver_patch integernull
semver_prerelease textnullCHECK char_length(semver_prerelease) <= 255
cached_markdown_version integernull
description_html textnullCHECK char_length(description_html) <= 50000

Indexes

  • (model_id, created_at) index_ml_model_versions_on_created_at_on_model_id
  • (package_id) index_ml_model_versions_on_package_id
  • (project_id) index_ml_model_versions_on_project_id
  • UNIQUE (project_id, model_id, version) index_ml_model_versions_on_project_id_and_model_id_and_version
  • (model_id, id) unique_ml_model_versions_on_model_id_and_id

Referenced by

Table checks: char_length(semver_prerelease) <= 255; char_length(version) <= 255; char_length(description_html) <= 50000; char_length(description) <= 10000

ml_models

9 cols · no RLS · line 24702View in 3D
  • Nullable foreign key user_idml_models.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 10000
user_id bigintnullusers.id 1:N · SET NULL
cached_markdown_version integernull
description_html textnullCHECK char_length(description_html) <= 50000

Indexes

  • (project_id) index_ml_models_on_project_id
  • UNIQUE (project_id, name) index_ml_models_on_project_id_and_name
  • (user_id) index_ml_models_on_user_id

Referenced by

Table checks: char_length(name) <= 255; char_length(description_html) <= 50000; char_length(description) <= 10000

note 3 tables

Tables whose names start with note_.

Entity-relationship diagram: note_diff_files, note_duo_metadata, note_metadatanote_diff_filesid PKbigintdifftextnew_filebooleanrenamed_filebooleandeleted_filebooleana_modevarcharb_modevarcharnew_pathtextold_pathtextdiff_note_id FKbigintnamespace_id FKbigintnote_duo_metadatanote_id PKbigintworkflow_id FKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptznote_metadatanote_id PKbigintemail_participanttextcreated_attimestamptzupdated_attimestamptznamespace_id FKbigintduo_workflows_workflowsnamespacesnotesnamespace_iddiff_note_idworkflow_idnamespace_idnote_idnamespace_idnote_id

Relationships

note_diff_files

11 cols · no RLS · line 25258View in 3D
  • Nullable foreign key namespace_idnote_diff_files.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK a_modea_mode is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Enum-like column with no CHECK b_modeb_mode is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
diff textNOT NULL
new_file booleanNOT NULL
renamed_file booleanNOT NULL
deleted_file booleanNOT NULL
a_mode varcharNOT NULL
b_mode varcharNOT NULL
new_path textNOT NULL
old_path textNOT NULL
diff_note_id bigintNOT NULLnotes.id 1:1 · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • UNIQUE (diff_note_id) index_note_diff_files_on_diff_note_id
  • (namespace_id) index_note_diff_files_on_namespace_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

note_duo_metadata

5 cols · no RLS · line 25282View in 3D
ColumnTypeNullDefaultReferencesNotes
note_id PKbigintNOT NULLnotes.id 1:1 · CASCADE
workflow_id bigintNOT NULLduo_workflows_workflows.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptznull
updated_at timestamptznull

Indexes

  • UNIQUE (note_id, workflow_id) idx_note_duo_metadata_note_and_workflow
  • (namespace_id) index_note_duo_metadata_on_namespace_id
  • (workflow_id) index_note_duo_metadata_on_workflow_id

Referenced by

  • nothing

note_metadata

5 cols · no RLS · line 25299View in 3D
  • Nullable foreign key namespace_idnote_metadata.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
note_id PKbigintNOT NULLnotes.id 1:1 · CASCADE
email_participant textnullCHECK char_length(email_participant) <= 255
created_at timestamptznull
updated_at timestamptznull
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (namespace_id) index_note_metadata_on_namespace_id
  • (note_id) index_note_metadata_on_note_id

Referenced by

  • nothing

Table checks: char_length(email_participant) <= 255; namespace_id IS NOT NULL

oauth 6 tables

Tables whose names start with oauth_.

Entity-relationship diagram: oauth_access_grants, oauth_access_tokens, oauth_applications, oauth_consents, oauth_device_grants, oauth_openid_requestsoauth_access_grantsid PKbigintresource_owner_idbigintapplication_idbiginttokenvarcharexpires_inintegerredirect_uritextcreated_attimestamprevoked_attimestampscopesvarcharcode_challengetextcode_challenge_methodtextorganization_id FKbigintoauth_access_tokensid PKbigintresource_owner_idbigintapplication_idbiginttokenvarcharrefresh_tokenvarcharexpires_inintegerrevoked_attimestampcreated_attimestampscopesvarcharorganization_id FKbigintoauth_applicationsid PKbigintnamevarcharuidvarcharsecretvarcharredirect_uritextscopestextcreated_attimestampupdated_attimestampowner_idbigintowner_typevarchartrustedbooleanconfidentialbooleanexpire_access_tokensbooleanropc_enabledbooleandynamicbooleanorganization_id FKbigintdevice_code_enabledbooleanoauth_consentsid PKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptzstatussmallintclient_id FKtextconsent_challengetextrequested_scopestext[]granted_scopestext[]oauth_device_grantsid PKbigintresource_owner_idbigintapplication_id FKbigintcreated_attimestamptzlast_polling_attimestamptzexpires_inintegerscopestextdevice_codetextuser_codetextorganization_id FKbigintoauth_openid_requestsid PKbigintaccess_grant_id FKbigintnoncevarcharorganization_id FKbigintorganizationsusersorganization_idorganization_idorganization_iduser_idclient_idapplication_idorganization_idorganization_idaccess_grant_id

Relationships

oauth_access_grants

12 cols · no RLS · line 25406View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone revoked_atrevoked_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
resource_owner_id bigintNOT NULL
application_id bigintNOT NULL
token varcharNOT NULL
expires_in integerNOT NULL
redirect_uri textNOT NULL
created_at timestampNOT NULL
revoked_at timestampnull
scopes varcharnull
code_challenge textnullCHECK char_length(code_challenge) <= 128
code_challenge_method textnullCHECK char_length(code_challenge_method) <= 5
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE

Indexes

  • (organization_id) idx_oauth_access_grants_on_organization_id
  • (application_id) index_oauth_access_grants_on_application_id
  • (id) WHERE revoked_at IS NOT NULL index_oauth_access_grants_on_id_where_revoked
  • (resource_owner_id, application_id, created_at) index_oauth_access_grants_on_resource_owner_id
  • UNIQUE (token) index_oauth_access_grants_on_token

Referenced by

Table checks: char_length(code_challenge) <= 128; char_length(code_challenge_method) <= 5

oauth_access_tokens

10 cols · no RLS · line 25432View in 3D
  • TIMESTAMP without time zone revoked_atrevoked_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
resource_owner_id bigintnull
application_id bigintnull
token varcharNOT NULL
refresh_token varcharnull
expires_in integernull7200CHECK expires_in IS NOT NULL
revoked_at timestampnull
created_at timestampNOT NULL
scopes varcharnull
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE

Indexes

  • (organization_id) idx_oauth_access_tokens_on_organization_id
  • (application_id) index_oauth_access_tokens_on_application_id
  • (id) WHERE revoked_at IS NOT NULL index_oauth_access_tokens_on_id_where_revoked
  • UNIQUE (refresh_token) index_oauth_access_tokens_on_refresh_token
  • UNIQUE (token) index_oauth_access_tokens_on_token
  • (resource_owner_id, application_id, created_at) WHERE revoked_at IS NULL partial_index_user_id_app_id_created_at_token_not_revoked

Referenced by

  • nothing

Table checks: expires_in IS NOT NULL

oauth_applications

17 cols · no RLS · line 25455View in 3D
  • Nullable foreign key organization_idoauth_applications.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK owner_typeowner_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity owner_type, owner_idowner_id points at different tables depending on owner_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name varcharNOT NULL
uid varcharNOT NULL
secret varcharNOT NULL
redirect_uri textNOT NULL
scopes textNOT NULLCAST('' AS text)CHECK char_length(scopes) <= 2048
created_at timestampnull
updated_at timestampnull
owner_id bigintnull
owner_type varcharnull
trusted booleanNOT NULLFALSE
confidential booleanNOT NULLTRUE
expire_access_tokens booleanNOT NULLFALSE
ropc_enabled booleanNOT NULLTRUE
dynamic booleanNOT NULLFALSE
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL
device_code_enabled booleanNOT NULLTRUE

Indexes

  • (dynamic, id) idx_oauth_applications_dynamic_and_id
  • (organization_id) idx_oauth_applications_organization_id
  • (owner_id, owner_type) index_oauth_applications_on_owner_id_and_owner_type
  • (secret) index_oauth_applications_on_secret
  • UNIQUE (uid) index_oauth_applications_on_uid

Referenced by

Table checks: char_length(scopes) <= 2048; organization_id IS NOT NULL

oauth_consents

9 cols · no RLS · line 25486View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL
client_id textNOT NULLoauth_applications.uid 1:N · CASCADE
consent_challenge textNOT NULLCHECK char_length(consent_challenge) <= 100
requested_scopes text[]nullCHECK cardinality(requested_scopes) <= 50
granted_scopes text[]nullCHECK cardinality(granted_scopes) <= 50

Indexes

  • (client_id) index_oauth_consents_on_client_id
  • UNIQUE (consent_challenge) index_oauth_consents_on_consent_challenge
  • (user_id, status) index_oauth_consents_on_user_id_and_status

Referenced by

  • nothing

Table checks: char_length(consent_challenge) <= 100; cardinality(granted_scopes) <= 50; cardinality(requested_scopes) <= 50

oauth_device_grants

10 cols · no RLS · line 25510View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
resource_owner_id bigintnull
application_id bigintNOT NULLoauth_applications.id 1:N · CASCADE
created_at timestamptzNOT NULL
last_polling_at timestamptznull
expires_in integerNOT NULL
scopes textNOT NULLCAST('' AS text)CHECK char_length(scopes) <= 255
device_code textNOT NULLCHECK char_length(device_code) <= 255
user_code textnullCHECK char_length(user_code) <= 255
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE

Indexes

  • (organization_id) idx_oauth_device_grants_on_organization_id
  • (application_id) index_oauth_device_grants_on_application_id
  • UNIQUE (device_code) index_oauth_device_grants_on_device_code
  • UNIQUE (user_code) index_oauth_device_grants_on_user_code

Referenced by

  • nothing

Table checks: char_length(device_code) <= 255; char_length(scopes) <= 255; char_length(user_code) <= 255

oauth_openid_requests

4 cols · no RLS · line 25535View in 3D
  • Junction table allows duplicate links access_grant_id, organization_idoauth_openid_requests looks like a many-to-many link table but has no unique constraint across (access_grant_id, organization_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
access_grant_id bigintNOT NULLoauth_access_grants.id 1:N · CASCADE
nonce varcharNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE

Indexes

  • (organization_id) idx_oauth_openid_requests_on_organization_id
  • (access_grant_id) index_oauth_openid_requests_on_access_grant_id

Referenced by

  • nothing

observability 4 tables

Tables whose names start with observability_.

Entity-relationship diagram: observability_group_o11y_settings, observability_logs_issues_connections, observability_metrics_issues_connections, observability_traces_issues_connectionsobservability_group_o11y_settingsid PKbigintgroup_id FKbiginto11y_service_urltexto11y_service_user_emailtexto11y_service_passwordjsonbo11y_service_post_message_encryption_keyjsonbcreated_attimestamptzupdated_attimestamptzo11y_otel_urltexto11y_mcp_urltextobservability_logs_issues_connectionsid PKbigintissue_id FKbigintproject_id FKbigintlog_timestamptimestamptzcreated_attimestamptzupdated_attimestamptzseverity_numbersmallintservice_nametexttrace_identifiertextlog_fingerprinttextobservability_metrics_issues_connectionsid PKbigintissue_id FKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzmetric_typesmallintmetric_nametextproject_id FKbigintobservability_traces_issues_connectionsid PKbigintissue_id FKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptztrace_identifiertextissuesnamespacesprojectsgroup_idproject_idissue_idproject_idnamespace_idissue_idproject_idissue_id

Relationships

observability_group_o11y_settings

10 cols · no RLS · line 25551View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
o11y_service_url textNOT NULLCHECK char_length(o11y_service_url) <= 255
o11y_service_user_email textNOT NULLCHECK char_length(o11y_service_user_email) <= 255
o11y_service_password jsonbNOT NULL
o11y_service_post_message_encryption_key jsonbNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
o11y_otel_url textnullCHECK char_length(o11y_otel_url) <= 255
o11y_mcp_url textnullCHECK char_length(o11y_mcp_url) <= 255

Indexes

  • (group_id) index_observability_group_o11y_settings_on_group_id

Referenced by

  • nothing

Table checks: char_length(o11y_service_user_email) <= 255; char_length(o11y_mcp_url) <= 255; char_length(o11y_otel_url) <= 255; char_length(o11y_service_url) <= 255

observability_logs_issues_connections

10 cols · no RLS · line 25577View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
issue_id bigintNOT NULLissues.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
log_timestamp timestamptzNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
severity_number smallintNOT NULL
service_name textNOT NULLCHECK char_length(service_name) <= 500
trace_identifier textNOT NULLCHECK char_length(trace_identifier) <= 128
log_fingerprint textNOT NULLCHECK char_length(log_fingerprint) <= 128

Indexes

  • UNIQUE (issue_id, service_name, severity_number, log_timestamp, log_fingerprint, trace_identifier) idx_o11y_log_issue_conn_on_issue_id_logs_search_metadata
  • (project_id) index_observability_logs_issues_connections_on_project_id

Referenced by

  • nothing

Table checks: char_length(trace_identifier) <= 128; char_length(log_fingerprint) <= 128; char_length(service_name) <= 500

observability_metrics_issues_connections

8 cols · no RLS · line 25602View in 3D
  • Nullable foreign key project_idobservability_metrics_issues_connections.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
issue_id bigintNOT NULLissues.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
metric_type smallintNOT NULL
metric_name textNOT NULLCHECK char_length(metric_name) <= 500
project_id bigintnullprojects.id 1:N · CASCADE

Indexes

  • UNIQUE (issue_id, metric_type, metric_name) idx_o11y_metric_issue_conn_on_issue_id_metric_type_name
  • (namespace_id) index_observability_metrics_issues_connections_on_namespace_id
  • (project_id) index_observability_metrics_issues_connections_on_project_id

Referenced by

  • nothing

Table checks: char_length(metric_name) <= 500

observability_traces_issues_connections

6 cols · no RLS · line 25623View in 3D
  • Junction table allows duplicate links issue_id, project_idobservability_traces_issues_connections looks like a many-to-many link table but has no unique constraint across (issue_id, project_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
issue_id bigintNOT NULLissues.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
trace_identifier textNOT NULLCHECK char_length(trace_identifier) <= 128

Indexes

  • UNIQUE (issue_id, trace_identifier) idx_o11y_trace_issue_conn_on_issue_id_trace_identifier
  • (project_id) index_observability_traces_issues_connections_on_project_id

Referenced by

  • nothing

Table checks: char_length(trace_identifier) <= 128

operations 7 tables

Tables whose names start with operations_.

Entity-relationship diagram: operations_feature_flags, operations_feature_flags_clients, operations_feature_flags_issues, operations_scopes, operations_strategies, operations_strategies_user_lists, operations_user_listsoperations_feature_flagsid PKbigintproject_id FKbigintactivebooleancreated_attimestamptzupdated_attimestamptznamevarchardescriptiontextiidintegerversionsmallintoperations_feature_flags_clientsid PKbigintproject_id FKbiginttoken_encryptedvarcharlast_feature_flag_updated_attimestamptzoperations_feature_flags_issuesid PKbigintfeature_flag_id FKbigintissue_id FKbigintproject_id FKbigintoperations_scopesid PKbigintstrategy_id FKbigintenvironment_scopevarchar(255)project_id FKbigintoperations_strategiesid PKbigintfeature_flag_id FKbigintnamevarchar(255)parametersjsonbproject_id FKbigintoperations_strategies_user_listsid PKbigintstrategy_id FKbigintuser_list_id FKbigintproject_id FKbigintoperations_user_listsid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptziidintegernamevarchar(255)user_xidstextissuesprojectsproject_idproject_idproject_idproject_idfeature_flag_idissue_idproject_idfeature_flag_idproject_idstrategy_idproject_idstrategy_iduser_list_id

Relationships

operations_feature_flags

9 cols · no RLS · line 25671View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
active booleanNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name varcharNOT NULL
description textnull
iid integerNOT NULL
version smallintNOT NULL1

Indexes

  • UNIQUE (project_id, iid) index_operations_feature_flags_on_project_id_and_iid
  • UNIQUE (project_id, name) index_operations_feature_flags_on_project_id_and_name

Referenced by

operations_feature_flags_clients

4 cols · no RLS · line 25683View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
token_encrypted varcharnull
last_feature_flag_updated_at timestamptznull

Indexes

  • UNIQUE (project_id, token_encrypted) index_feature_flags_clients_on_project_id_and_token_encrypted

Referenced by

  • nothing

operations_feature_flags_issues

4 cols · no RLS · line 25708View in 3D
  • Nullable foreign key project_idoperations_feature_flags_issues.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
feature_flag_id bigintNOT NULLoperations_feature_flags.id 1:N · CASCADE
issue_id bigintNOT NULLissues.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (issue_id) index_operations_feature_flags_issues_on_issue_id
  • (project_id) index_operations_feature_flags_issues_on_project_id
  • UNIQUE (feature_flag_id, issue_id) index_ops_feature_flags_issues_on_feature_flag_id_and_issue_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

operations_scopes

4 cols · no RLS · line 25725View in 3D
  • Nullable foreign key project_idoperations_scopes.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
strategy_id bigintNOT NULLoperations_strategies.id 1:N · CASCADE
environment_scope varchar(255)NOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_operations_scopes_on_project_id
  • UNIQUE (strategy_id, environment_scope) index_operations_scopes_on_strategy_id_and_environment_scope

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

operations_strategies

5 cols · no RLS · line 25742View in 3D
  • Nullable foreign key project_idoperations_strategies.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
feature_flag_id bigintNOT NULLoperations_feature_flags.id 1:N · CASCADE
name varchar(255)NOT NULL
parameters jsonbNOT NULLCAST('{}' AS jsonb)
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (feature_flag_id) index_operations_strategies_on_feature_flag_id
  • (project_id) index_operations_strategies_on_project_id

Referenced by

Table checks: project_id IS NOT NULL

operations_strategies_user_lists

4 cols · no RLS · line 25760View in 3D
  • Nullable foreign key project_idoperations_strategies_user_lists.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
strategy_id bigintNOT NULLoperations_strategies.id 1:N · CASCADE
user_list_id bigintNOT NULLoperations_user_lists.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_operations_strategies_user_lists_on_project_id
  • (user_list_id) index_operations_strategies_user_lists_on_user_list_id
  • UNIQUE (strategy_id, user_list_id) index_ops_strategies_user_lists_on_strategy_id_and_user_list_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

operations_user_lists

7 cols · no RLS · line 25777View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
iid integerNOT NULL
name varchar(255)NOT NULL
user_xids textNOT NULLCAST('' AS text)

Indexes

  • UNIQUE (project_id, iid) index_operations_user_lists_on_project_id_and_iid
  • UNIQUE (project_id, name) index_operations_user_lists_on_project_id_and_name

Referenced by

organization 10 tables

Tables whose names start with organization_.

Entity-relationship diagram: organization_cluster_agent_mappings, organization_detail_upload_states, organization_detail_uploads, organization_details, organization_foundational_agent_statuses, organization_isolations, organization_push_rules, organization_settings, organization_user_details, organization_usersorganization_cluster_agent_mappingsid PKbigintorganization_id FKbigintcluster_agent_id FKbigintcreator_id FKbigintcreated_attimestamptzupdated_attimestamptzorganization_detail_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzorganization_detail_upload_id FKbigintorganization_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextorganization_detail_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextorganization_detailsorganization_id PKbigintcreated_attimestamptzupdated_attimestamptzcached_markdown_versionintegerdescriptiontextdescription_htmltextavatartextstate_metadatajsonbsoft_deleted_attimestamptzorganization_foundational_agent_statusesid PKbigintorganization_id FKbigintreferencetextenabledbooleancreated_attimestamptzupdated_attimestamptzorganization_isolationsid PKbigintorganization_id FKbigintcreated_attimestamptzupdated_attimestamptzisolatedbooleanorganization_push_rulesid PKbigintcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintmax_file_sizeintegermember_checkbooleanprevent_secretsbooleancommit_committer_name_checkbooleandeny_delete_tagbooleanreject_unsigned_commitsbooleancommit_committer_checkbooleanreject_non_dco_commitsbooleancommit_message_regextextbranch_name_regextextcommit_message_negative_regextextauthor_email_regextextfile_name_regextextorganization_settingsorganization_id PKbigintcreated_attimestamptzupdated_attimestamptzsettingsjsonborganization_user_detailsid PKbigintorganization_id FKbigintuser_id FKbigintusernametextdisplay_nametextcreated_attimestamptzupdated_attimestamptzorganization_usersid PKbigintorganization_id FKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptzaccess_levelsmallintcluster_agentsorganizationsuserscluster_agent_idorganization_idcreator_idorganization_detail_upload_idorganization_idorganization_idorganization_idorganization_idorganization_idorganization_iduser_idorganization_idorganization_iduser_id

Relationships

organization_cluster_agent_mappings

6 cols · no RLS · line 25796View in 3D
  • Nullable foreign key creator_idorganization_cluster_agent_mappings.creator_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
cluster_agent_id bigintNOT NULLcluster_agents.id 1:1 · CASCADE
creator_id bigintnullusers.id 1:N · SET NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (creator_id) i_organization_cluster_agent_mappings_on_creator_id
  • (organization_id) i_organization_cluster_agent_mappings_on_organization_id
  • UNIQUE (cluster_agent_id) i_organization_cluster_agent_mappings_unique_cluster_agent_id

Referenced by

  • nothing

organization_detail_upload_states

10 cols · no RLS · line 25814View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
organization_detail_upload_id bigintNOT NULLorganization_detail_uploads.id 1:1 · CASCADE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_od_upl_states_failed_verification
  • (organization_detail_upload_id) WHERE verification_state = 0 OR verification_state = 3 idx_od_upl_states_needs_verification_id
  • UNIQUE (organization_detail_upload_id) idx_od_upl_states_on_od_upl_id
  • (organization_detail_upload_id, verification_started_at) WHERE verification_state = 1 idx_od_upl_states_on_verification_started
  • (verification_state) idx_od_upl_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_od_upl_states_pending_verification
  • (organization_id) index_organization_detail_upload_states_on_organization_id

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

organization_detail_uploads

16 cols · no RLS · line 25837View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnullCHECK organization_id IS NOT NULL
namespace_id bigintnull
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • UNIQUE (id) idx_organization_detail_uploads_on_id
  • (checksum) organization_detail_uploads_checksum_idx
  • (model_id, model_type, uploader, created_at) organization_detail_uploads_model_id_model_type_uploader_cr_idx
  • (namespace_id) organization_detail_uploads_namespace_id_idx
  • (organization_id) organization_detail_uploads_organization_id_idx
  • (project_id) organization_detail_uploads_project_id_idx
  • (store) organization_detail_uploads_store_idx
  • (uploaded_by_user_id) organization_detail_uploads_uploaded_by_user_id_idx
  • (uploader, path) organization_detail_uploads_uploader_path_idx

Referenced by

Table checks: char_length(path) <= 511; organization_id IS NOT NULL; char_length(checksum) <= 64

organization_details

9 cols · no RLS · line 25859View in 3D
ColumnTypeNullDefaultReferencesNotes
organization_id PKbigintNOT NULLorganizations.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
cached_markdown_version integernull
description textnullCHECK char_length(description) <= 1024
description_html textnull
avatar textnullCHECK char_length(avatar) <= 255
state_metadata jsonbNOT NULLCAST('{}' AS jsonb)
soft_deleted_at timestamptznull

Indexes

  • none

Referenced by

  • nothing

Table checks: char_length(description) <= 1024; char_length(avatar) <= 255

organization_foundational_agent_statuses

6 cols · no RLS · line 25873View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
reference textNOT NULLCHECK char_length(reference) <= 255
enabled booleanNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (organization_id, reference) index_ofas_organization_id_on_reference

Referenced by

  • nothing

Table checks: char_length(reference) <= 255

organization_isolations

5 cols · no RLS · line 25892View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
isolated booleanNOT NULLFALSE

Indexes

  • UNIQUE (organization_id) index_organization_isolations_on_organization_id

Referenced by

  • nothing

organization_push_rules

17 cols · no RLS · line 25909View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintNOT NULLorganizations.id 1:1 · CASCADE
max_file_size integerNOT NULL0
member_check booleanNOT NULLFALSE
prevent_secrets booleanNOT NULLFALSE
commit_committer_name_check booleanNOT NULLFALSE
deny_delete_tag booleannull
reject_unsigned_commits booleannull
commit_committer_check booleannull
reject_non_dco_commits booleannull
commit_message_regex textnullCHECK char_length(commit_message_regex) <= 511
branch_name_regex textnullCHECK char_length(branch_name_regex) <= 511
commit_message_negative_regex textnullCHECK char_length(commit_message_negative_regex) <= 2047
author_email_regex textnullCHECK char_length(author_email_regex) <= 511
file_name_regex textnullCHECK char_length(file_name_regex) <= 511

Indexes

  • UNIQUE (organization_id) index_organization_push_rules_on_organization_id

Referenced by

  • nothing

Table checks: char_length(author_email_regex) <= 511; char_length(branch_name_regex) <= 511; char_length(commit_message_negative_regex) <= 2047; char_length(commit_message_regex) <= 511; char_length(file_name_regex) <= 511

organization_settings

4 cols · no RLS · line 25943View in 3D
ColumnTypeNullDefaultReferencesNotes
organization_id PKbigintNOT NULLorganizations.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
settings jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • none

Referenced by

  • nothing

organization_user_details

7 cols · no RLS · line 25950View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
username textNOT NULLCHECK char_length(username) <= 510
display_name textNOT NULLCHECK char_length(display_name) <= 510
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (lower(username)) index_organization_user_details_on_lower_username
  • (user_id) index_organization_user_details_on_user_id
  • UNIQUE (organization_id, user_id) unique_organization_user_details_organization_id_user_id
  • UNIQUE (organization_id, username) unique_organization_user_details_organization_id_username

Referenced by

  • nothing

Table checks: char_length(display_name) <= 510; char_length(username) <= 510

organization_users

6 cols · no RLS · line 25971View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · RESTRICT
user_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
access_level smallintNOT NULL10

Indexes

  • (organization_id, access_level, user_id) index_organization_users_on_org_id_access_level_user_id
  • (organization_id, id) index_organization_users_on_organization_id_and_id
  • UNIQUE (organization_id, user_id) index_organization_users_on_organization_id_and_user_id
  • (user_id) index_organization_users_on_user_id

Referenced by

  • nothing

packages 49 tables

Tables whose names start with packages_.

Entity-relationship diagram: packages_build_infos, packages_cargo_metadata, packages_cleanup_policies, packages_composer_metadata, packages_packages, packages_composer_packages, packages_conan_file_metadata, packages_conan_jwt_signing_keys, packages_conan_metadata, packages_conan_package_references, packages_conan_package_revisions, packages_conan_recipe_revisions, packages_debian_file_metadata, packages_debian_group_architectures, packages_debian_group_component_files, packages_debian_group_components, packages_debian_group_distribution_keys, packages_debian_group_distributions, packages_debian_project_architectures, packages_debian_project_component_file_states, packages_debian_project_component_files, packages_debian_project_components, packages_debian_project_distribution_keys, packages_debian_project_distributions, packages_debian_publications, packages_dependencies, packages_dependency_links, packages_helm_file_metadata, packages_helm_metadata_cache_states, packages_helm_metadata_caches, packages_maven_metadata, packages_npm_metadata, packages_npm_metadata_caches, packages_nuget_dependency_link_metadata, packages_nuget_metadata, packages_nuget_symbol_states, packages_nuget_symbols, packages_package_file_build_infos, packages_package_file_states, packages_package_files, packages_protection_rules, packages_pypi_file_metadata, packages_pypi_metadata, packages_rpm_metadata, packages_rpm_repository_files, packages_rubygems_metadata, packages_rubygems_spec_files, packages_tags, packages_terraform_module_metadatapackages_build_infosid PKbigintpackage_id FKbigintpipeline_idbigintproject_id FKbigintpackages_cargo_metadatapackage_id PKbigintindex_contentjsonbproject_id FKbigintnormalized_nametextnormalized_versiontextcreated_attimestamptzupdated_attimestamptzpackages_cleanup_policiescreated_attimestamptzupdated_attimestamptzproject_id PKbigintnext_run_attimestamptzkeep_n_duplicated_package_filestextpackages_composer_metadatapackage_id PKbiginttarget_shabyteacomposer_jsonjsonbversion_cache_shabyteaproject_id FKbigintpackages_packagesid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptznamevarcharversionvarcharpackage_typesmallintcreator_id FKbigintstatussmallintlast_downloaded_attimestamptzstatus_messagetextpackages_composer_packagesid PKbigintproject_id FKbigintcreator_id FKbigintcreated_attimestamptzupdated_attimestamptzlast_downloaded_attimestamptzstatussmallintnametextversiontexttarget_shabyteaversion_cache_shabyteastatus_messagetextcomposer_jsonjsonbpackages_conan_file_metadataid PKbigintpackage_file_id FKbigintcreated_attimestamptzupdated_attimestamptzconan_file_typesmallintrecipe_revision_id FKbigintpackage_revision_id FKbigintpackage_reference_id FKbigintproject_id FKbigintpackages_conan_jwt_signing_keysid PKbigintcreated_attimestamptzupdated_attimestamptzsecret_keyjsonbpackages_conan_metadataid PKbigintpackage_id FKbigintcreated_attimestamptzupdated_attimestamptzpackage_usernamevarchar(255)package_channelvarchar(255)project_id FKbigintpackages_conan_package_referencesid PKbigintpackage_id FKbigintproject_id FKbigintrecipe_revision_id FKbigintcreated_attimestamptzupdated_attimestamptzreferencebyteainfojsonbpackages_conan_package_revisionsid PKbigintpackage_id FKbigintproject_id FKbigintpackage_reference_id FKbigintcreated_attimestamptzupdated_attimestamptzrevisionbyteastatussmallintpackages_conan_recipe_revisionsid PKbigintpackage_id FKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzrevisionbyteastatussmallintpackages_debian_file_metadatacreated_attimestamptzupdated_attimestamptzpackage_file_id PKbigintfile_typesmallintcomponenttextarchitecturetextfieldsjsonbproject_id FKbigintpackages_debian_group_architecturesid PKbigintcreated_attimestamptzupdated_attimestamptzdistribution_id FKbigintnametextgroup_id FKbigintpackages_debian_group_component_filesid PKbigintcreated_attimestamptzupdated_attimestamptzcomponent_id FKbigintarchitecture_id FKbigintsizeintegerfile_typesmallintcompression_typesmallintfile_storesmallintfiletextfile_sha256byteagroup_id FKbigintpackages_debian_group_componentsid PKbigintcreated_attimestamptzupdated_attimestamptzdistribution_id FKbigintnametextgroup_id FKbigintpackages_debian_group_distribution_keysid PKbigintcreated_attimestamptzupdated_attimestamptzdistribution_id FKbigintencrypted_private_keytextencrypted_private_key_ivtextencrypted_passphrasetextencrypted_passphrase_ivtextpublic_keytextfingerprinttextgroup_id FKbigintpackages_debian_group_distributionsid PKbigintcreated_attimestamptzupdated_attimestamptzgroup_id FKbigintcreator_id FKbigintvalid_time_duration_secondsintegerfile_storesmallintautomaticbooleanautomatic_upgradesbooleancodenametextsuitetextorigintextlabeltextversiontextdescriptiontextfiletextfile_signaturetextsigned_filetextsigned_file_storesmallintpackages_debian_project_architecturesid PKbigintcreated_attimestamptzupdated_attimestamptzdistribution_id FKbigintnametextproject_id FKbigintpackages_debian_project_component_file_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzpackages_debian_project_component_file_idbigintproject_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextpackages_debian_project_component_filesid PKbigintcreated_attimestamptzupdated_attimestamptzcomponent_id FKbigintarchitecture_id FKbigintsizeintegerfile_typesmallintcompression_typesmallintfile_storesmallintfiletextfile_sha256byteaproject_id FKbigintpackages_debian_project_componentsid PKbigintcreated_attimestamptzupdated_attimestamptzdistribution_id FKbigintnametextproject_id FKbigintpackages_debian_project_distribution_keysid PKbigintcreated_attimestamptzupdated_attimestamptzdistribution_id FKbigintencrypted_private_keytextencrypted_private_key_ivtextencrypted_passphrasetextencrypted_passphrase_ivtextpublic_keytextfingerprinttextproject_id FKbigintpackages_debian_project_distributionsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintcreator_id FKbigintvalid_time_duration_secondsintegerfile_storesmallintautomaticbooleanautomatic_upgradesbooleancodenametextsuitetextorigintextlabeltextversiontextdescriptiontextfiletextfile_signaturetextsigned_filetextsigned_file_storesmallintpackages_debian_publicationsid PKbigintpackage_id FKbigintdistribution_id FKbigintproject_id FKbigintpackages_dependenciesid PKbigintnamevarchar(255)version_patternvarchar(255)project_id FKbigintpackages_dependency_linksid PKbigintpackage_id FKbigintdependency_id FKbigintdependency_typesmallintproject_id FKbigintpackages_helm_file_metadatacreated_attimestamptzupdated_attimestamptzpackage_file_id PKbigintchanneltextmetadatajsonbproject_id FKbigintpackages_helm_metadata_cache_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzpackages_helm_metadata_cache_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextproject_id FKbigintpackages_helm_metadata_cachesid PKbigintcreated_attimestamptzupdated_attimestamptzlast_downloaded_attimestamptzproject_idbigintsizeintegerstatussmallintfile_storeintegerchanneltextfiletextobject_storage_keytextpackages_maven_metadataid PKbigintpackage_id FKbigintcreated_attimestamptzupdated_attimestamptzapp_groupvarcharapp_namevarcharapp_versionvarcharpathvarchar(512)project_id FKbigintpackages_npm_metadatapackage_id PKbigintpackage_jsonjsonbproject_id FKbigintpackages_npm_metadata_cachesid PKbigintcreated_attimestamptzupdated_attimestamptzlast_downloaded_attimestamptzproject_idbigintfile_storeintegersizeintegerfiletextpackage_nametextobject_storage_keytextstatussmallintpackages_nuget_dependency_link_metadatadependency_link_id PKbiginttarget_frameworktextproject_id FKbigintpackages_nuget_metadatapackage_id PKbigintlicense_urltextproject_urltexticon_urltextauthorstextdescriptiontextnormalized_versiontextproject_id FKbigintpackages_nuget_symbol_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzpackages_nuget_symbol_idbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextproject_idbigintpackages_nuget_symbolsid PKbigintcreated_attimestamptzupdated_attimestamptzpackage_id FKbigintsizeintegerfile_storesmallintfiletextfile_pathtextsignaturetextobject_storage_keytextfile_sha256byteastatussmallintproject_idbigintpackages_package_file_build_infosid PKbigintpackage_file_id FKbigintpipeline_idbigintproject_id FKbigintpackages_package_file_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzpackage_file_idbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextproject_idbigintpackages_package_filesid PKbigintpackage_id FKbigintcreated_attimestamptzupdated_attimestamptzsizebigintfile_storeintegerfile_md5byteafile_sha1byteafile_namevarcharfiletextfile_sha256byteaverification_retry_attimestamptzverified_attimestamptzverification_failurevarchar(255)verification_retry_countintegerverification_checksumbyteaverification_statesmallintverification_started_attimestamptzstatussmallintfile_final_pathtextproject_idbigintpackages_protection_rulesid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzpackage_typesmallintpackage_name_patterntextminimum_access_level_for_pushsmallintminimum_access_level_for_deletesmallintpatterntextpattern_typesmallinttarget_fieldsmallintpackages_pypi_file_metadatacreated_attimestamptzupdated_attimestamptzpackage_file_id PKbigintproject_id FKbigintrequired_pythontextpackages_pypi_metadatapackage_id PKbigintrequired_pythontextmetadata_versiontextsummarytextkeywordstextauthor_emailtextdescriptiontextdescription_content_typetextproject_id FKbigintpackages_rpm_metadatapackage_id PKbigintreleasetextsummarytextdescriptiontextarchtextlicensetexturltextepochintegerproject_id FKbigintpackages_rpm_repository_filesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintfile_storeintegerstatussmallintsizeintegerfile_md5byteafile_sha1byteafile_sha256byteafiletextfile_nametextpackages_rubygems_metadatacreated_attimestamptzupdated_attimestamptzpackage_id PKbigintauthorstextfilestextsummarytextdescriptiontextemailtexthomepagetextlicensestextmetadatatextauthortextbindirtextcert_chaintextexecutablestextextensionstextextra_rdoc_filestextplatformtextpost_install_messagetextrdoc_optionstextrequire_pathstextrequired_ruby_versiontextrequired_rubygems_versiontextrequirementstextrubygems_versiontextsigning_keytextproject_id FKbigintpackages_rubygems_spec_filesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintsizeintegerfile_storeintegerstatussmallintfile_nametextfiletextobject_storage_keytextpackages_tagsid PKbigintpackage_id FKbigintnamevarchar(255)created_attimestamptzupdated_attimestamptzproject_id FKbigintpackages_terraform_module_metadatacreated_attimestamptzupdated_attimestamptzpackage_id PKbigintproject_id FKbigintfieldsjsonbsemver_majorintegersemver_minorintegersemver_prereleasetextsemver_patchbigintnamespacesprojectsusersproject_idcreator_idproject_idgroup_idcreator_idproject_idcreator_idproject_idproject_idproject_idpackages_helm_metadata_cache_idcreator_idproject_idproject_idproject_idproject_idpackage_idproject_idpackage_idproject_idpackage_idproject_idpackage_idproject_idpackage_idgroup_iddistribution_idgroup_iddistribution_idgroup_iddistribution_idproject_iddistribution_idproject_iddistribution_idproject_iddistribution_idproject_iddistribution_idpackage_idproject_iddependency_idpackage_idproject_idpackage_idproject_idpackage_idproject_idpackage_idpackage_idpackage_idproject_idpackage_idproject_idpackage_idproject_idpackage_idproject_idpackage_idpackage_idproject_idpackage_idrecipe_revision_idproject_idproject_idpackage_file_idgroup_idarchitecture_idcomponent_idproject_idarchitecture_idcomponent_idproject_idpackage_file_idproject_iddependency_link_idproject_idpackage_file_idpackage_file_idproject_idproject_idpackage_reference_idpackage_idproject_idpackage_revision_idpackage_reference_idrecipe_revision_idpackage_file_id

Relationships

packages_build_infos

4 cols · no RLS · line 26164View in 3D
  • Nullable foreign key project_idpackages_build_infos.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
package_id bigintNOT NULLpackages_packages.id 1:N · CASCADE
pipeline_id bigintnull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (pipeline_id) index_packages_build_infos_on_pipeline_id
  • (project_id) index_packages_build_infos_on_project_id
  • (package_id, id) index_packages_build_infos_package_id_id
  • (package_id, pipeline_id, id) index_packages_build_infos_package_id_pipeline_id_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

packages_cargo_metadata

7 cols · no RLS · line 26181View in 3D
ColumnTypeNullDefaultReferencesNotes
package_id PKbigintNOT NULLpackages_packages.id 1:1 · CASCADE
index_content jsonbnull
project_id bigintNOT NULLprojects.id 1:N · CASCADE
normalized_name textnullCHECK char_length(normalized_name) <= 64
normalized_version textnullCHECK char_length(normalized_version) <= 255
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (project_id, normalized_name, normalized_version) index_cargo_metadata_on_project_normalized_name_version
  • (package_id) index_packages_cargo_metadata_on_package_id

Referenced by

  • nothing

Table checks: char_length(normalized_name) <= 64; char_length(normalized_version) <= 255

packages_cleanup_policies

5 cols · no RLS · line 26193View in 3D
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
next_run_at timestamptznull
keep_n_duplicated_package_files textNOT NULLCAST('all' AS text)CHECK char_length(keep_n_duplicated_package_files) <= 255

Indexes

  • (next_run_at, project_id) WHERE keep_n_duplicated_package_files <> CAST('all' AS text) idx_enabled_pkgs_cleanup_policies_on_next_run_at_project_id

Referenced by

  • nothing

Table checks: char_length(keep_n_duplicated_package_files) <= 255

packages_composer_metadata

5 cols · no RLS · line 26202View in 3D
  • Nullable foreign key project_idpackages_composer_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
package_id PKbigintNOT NULLpackages_packages.id 1:1 · CASCADE
target_sha byteaNOT NULLCHECK octet_length(target_sha) <= 64
composer_json jsonbNOT NULLCAST('{}' AS jsonb)
version_cache_sha byteanullCHECK octet_length(version_cache_sha) <= 255
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (package_id, target_sha) index_packages_composer_metadata_on_package_id_and_target_sha
  • (project_id) index_packages_composer_metadata_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; octet_length(target_sha) <= 64; octet_length(version_cache_sha) <= 255

packages_packages

11 cols · no RLS · line 26211View in 3D
  • Nullable foreign key creator_idpackages_packages.creator_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name varcharNOT NULL
version varcharnull
package_type smallintNOT NULL
creator_id bigintnullusers.id 1:N · SET NULL
status smallintNOT NULL0
last_downloaded_at timestamptznull
status_message textnullCHECK char_length(status_message) <= 255

Indexes

  • (project_id, id) WHERE package_type = 3 AND status = ANY(ARRAY[0, 1]) idx_installable_conan_pkgs_on_project_id_id
  • (project_id, id) idx_installable_helm_pkgs_on_project_id_id
  • (project_id, name, version, id) WHERE package_type = 2 AND status = 0 idx_installable_npm_pkgs_on_project_id_name_version_id
  • (project_id, name, id, version) WHERE package_type = 2 AND status = ANY(ARRAY[0, 1]) idx_packages_on_project_id_name_id_version_when_installable_npm
  • (project_id, name, status, version, created_at) WHERE package_type = 4 AND status <> 4 idx_packages_on_project_id_name_status_when_nuget
  • UNIQUE (project_id, name, version) WHERE package_type = 7 AND status <> 4 idx_packages_on_project_id_name_version_unique_when_generic
  • UNIQUE (project_id, name, version) WHERE package_type = 8 AND status <> 4 idx_packages_on_project_id_name_version_unique_when_golang
  • UNIQUE (project_id, name, version) WHERE package_type = 11 AND status <> 4 idx_packages_on_project_id_name_version_unique_when_helm
  • UNIQUE (project_id, name, version) WHERE package_type = 1 AND status <> 4 idx_packages_on_project_id_name_version_unique_when_maven
  • UNIQUE (project_id, name, version) WHERE package_type = 2 AND status <> 4 idx_packages_on_project_id_name_version_unique_when_npm
  • (split_part(CAST(name AS text), CAST('/' AS text), 1), project_id) WHERE package_type = 2 AND position(CAST(name AS text), CAST('/' AS text)) > 0 AND status = ANY(ARRAY[0, 3]) AND version IS NOT NULL idx_packages_packages_on_npm_scope_and_project_id
  • (project_id, name, version, package_type) idx_packages_packages_on_project_id_name_version_package_type
  • (project_id, name, version, id) WHERE package_type = 12 AND status = ANY(ARRAY[0, 1]) idx_pkgs_on_project_id_name_version_on_installable_terraform
  • (project_id, lower(CAST(name AS text))) WHERE package_type = 4 AND version IS NOT NULL AND status = ANY(ARRAY[0, 1]) idx_pkgs_project_id_lower_name_when_nuget_installable_version
  • (project_id, id) WHERE status = ANY(ARRAY[0, 1]) AND package_type = 5 AND version IS NOT NULL index_packages_on_available_pypi_packages
  • (creator_id) index_packages_packages_on_creator_id
  • (id, created_at) index_packages_packages_on_id_and_created_at
  • (name) index_packages_packages_on_name_trigram
  • (project_id, created_at) index_packages_packages_on_project_id_and_created_at
  • (project_id, lower(CAST(version AS text))) WHERE package_type = 4 index_packages_packages_on_project_id_and_lower_version
  • (project_id, package_type) index_packages_packages_on_project_id_and_package_type
  • (project_id, status, id) index_packages_packages_on_project_id_and_status_and_id
  • (project_id, version) index_packages_packages_on_project_id_and_version
  • (project_id, name) WHERE CAST(name AS text) <> CAST('NuGet.Temporary.Package' AS text) AND version IS NOT NULL AND package_type = 4 index_packages_project_id_name_partial_for_nuget
  • (name) package_name_index
  • UNIQUE (project_id, name, version) WHERE package_type = 14 AND status <> 4 uniq_idx_packages_packages_on_project_id_name_version_ml_model
  • UNIQUE (project_id, name, version) WHERE package_type = 9 AND status <> 4 unique_packages_project_id_and_name_and_version_when_debian

Referenced by

Table checks: char_length(status_message) <= 255

packages_composer_packages

13 cols · no RLS · line 26234View in 3D
  • Nullable foreign key creator_idpackages_composer_packages.creator_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('packages_packages_id_seq' AS regclass))
project_id bigintNOT NULLprojects.id 1:N · CASCADE
creator_id bigintnullusers.id 1:N · SET NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
last_downloaded_at timestamptznull
status smallintNOT NULL0
name textNOT NULL
version textnull
target_sha byteanullCHECK octet_length(target_sha) <= 64
version_cache_sha byteanullCHECK octet_length(version_cache_sha) <= 255
status_message textnullCHECK char_length(status_message) <= 255
composer_json jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (creator_id) idx_pkgs_composer_pkgs_on_creator_id
  • (name, target_sha, status, project_id) idx_pkgs_composer_pkgs_on_name_target_sha_status_project_id
  • (project_id) idx_pkgs_composer_pkgs_on_project_id

Referenced by

  • nothing

Table checks: char_length(status_message) <= 255; octet_length(target_sha) <= 64; octet_length(version_cache_sha) <= 255

packages_conan_file_metadata

9 cols · no RLS · line 26251View in 3D
  • Nullable foreign key project_idpackages_conan_file_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key package_revision_idpackages_conan_file_metadata.package_revision_id may be NULL, so the relationship to packages_conan_package_revisions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key package_reference_idpackages_conan_file_metadata.package_reference_id may be NULL, so the relationship to packages_conan_package_references is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key recipe_revision_idpackages_conan_file_metadata.recipe_revision_id may be NULL, so the relationship to packages_conan_recipe_revisions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, package_revision_id, package_reference_id, recipe_revision_idpackages_conan_file_metadata has several nullable FKs (project_id, package_revision_id, package_reference_id, recipe_revision_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
package_file_id bigintNOT NULLpackages_package_files.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
conan_file_type smallintNOT NULL
recipe_revision_id bigintnullpackages_conan_recipe_revisions.id 1:N · CASCADE
package_revision_id bigintnullpackages_conan_package_revisions.id 1:N · CASCADE
package_reference_id bigintnullpackages_conan_package_references.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (package_file_id) WHERE conan_file_type = 1 idx_pkgs_conan_file_metadata_on_pkg_file_id_when_recipe_file
  • (package_file_id) WHERE recipe_revision_id IS NULL idx_pkgs_conan_metadata_on_pkg_file_id_when_null_rec_rev
  • UNIQUE (package_file_id) index_packages_conan_file_metadata_on_package_file_id
  • (package_reference_id) index_packages_conan_file_metadata_on_package_reference_id
  • (package_revision_id) index_packages_conan_file_metadata_on_package_revision_id
  • (project_id) index_packages_conan_file_metadata_on_project_id
  • (recipe_revision_id) index_packages_conan_file_metadata_on_recipe_revision_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; NOT(conan_file_type = 1 AND package_reference_id IS NOT NULL)

packages_conan_jwt_signing_keys

4 cols · no RLS · line 26274View in 3D
  • Isolated tablepackages_conan_jwt_signing_keys references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
secret_key jsonbNOT NULL

Indexes

  • none

Referenced by

  • nothing

packages_conan_metadata

7 cols · no RLS · line 26290View in 3D
  • Nullable foreign key project_idpackages_conan_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
package_id bigintNOT NULLpackages_packages.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
package_username varchar(255)NOT NULL
package_channel varchar(255)NOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • UNIQUE (package_id, package_username, package_channel) index_packages_conan_metadata_on_package_id_username_channel
  • (project_id) index_packages_conan_metadata_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

packages_conan_package_references

8 cols · no RLS · line 26310View in 3D
  • Nullable foreign key recipe_revision_idpackages_conan_package_references.recipe_revision_id may be NULL, so the relationship to packages_conan_recipe_revisions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
package_id bigintNOT NULLpackages_packages.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
recipe_revision_id bigintnullpackages_conan_recipe_revisions.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
reference byteaNOT NULLCHECK octet_length(reference) <= 20
info jsonbNOT NULLCAST('{}' AS jsonb)CHECK char_length(CAST(info AS text)) <= 20000

Indexes

  • (project_id) index_packages_conan_package_references_on_project_id
  • (recipe_revision_id) index_packages_conan_package_references_on_recipe_revision_id
  • UNIQUE (package_id, recipe_revision_id, reference) uniq_idx_on_packages_conan_package_references_package_reference
  • UNIQUE (package_id, reference) WHERE recipe_revision_id IS NULL uniq_index_pkg_refs_on_ref_and_pkg_id_when_rev_is_null

Referenced by

Table checks: char_length(CAST(info AS text)) <= 20000; octet_length(reference) <= 20

packages_conan_package_revisions

8 cols · no RLS · line 26331View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
package_id bigintNOT NULLpackages_packages.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
package_reference_id bigintNOT NULLpackages_conan_package_references.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
revision byteaNOT NULLCHECK octet_length(revision) <= 20
status smallintNOT NULL0

Indexes

  • (package_id, status, id) idx_pkgs_conan_package_revisions_on_package_id_status_id_desc
  • (package_reference_id) index_packages_conan_package_revisions_on_package_reference_id
  • (project_id) index_packages_conan_package_revisions_on_project_id
  • UNIQUE (package_id, package_reference_id, revision) uniq_idx_on_packages_conan_package_revisions_revision

Referenced by

Table checks: octet_length(revision) <= 20

packages_conan_recipe_revisions

7 cols · no RLS · line 26351View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
package_id bigintNOT NULLpackages_packages.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
revision byteaNOT NULLCHECK octet_length(revision) <= 20
status smallintNOT NULL0

Indexes

  • UNIQUE (package_id, revision) idx_on_packages_conan_recipe_revisions_package_id_revision
  • (id, revision) idx_pkgs_conan_recipe_rev_on_id_and_revision
  • (package_id, status, id) idx_pkgs_conan_recipe_revisions_on_package_id_status_id_desc
  • (project_id) index_packages_conan_recipe_revisions_on_project_id

Referenced by

Table checks: octet_length(revision) <= 20

packages_debian_file_metadata

8 cols · no RLS · line 26370View in 3D
  • Nullable foreign key project_idpackages_debian_file_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
package_file_id PKbigintNOT NULLpackages_package_files.id 1:1 · CASCADE
file_type smallintNOT NULL
component textnullCHECK char_length(component) <= 255
architecture textnullCHECK char_length(architecture) <= 255
fields jsonbnull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (updated_at, package_file_id) WHERE file_type = 1 i_pkgs_deb_file_meta_on_updated_at_package_file_id_when_unknown
  • (project_id) index_packages_debian_file_metadata_on_project_id

Referenced by

  • nothing

Table checks: char_length(component) <= 255; project_id IS NOT NULL; char_length(architecture) <= 255

packages_debian_group_architectures

6 cols · no RLS · line 26384View in 3D
  • Nullable foreign key group_idpackages_debian_group_architectures.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
distribution_id bigintNOT NULLpackages_debian_group_distributions.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • (group_id) index_packages_debian_group_architectures_on_group_id
  • UNIQUE (distribution_id, name) uniq_pkgs_deb_grp_architectures_on_distribution_id_and_name

Referenced by

Table checks: group_id IS NOT NULL; char_length(name) <= 255

packages_debian_group_component_files

12 cols · no RLS · line 26404View in 3D
  • Nullable foreign key group_idpackages_debian_group_component_files.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key architecture_idpackages_debian_group_component_files.architecture_id may be NULL, so the relationship to packages_debian_group_architectures is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK group_id, architecture_idpackages_debian_group_component_files has several nullable FKs (group_id, architecture_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
component_id bigintNOT NULLpackages_debian_group_components.id 1:N · RESTRICT
architecture_id bigintnullpackages_debian_group_architectures.id 1:N · RESTRICT
size integerNOT NULL
file_type smallintNOT NULL
compression_type smallintnull
file_store smallintNOT NULL1
file textNOT NULLCHECK char_length(file) <= 255
file_sha256 byteaNOT NULLCHECK octet_length(file_sha256) <= 64
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • (architecture_id) idx_packages_debian_group_component_files_on_architecture_id
  • (component_id) index_packages_debian_group_component_files_on_component_id
  • (group_id) index_packages_debian_group_component_files_on_group_id

Referenced by

  • nothing

Table checks: group_id IS NOT NULL; char_length(file) <= 255; octet_length(file_sha256) <= 64

packages_debian_group_components

6 cols · no RLS · line 26430View in 3D
  • Nullable foreign key group_idpackages_debian_group_components.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
distribution_id bigintNOT NULLpackages_debian_group_distributions.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • (group_id) index_packages_debian_group_components_on_group_id
  • UNIQUE (distribution_id, name) uniq_pkgs_deb_grp_components_on_distribution_id_and_name

Referenced by

Table checks: char_length(name) <= 255; group_id IS NOT NULL

packages_debian_group_distribution_keys

11 cols · no RLS · line 26450View in 3D
  • Nullable foreign key group_idpackages_debian_group_distribution_keys.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
distribution_id bigintNOT NULLpackages_debian_group_distributions.id 1:N · CASCADE
encrypted_private_key textNOT NULL
encrypted_private_key_iv textNOT NULL
encrypted_passphrase textNOT NULL
encrypted_passphrase_iv textNOT NULL
public_key textNOT NULLCHECK char_length(public_key) <= 524288
fingerprint textNOT NULLCHECK char_length(fingerprint) <= 255
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL

Indexes

  • (distribution_id) idx_pkgs_debian_group_distribution_keys_on_distribution_id
  • (group_id) index_packages_debian_group_distribution_keys_on_group_id

Referenced by

  • nothing

Table checks: group_id IS NOT NULL; char_length(fingerprint) <= 255; char_length(public_key) <= 524288

packages_debian_group_distributions

19 cols · no RLS · line 26476View in 3D
  • Nullable foreign key creator_idpackages_debian_group_distributions.creator_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · RESTRICT
creator_id bigintnullusers.id 1:N · SET NULL
valid_time_duration_seconds integernull
file_store smallintNOT NULL1
automatic booleanNOT NULLTRUE
automatic_upgrades booleanNOT NULLFALSE
codename textNOT NULLCHECK char_length(codename) <= 255
suite textnullCHECK char_length(suite) <= 255
origin textnullCHECK char_length(origin) <= 255
label textnullCHECK char_length(label) <= 255
version textnullCHECK char_length(version) <= 255
description textnullCHECK char_length(description) <= 255
file textnullCHECK char_length(file) <= 255
file_signature textnullCHECK char_length(file_signature) <= 4096
signed_file textnullCHECK char_length(signed_file) <= 255
signed_file_store smallintNOT NULL1

Indexes

  • (creator_id) index_packages_debian_group_distributions_on_creator_id
  • UNIQUE (group_id, codename) uniq_pkgs_debian_group_distributions_group_id_and_codename
  • UNIQUE (group_id, suite) uniq_pkgs_debian_group_distributions_group_id_and_suite

Referenced by

Table checks: char_length(signed_file) <= 255; char_length(description) <= 255; char_length(file_signature) <= 4096; char_length(version) <= 255; char_length(codename) <= 255; char_length(origin) <= 255; char_length(file) <= 255; char_length(label) <= 255; char_length(suite) <= 255

packages_debian_project_architectures

6 cols · no RLS · line 26516View in 3D
  • Nullable foreign key project_idpackages_debian_project_architectures.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
distribution_id bigintNOT NULLpackages_debian_project_distributions.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_packages_debian_project_architectures_on_project_id
  • UNIQUE (distribution_id, name) uniq_pkgs_deb_proj_architectures_on_distribution_id_and_name

Referenced by

Table checks: char_length(name) <= 255; project_id IS NOT NULL

packages_debian_project_component_file_states

10 cols · no RLS · line 26536View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
packages_debian_project_component_file_id bigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_pkg_deb_proj_comp_file_states_failed_verification
  • (packages_debian_project_component_file_id) WHERE verification_state = 0 OR verification_state = 3 index_pkg_deb_proj_comp_file_states_needs_verification
  • UNIQUE (packages_debian_project_component_file_id) index_pkg_deb_proj_comp_file_states_on_fk
  • (project_id) index_pkg_deb_proj_comp_file_states_on_project_id
  • (packages_debian_project_component_file_id, verification_started_at) WHERE verification_state = 1 index_pkg_deb_proj_comp_file_states_on_verification_started
  • (verification_state) index_pkg_deb_proj_comp_file_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_pkg_deb_proj_comp_file_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

packages_debian_project_component_files

12 cols · no RLS · line 26559View in 3D
  • Nullable foreign key project_idpackages_debian_project_component_files.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key architecture_idpackages_debian_project_component_files.architecture_id may be NULL, so the relationship to packages_debian_project_architectures is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, architecture_idpackages_debian_project_component_files has several nullable FKs (project_id, architecture_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
component_id bigintNOT NULLpackages_debian_project_components.id 1:N · RESTRICT
architecture_id bigintnullpackages_debian_project_architectures.id 1:N · RESTRICT
size integerNOT NULL
file_type smallintNOT NULL
compression_type smallintnull
file_store smallintNOT NULL1
file textNOT NULLCHECK char_length(file) <= 255
file_sha256 byteaNOT NULLCHECK octet_length(file_sha256) <= 64
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (architecture_id) idx_packages_debian_project_component_files_on_architecture_id
  • (component_id) index_packages_debian_project_component_files_on_component_id
  • (project_id) index_packages_debian_project_component_files_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(file) <= 255; octet_length(file_sha256) <= 64

packages_debian_project_components

6 cols · no RLS · line 26585View in 3D
  • Nullable foreign key project_idpackages_debian_project_components.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
distribution_id bigintNOT NULLpackages_debian_project_distributions.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_packages_debian_project_components_on_project_id
  • UNIQUE (distribution_id, name) uniq_pkgs_deb_proj_components_on_distribution_id_and_name

Referenced by

Table checks: char_length(name) <= 255; project_id IS NOT NULL

packages_debian_project_distribution_keys

11 cols · no RLS · line 26605View in 3D
  • Nullable foreign key project_idpackages_debian_project_distribution_keys.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
distribution_id bigintNOT NULLpackages_debian_project_distributions.id 1:N · CASCADE
encrypted_private_key textNOT NULL
encrypted_private_key_iv textNOT NULL
encrypted_passphrase textNOT NULL
encrypted_passphrase_iv textNOT NULL
public_key textNOT NULLCHECK char_length(public_key) <= 524288
fingerprint textNOT NULLCHECK char_length(fingerprint) <= 255
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (distribution_id) idx_pkgs_debian_project_distribution_keys_on_distribution_id
  • (project_id) index_packages_debian_project_distribution_keys_on_project_id

Referenced by

  • nothing

Table checks: char_length(fingerprint) <= 255; project_id IS NOT NULL; char_length(public_key) <= 524288

packages_debian_project_distributions

19 cols · no RLS · line 26631View in 3D
  • Nullable foreign key creator_idpackages_debian_project_distributions.creator_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · RESTRICT
creator_id bigintnullusers.id 1:N · SET NULL
valid_time_duration_seconds integernull
file_store smallintNOT NULL1
automatic booleanNOT NULLTRUE
automatic_upgrades booleanNOT NULLFALSE
codename textNOT NULLCHECK char_length(codename) <= 255
suite textnullCHECK char_length(suite) <= 255
origin textnullCHECK char_length(origin) <= 255
label textnullCHECK char_length(label) <= 255
version textnullCHECK char_length(version) <= 255
description textnullCHECK char_length(description) <= 255
file textnullCHECK char_length(file) <= 255
file_signature textnullCHECK char_length(file_signature) <= 4096
signed_file textnullCHECK char_length(signed_file) <= 255
signed_file_store smallintNOT NULL1

Indexes

  • (creator_id) index_packages_debian_project_distributions_on_creator_id
  • UNIQUE (project_id, codename) uniq_pkgs_debian_project_distributions_project_id_and_codename
  • UNIQUE (project_id, suite) uniq_pkgs_debian_project_distributions_project_id_and_suite

Referenced by

Table checks: char_length(origin) <= 255; char_length(label) <= 255; char_length(codename) <= 255; char_length(version) <= 255; char_length(signed_file) <= 255; char_length(suite) <= 255; char_length(file_signature) <= 4096; char_length(description) <= 255; char_length(file) <= 255

packages_debian_publications

4 cols · no RLS · line 26671View in 3D
  • Nullable foreign key project_idpackages_debian_publications.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
package_id bigintNOT NULLpackages_packages.id 1:1 · CASCADE
distribution_id bigintNOT NULLpackages_debian_project_distributions.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (distribution_id) index_packages_debian_publications_on_distribution_id
  • UNIQUE (package_id) index_packages_debian_publications_on_package_id
  • (project_id) index_packages_debian_publications_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

packages_dependencies

4 cols · no RLS · line 26688View in 3D
  • Nullable foreign key project_idpackages_dependencies.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name varchar(255)NOT NULL
version_pattern varchar(255)NOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (name, version_pattern, project_id) idx_packages_dependencies_on_name_version_pattern_project_id
  • UNIQUE (name, version_pattern, project_id) WHERE project_id IS NOT NULL index_packages_dependencies_on_name_version_pattern_project_id
  • (project_id) index_packages_dependencies_on_project_id

Referenced by

Table checks: project_id IS NOT NULL

packages_helm_file_metadata

6 cols · no RLS · line 26723View in 3D
  • Nullable foreign key project_idpackages_helm_file_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
package_file_id PKbigintNOT NULLpackages_package_files.id 1:1 · CASCADE
channel textNOT NULLCHECK char_length(channel) <= 255
metadata jsonbnull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (channel) index_packages_helm_file_metadata_on_channel
  • (package_file_id, channel) index_packages_helm_file_metadata_on_pf_id_and_channel
  • (project_id) index_packages_helm_file_metadata_on_project_id

Referenced by

  • nothing

Table checks: char_length(channel) <= 255; project_id IS NOT NULL

packages_helm_metadata_cache_states

10 cols · no RLS · line 26734View in 3D
  • Nullable foreign key project_idpackages_helm_metadata_cache_states.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
packages_helm_metadata_cache_id bigintNOT NULLpackages_helm_metadata_caches.id 1:1 · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (verification_retry_at) WHERE verification_state = 3 idx_packages_helm_metadata_cache_states_failed_verification
  • (packages_helm_metadata_cache_id) WHERE verification_state = 0 OR verification_state = 3 idx_packages_helm_metadata_cache_states_needs_verification_id
  • (packages_helm_metadata_cache_id, verification_started_at) WHERE verification_state = 1 idx_packages_helm_metadata_cache_states_on_verification_started
  • (verification_state) idx_packages_helm_metadata_cache_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 idx_packages_helm_metadata_cache_states_pending_verification
  • UNIQUE (packages_helm_metadata_cache_id) idx_pkgs_helm_metadata_cache_states_on_helm_metadata_cache_id
  • (project_id) index_packages_helm_metadata_cache_states_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(verification_failure) <= 255

packages_helm_metadata_caches

11 cols · no RLS · line 26758View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
last_downloaded_at timestamptznull
project_id bigintNOT NULL
size integerNOT NULL
status smallintNOT NULL0
file_store integernull1
channel textNOT NULLCHECK char_length(channel) <= 255
file textNOT NULLCHECK char_length(file) <= 255
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 255

Indexes

  • UNIQUE (object_storage_key, project_id) idx_pks_helm_metadata_caches_on_object_storage_key_project_id
  • UNIQUE (project_id, channel) index_packages_helm_metadata_caches_on_project_id_and_channel

Referenced by

Table checks: char_length(object_storage_key) <= 255; char_length(file) <= 255; char_length(channel) <= 255

packages_maven_metadata

9 cols · no RLS · line 26784View in 3D
  • Nullable foreign key project_idpackages_maven_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
package_id bigintNOT NULLpackages_packages.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
app_group varcharNOT NULL
app_name varcharNOT NULL
app_version varcharnull
path varchar(512)NOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (package_id, path) index_packages_maven_metadata_on_package_id_and_path
  • (path) index_packages_maven_metadata_on_path
  • (project_id) index_packages_maven_metadata_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

packages_npm_metadata

3 cols · no RLS · line 26806View in 3D
  • Nullable foreign key project_idpackages_npm_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
package_id PKbigintNOT NULLpackages_packages.id 1:1 · CASCADE
package_json jsonbNOT NULLCAST('{}' AS jsonb)CHECK char_length(CAST(package_json AS text)) < 20000
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (package_id) WHERE package_json ? CAST('deprecated' AS text) index_packages_npm_metadata_on_package_json_deprecate_exist
  • (project_id) index_packages_npm_metadata_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(CAST(package_json AS text)) < 20000

packages_npm_metadata_caches

11 cols · no RLS · line 26814View in 3D
  • Isolated tablepackages_npm_metadata_caches references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
last_downloaded_at timestamptznull
project_id bigintnullCHECK project_id IS NOT NULL
file_store integernull1
size integerNOT NULL
file textNOT NULLCHECK char_length(file) <= 255
package_name textNOT NULL
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 255
status smallintNOT NULL0

Indexes

  • (id) WHERE project_id IS NULL AND status = 0 idx_pkgs_npm_metadata_caches_on_id_and_project_id_and_status
  • UNIQUE (object_storage_key, project_id) idx_pks_npm_metadata_caches_on_object_storage_key_project_id
  • UNIQUE (package_name, project_id) WHERE project_id IS NOT NULL index_npm_metadata_caches_on_package_name_project_id_unique
  • (project_id, status) index_packages_npm_metadata_caches_on_project_id_status

Referenced by

  • nothing

Table checks: char_length(file) <= 255; project_id IS NOT NULL; char_length(object_storage_key) <= 255

packages_nuget_metadata

8 cols · no RLS · line 26848View in 3D
  • Nullable foreign key project_idpackages_nuget_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
package_id PKbigintNOT NULLpackages_packages.id 1:1 · CASCADE
license_url textnullCHECK char_length(license_url) <= 255
project_url textnullCHECK char_length(project_url) <= 255
icon_url textnullCHECK char_length(icon_url) <= 255
authors textnullCHECK char_length(authors) <= 255
description textnullCHECK char_length(description) <= 4000
normalized_version textnullCHECK char_length(normalized_version) <= 255
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (package_id, normalized_version) idx_packages_nuget_metadata_on_pkg_id_and_normalized_version
  • (project_id) index_packages_nuget_metadata_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(normalized_version) <= 255; char_length(description) <= 4000; char_length(authors) <= 255; char_length(icon_url) <= 255; char_length(license_url) <= 255; char_length(project_url) <= 255

packages_nuget_symbol_states

10 cols · no RLS · line 26866View in 3D
  • Isolated tablepackages_nuget_symbol_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
packages_nuget_symbol_id bigintNOT NULL
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_packages_nuget_symbol_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_packages_nuget_symbol_states_needs_verification
  • UNIQUE (packages_nuget_symbol_id) index_packages_nuget_symbol_states_on_packages_nuget_symbol_id
  • (project_id) index_packages_nuget_symbol_states_on_project_id
  • (verification_state) index_packages_nuget_symbol_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_packages_nuget_symbol_states_pending_verification

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(verification_failure) <= 255

packages_nuget_symbols

13 cols · no RLS · line 26890View in 3D
  • Nullable foreign key package_idpackages_nuget_symbols.package_id may be NULL, so the relationship to packages_packages is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
package_id bigintnullpackages_packages.id 1:N · SET NULL
size integerNOT NULL
file_store smallintnull1
file textNOT NULLCHECK char_length(file) <= 255
file_path textNOT NULLCHECK char_length(file_path) <= 255
signature textNOT NULLCHECK char_length(signature) <= 255
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 255
file_sha256 byteanullCHECK octet_length(file_sha256) <= 64
status smallintNOT NULL0
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (lower(signature), lower(file)) idx_pkgs_nuget_symbols_on_lowercase_signature_and_file_name
  • (lower(signature), lower(file_path)) idx_pkgs_nuget_symbols_on_lowercase_signature_and_file_path
  • UNIQUE (object_storage_key, project_id) index_packages_nuget_symbols_on_object_storage_key_project_id
  • (package_id) index_packages_nuget_symbols_on_package_id
  • (project_id) index_packages_nuget_symbols_on_project_id

Referenced by

  • nothing

Table checks: char_length(file) <= 255; char_length(object_storage_key) <= 255; char_length(file_path) <= 255; project_id IS NOT NULL; char_length(signature) <= 255; octet_length(file_sha256) <= 64

packages_package_file_build_infos

4 cols · no RLS · line 26920View in 3D
  • Nullable foreign key project_idpackages_package_file_build_infos.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
package_file_id bigintNOT NULLpackages_package_files.id 1:N · CASCADE
pipeline_id bigintnull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (package_file_id) index_packages_package_file_build_infos_on_package_file_id
  • (pipeline_id) index_packages_package_file_build_infos_on_pipeline_id
  • (project_id) index_packages_package_file_build_infos_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

packages_package_file_states

10 cols · no RLS · line 26937View in 3D
  • Isolated tablepackages_package_file_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
package_file_id bigintNOT NULL
verification_state smallintNOT NULL0
verification_retry_count smallintnull0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_packages_package_file_states_failed_verification
  • UNIQUE (package_file_id) index_packages_package_file_states_on_package_file_id
  • (project_id) index_packages_package_file_states_on_project_id
  • (verification_state) index_packages_package_file_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_packages_package_file_states_pending_verification

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(verification_failure) <= 255

packages_package_files

21 cols · no RLS · line 26961View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
package_id bigintNOT NULLpackages_packages.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
size bigintnull
file_store integernull1CHECK file_store IS NOT NULL
file_md5 byteanullCHECK octet_length(file_md5) <= 32
file_sha1 byteanullCHECK octet_length(file_sha1) <= 40
file_name varcharNOT NULL
file textNOT NULL
file_sha256 byteanullCHECK octet_length(file_sha256) <= 64
verification_retry_at timestamptznull
verified_at timestamptznull
verification_failure varchar(255)null
verification_retry_count integernull
verification_checksum byteanull
verification_state smallintNOT NULL0
verification_started_at timestamptznull
status smallintNOT NULL0
file_final_path textnullCHECK char_length(file_final_path) <= 1024
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (package_id, id, file_name) WHERE status = 0 idx_pkgs_installable_package_files_on_package_id_id_file_name
  • (file_name) index_packages_package_files_on_file_name
  • (file_name, file_sha256) index_packages_package_files_on_file_name_file_sha256
  • (file_store) index_packages_package_files_on_file_store
  • (id) WHERE status = 1 index_packages_package_files_on_id_for_cleanup
  • (package_id) WHERE status = 0 AND reverse(split_part(reverse(CAST(file_name AS text)), CAST('.' AS text), 1)) = CAST('nupkg' AS text) index_packages_package_files_on_package_file_extension_status
  • (package_id, created_at) index_packages_package_files_on_package_id_and_created_at_desc
  • (package_id, file_name, file_sha1) index_packages_package_files_on_package_id_file_name_file_sha1
  • (package_id, id) index_packages_package_files_on_package_id_id
  • (package_id, status, id) index_packages_package_files_on_package_id_status_and_id
  • (status) index_packages_package_files_on_status
  • (verification_state) index_packages_package_files_on_verification_state
  • (verification_retry_at) WHERE verification_state = 3 packages_packages_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 packages_packages_needs_verification
  • (verified_at) WHERE verification_state = 0 packages_packages_pending_verification

Referenced by

Table checks: char_length(file_final_path) <= 1024; project_id IS NOT NULL; file_store IS NOT NULL; octet_length(file_md5) <= 32; octet_length(file_sha1) <= 40; octet_length(file_sha256) <= 64

packages_protection_rules

11 cols · no RLS · line 26997View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
package_type smallintNOT NULL
package_name_pattern textNOT NULLCHECK char_length(package_name_pattern) <= 255
minimum_access_level_for_push smallintnull
minimum_access_level_for_delete smallintnull
pattern textnullCHECK char_length(pattern) <= 255
pattern_type smallintNOT NULL0
target_field smallintNOT NULL0

Indexes

  • UNIQUE (project_id, package_type, package_name_pattern) i_packages_unique_project_id_package_type_package_name_pattern
  • UNIQUE (project_id, package_type, target_field, pattern_type, pattern) i_packages_unique_project_package_type_target_pattern

Referenced by

  • nothing

Table checks: num_nonnulls(minimum_access_level_for_delete, minimum_access_level_for_push) > 0; char_length(pattern) <= 255; char_length(package_name_pattern) <= 255

packages_pypi_file_metadata

5 cols · no RLS · line 27023View in 3D
  • Junction table allows duplicate links package_file_id, project_idpackages_pypi_file_metadata looks like a many-to-many link table but has no unique constraint across (package_file_id, project_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
package_file_id PKbigintNOT NULLpackages_package_files.id 1:1 · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
required_python textNOT NULLCAST('' AS text)CHECK char_length(required_python) <= 255

Indexes

  • (project_id) index_packages_pypi_file_metadata_on_project_id

Referenced by

  • nothing

Table checks: char_length(required_python) <= 255

packages_pypi_metadata

9 cols · no RLS · line 27032View in 3D
  • Nullable foreign key project_idpackages_pypi_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
package_id PKbigintNOT NULLpackages_packages.id 1:1 · CASCADE
required_python textnullCAST('' AS text)CHECK required_python IS NOT NULL
metadata_version textnullCHECK char_length(metadata_version) <= 16
summary textnullCHECK char_length(summary) <= 255
keywords textnullCHECK char_length(keywords) <= 1024
author_email textnullCHECK char_length(author_email) <= 2048
description textnullCHECK char_length(description) <= 4000
description_content_type textnullCHECK char_length(description_content_type) <= 128
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_packages_pypi_metadata_on_project_id

Referenced by

  • nothing

Table checks: required_python IS NOT NULL; char_length(keywords) <= 1024; char_length(metadata_version) <= 16; char_length(required_python) <= 255; char_length(author_email) <= 2048; char_length(summary) <= 255; project_id IS NOT NULL; char_length(description) <= 4000; char_length(description_content_type) <= 128

packages_rpm_metadata

9 cols · no RLS · line 27053View in 3D
  • Nullable foreign key project_idpackages_rpm_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
package_id PKbigintNOT NULLpackages_packages.id 1:1 · CASCADE
release textNOT NULLCAST('1' AS text)CHECK char_length(release) <= 128
summary textNOT NULLCAST('' AS text)CHECK char_length(summary) <= 1000
description textNOT NULLCAST('' AS text)CHECK char_length(description) <= 5000
arch textNOT NULLCAST('' AS text)CHECK char_length(arch) <= 255
license textnullCHECK char_length(license) <= 1000
url textnullCHECK char_length(url) <= 1000
epoch integerNOT NULL0
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (package_id) index_packages_rpm_metadata_on_package_id
  • (project_id) index_packages_rpm_metadata_on_project_id

Referenced by

  • nothing

Table checks: char_length(arch) <= 255; project_id IS NOT NULL; char_length(description) <= 5000; char_length(url) <= 1000; char_length(license) <= 1000; char_length(summary) <= 1000; char_length(release) <= 128

packages_rpm_repository_files

12 cols · no RLS · line 27072View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
file_store integernull1
status smallintNOT NULL0
size integernull
file_md5 byteanullCHECK octet_length(file_md5) <= 32
file_sha1 byteanullCHECK octet_length(file_sha1) <= 40
file_sha256 byteanullCHECK octet_length(file_sha256) <= 64
file textNOT NULLCHECK char_length(file) <= 255
file_name textNOT NULLCHECK char_length(file_name) <= 255

Indexes

  • (project_id, file_name) index_packages_rpm_repository_files_on_project_id_and_file_name

Referenced by

  • nothing

Table checks: char_length(file) <= 255; char_length(file_name) <= 255; octet_length(file_md5) <= 32; octet_length(file_sha1) <= 40; octet_length(file_sha256) <= 64

packages_rubygems_metadata

27 cols · no RLS · line 27098View in 3D
  • Nullable foreign key project_idpackages_rubygems_metadata.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
package_id PKbigintNOT NULLpackages_packages.id 1:1 · CASCADE
authors textnullCHECK char_length(authors) <= 255
files textnullCHECK char_length(files) <= 30000
summary textnullCHECK char_length(summary) <= 1024
description textnullCHECK char_length(description) <= 1024
email textnullCHECK char_length(email) <= 255
homepage textnullCHECK char_length(homepage) <= 255
licenses textnullCHECK char_length(licenses) <= 30000
metadata textnullCHECK char_length(metadata) <= 30000
author textnullCHECK char_length(author) <= 255
bindir textnullCHECK char_length(bindir) <= 255
cert_chain textnullCHECK char_length(cert_chain) <= 255
executables textnullCHECK char_length(executables) <= 30000
extensions textnullCHECK char_length(extensions) <= 30000
extra_rdoc_files textnullCHECK char_length(extra_rdoc_files) <= 30000
platform textnullCHECK char_length(platform) <= 255
post_install_message textnullCHECK char_length(post_install_message) <= 255
rdoc_options textnullCHECK char_length(rdoc_options) <= 30000
require_paths textnullCHECK char_length(require_paths) <= 30000
required_ruby_version textnullCHECK char_length(required_ruby_version) <= 255
required_rubygems_version textnullCHECK char_length(required_rubygems_version) <= 255
requirements textnullCHECK char_length(requirements) <= 30000
rubygems_version textnullCHECK char_length(rubygems_version) <= 255
signing_key textnullCHECK char_length(signing_key) <= 255
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_packages_rubygems_metadata_on_project_id

Referenced by

  • nothing

Table checks: char_length(description) <= 1024; char_length(email) <= 255; char_length(rubygems_version) <= 255; char_length(post_install_message) <= 255; char_length(required_rubygems_version) <= 255; char_length(platform) <= 255; char_length(cert_chain) <= 255; char_length(extensions) <= 30000; char_length(licenses) <= 30000; char_length(summary) <= 1024; char_length(executables) <= 30000; char_length(homepage) <= 255; char_length(bindir) <= 255; char_length(authors) <= 255; char_length(signing_key) <= 255; char_length(extra_rdoc_files) <= 30000; char_length(author) <= 255; char_length(require_paths) <= 30000; char_length(rdoc_options) <= 30000; char_length(required_ruby_version) <= 255; project_id IS NOT NULL; char_length(metadata) <= 30000; char_length(files) <= 30000; char_length(requirements) <= 30000

packages_rubygems_spec_files

10 cols · no RLS · line 27152View in 3D
  • Isolated tablepackages_rubygems_spec_files references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
size integerNOT NULL
file_store integernull1
status smallintNOT NULL0
file_name textNOT NULLCHECK char_length(file_name) <= 255
file textNOT NULLCHECK char_length(file) <= 255
object_storage_key textNOT NULLCHECK char_length(object_storage_key) <= 255

Indexes

  • UNIQUE (object_storage_key, project_id) i_pkgs_rubygems_spec_files_on_obj_stor_key_and_project_id
  • UNIQUE (project_id, file_name) index_packages_rubygems_spec_files_on_project_id_and_file_name
  • (project_id, status) index_packages_rubygems_spec_files_on_project_id_and_status

Referenced by

  • nothing

Table checks: char_length(file_name) <= 255; char_length(object_storage_key) <= 255; char_length(file) <= 255

packages_tags

6 cols · no RLS · line 27177View in 3D
  • Nullable foreign key project_idpackages_tags.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
package_id bigintNOT NULLpackages_packages.id 1:N · CASCADE
name varchar(255)NOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (package_id, updated_at) index_packages_tags_on_package_id_and_updated_at
  • (project_id) index_packages_tags_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

packages_terraform_module_metadata

9 cols · no RLS · line 27196View in 3D
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
package_id PKbigintNOT NULLpackages_packages.id 1:1 · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
fields jsonbNOT NULLCHECK char_length(CAST(fields AS text)) <= 10485760
semver_major integernull
semver_minor integernull
semver_prerelease textnullCHECK char_length(semver_prerelease) <= 255
semver_patch bigintnull

Indexes

  • (project_id) index_packages_terraform_module_metadata_on_project_id

Referenced by

  • nothing

Table checks: char_length(semver_prerelease) <= 255; char_length(CAST(fields AS text)) <= 10485760

pages 4 tables

Tables whose names start with pages_.

Entity-relationship diagram: pages_deployment_states, pages_deployments, pages_domain_acme_orders, pages_domainspages_deployment_statespages_deployment_id PKbigintverification_statesmallintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzverification_retry_countsmallintverification_checksumbyteaverification_failuretextproject_id FKbigintpages_deploymentsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintci_build_idbigintfile_storesmallintfiletextfile_countintegerfile_sha256byteasizebigintroot_directorytextpath_prefixtextbuild_reftextdeleted_attimestamptzupload_readybooleanexpires_attimestamptzpages_domain_acme_ordersid PKbigintpages_domain_id FKbigintexpires_attimestamptzcreated_attimestamptzupdated_attimestamptzurlvarcharchallenge_tokenvarcharchallenge_file_contenttextencrypted_private_keytextencrypted_private_key_ivtextproject_id FKbigintpages_domainsid PKbigintproject_id FKbigintcertificatetextencrypted_keytextencrypted_key_ivvarcharencrypted_key_saltvarchardomainvarcharverified_attimestamptzverification_codevarcharenabled_untiltimestamptzremove_attimestamptzauto_ssl_enabledbooleancertificate_valid_not_beforetimestamptzcertificate_valid_not_aftertimestamptzcertificate_sourcesmallintwildcardbooleanusagesmallintscopesmallintauto_ssl_failedbooleanupdated_attimestamptzprojectsproject_idproject_idproject_idpages_deployment_idproject_idpages_domain_id

Relationships

pages_deployment_states

9 cols · no RLS · line 27210View in 3D
  • Nullable foreign key project_idpages_deployment_states.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
pages_deployment_id PKbigintNOT NULLpages_deployments.id 1:1 · CASCADE
verification_state smallintNOT NULL0
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
verification_retry_count smallintnull
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_pages_deployment_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_pages_deployment_states_needs_verification
  • (pages_deployment_id) index_pages_deployment_states_on_pages_deployment_id
  • (project_id) index_pages_deployment_states_on_project_id
  • (verification_state) index_pages_deployment_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_pages_deployment_states_pending_verification

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(verification_failure) <= 255

pages_deployments

16 cols · no RLS · line 27233View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
ci_build_id bigintnull
file_store smallintNOT NULL
file textNOT NULLCHECK char_length(file) <= 255
file_count integerNOT NULL
file_sha256 byteaNOT NULL
size bigintnullCHECK size IS NOT NULL
root_directory textnullCAST('public' AS text)CHECK char_length(root_directory) <= 255
path_prefix textnullCHECK char_length(path_prefix) <= 128
build_ref textnullCHECK char_length(build_ref) <= 512
deleted_at timestamptznull
upload_ready booleannullFALSE
expires_at timestamptznull

Indexes

  • (ci_build_id) index_pages_deployments_on_ci_build_id
  • (deleted_at) WHERE deleted_at IS NOT NULL index_pages_deployments_on_deleted_at
  • (expires_at, id) WHERE expires_at IS NOT NULL index_pages_deployments_on_expires_at
  • (file_store, id) index_pages_deployments_on_file_store_and_id
  • (project_id) index_pages_deployments_on_project_id
  • (project_id, path_prefix, id) WHERE deleted_at IS NULL pages_deployments_deleted_at_null_index

Referenced by

Table checks: char_length(path_prefix) <= 128; size IS NOT NULL; char_length(root_directory) <= 255; char_length(build_ref) <= 512; char_length(file) <= 255

pages_domain_acme_orders

11 cols · no RLS · line 27266View in 3D
  • Nullable foreign key project_idpages_domain_acme_orders.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
pages_domain_id bigintNOT NULLpages_domains.id 1:N · CASCADE
expires_at timestamptzNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
url varcharNOT NULL
challenge_token varcharNOT NULL
challenge_file_content textNOT NULL
encrypted_private_key textNOT NULL
encrypted_private_key_iv textNOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (challenge_token) index_pages_domain_acme_orders_on_challenge_token
  • (pages_domain_id) index_pages_domain_acme_orders_on_pages_domain_id
  • (project_id) index_pages_domain_acme_orders_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

pages_domains

20 cols · no RLS · line 27290View in 3D
  • Nullable foreign key project_idpages_domains.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
certificate textnull
encrypted_key textnull
encrypted_key_iv varcharnull
encrypted_key_salt varcharnull
domain varcharnull
verified_at timestamptznull
verification_code varcharNOT NULL
enabled_until timestamptznull
remove_at timestamptznull
auto_ssl_enabled booleanNOT NULLFALSE
certificate_valid_not_before timestamptznull
certificate_valid_not_after timestamptznull
certificate_source smallintNOT NULL0
wildcard booleanNOT NULLFALSE
usage smallintNOT NULL0
scope smallintNOT NULL2
auto_ssl_failed booleanNOT NULLFALSE
updated_at timestamptznull

Indexes

  • (id) WHERE auto_ssl_enabled = TRUE AND auto_ssl_failed = FALSE AND certificate_source = 0 index_pages_domains_need_auto_ssl_renewal_user_provided
  • (certificate_valid_not_after) WHERE auto_ssl_enabled = TRUE AND auto_ssl_failed = FALSE index_pages_domains_need_auto_ssl_renewal_valid_not_after
  • UNIQUE (domain, wildcard) index_pages_domains_on_domain_and_wildcard
  • (lower(CAST(domain AS text))) index_pages_domains_on_domain_lowercase
  • (project_id) index_pages_domains_on_project_id
  • (project_id, enabled_until) index_pages_domains_on_project_id_and_enabled_until
  • (remove_at) index_pages_domains_on_remove_at
  • (scope) index_pages_domains_on_scope
  • (usage) index_pages_domains_on_usage
  • (verified_at) index_pages_domains_on_verified_at
  • (verified_at, enabled_until) index_pages_domains_on_verified_at_and_enabled_until
  • (wildcard) index_pages_domains_on_wildcard

Referenced by

Table checks: project_id IS NOT NULL

personal 4 tables

Tables whose names start with personal_.

Entity-relationship diagram: personal_access_token_granular_scopes, personal_access_token_last_used_ips, personal_access_tokens, personal_snippet_upload_statespersonal_access_token_granular_scopesid PKbigintorganization_id FKbigintpersonal_access_token_id FKbigintgranular_scope_id FKbigintpersonal_access_token_last_used_ipsid PKbigintpersonal_access_token_id FKbigintorganization_id FKbigintcreated_attimestamptzupdated_attimestamptzip_addressinetpersonal_access_tokensid PKbigintuser_id FKbigintnamevarcharrevokedbooleanexpires_atdatecreated_attimestampupdated_attimestampscopesvarcharimpersonationbooleantoken_digestvarcharexpire_notification_deliveredbooleanlast_used_attimestamptzafter_expiry_notification_deliveredbooleanprevious_personal_access_token_id FKbigintorganization_id FKbigintseven_days_notification_sent_attimestamptzthirty_days_notification_sent_attimestamptzsixty_days_notification_sent_attimestamptzdescriptiontextgroup_id FKbigintuser_typesmallintgranularbooleansudobooleanpersonal_snippet_upload_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzpersonal_snippet_upload_id FKbigintorganization_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextgranular_scopesnamespacesorganizationssnippet_uploadsusersprevious_personal_access_token_idgroup_idorganization_iduser_idorganization_idpersonal_snippet_upload_idpersonal_access_token_idgranular_scope_idorganization_idpersonal_access_token_idorganization_id

Relationships

personal_access_token_granular_scopes

4 cols · no RLS · line 27342View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
personal_access_token_id bigintNOT NULLpersonal_access_tokens.id 1:N · CASCADE
granular_scope_id bigintNOT NULLgranular_scopes.id 1:N · CASCADE

Indexes

  • (granular_scope_id) idx_pat_granular_scopes_on_granular_scope_id
  • (organization_id) idx_pat_granular_scopes_on_organization_id
  • (personal_access_token_id) idx_pat_granular_scopes_on_pat_id

Referenced by

  • nothing

personal_access_token_last_used_ips

6 cols · no RLS · line 27358View in 3D
  • Junction table allows duplicate links organization_id, personal_access_token_idpersonal_access_token_last_used_ips looks like a many-to-many link table but has no unique constraint across (organization_id, personal_access_token_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
personal_access_token_id bigintNOT NULLpersonal_access_tokens.id 1:N · CASCADE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
ip_address inetnull

Indexes

  • (personal_access_token_id) idx_pat_last_used_ips_on_pat_id
  • (organization_id) index_personal_access_token_last_used_ips_on_organization_id

Referenced by

  • nothing

personal_access_tokens

23 cols · no RLS · line 27376View in 3D
  • Nullable foreign key group_idpersonal_access_tokens.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key previous_personal_access_token_idpersonal_access_tokens.previous_personal_access_token_id may be NULL, so the relationship to personal_access_tokens is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK group_id, previous_personal_access_token_idpersonal_access_tokens has several nullable FKs (group_id, previous_personal_access_token_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
name varcharNOT NULL
revoked booleannullFALSE
expires_at datenull
created_at timestampNOT NULL
updated_at timestampNOT NULL
scopes varcharNOT NULLCAST('--- [] ' AS varchar)- []
impersonation booleanNOT NULLFALSE
token_digest varcharnull
expire_notification_delivered booleanNOT NULLFALSE
last_used_at timestamptznull
after_expiry_notification_delivered booleanNOT NULLFALSE
previous_personal_access_token_id bigintnullpersonal_access_tokens.id 1:N · SET NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
seven_days_notification_sent_at timestamptznull
thirty_days_notification_sent_at timestamptznull
sixty_days_notification_sent_at timestamptznull
description textnullCHECK char_length(description) <= 255
group_id bigintnullnamespaces.id 1:N · SET NULL
user_type smallintnull
granular booleanNOT NULLFALSE
sudo booleanNOT NULLFALSE

Indexes

  • (previous_personal_access_token_id) idx_personal_access_tokens_on_previous_personal_access_token_id
  • (user_id, expires_at) index_pat_on_user_id_and_expires_at
  • (expires_at, id) WHERE impersonation = FALSE AND revoked = FALSE AND seven_days_notification_sent_at IS NULL index_pats_on_expiring_at_seven_days_notification_sent_at
  • (expires_at, id) WHERE impersonation = FALSE AND revoked = FALSE AND sixty_days_notification_sent_at IS NULL index_pats_on_expiring_at_sixty_days_notification_sent_at
  • (expires_at, id) WHERE impersonation = FALSE AND revoked = FALSE AND thirty_days_notification_sent_at IS NULL index_pats_on_expiring_at_thirty_days_notification_sent_at
  • (group_id, user_type, created_at, id) WHERE impersonation = FALSE index_pats_on_group_id_and_user_type_and_created_at_and_id
  • (group_id, user_type, expires_at, id) WHERE impersonation = FALSE index_pats_on_group_id_and_user_type_and_expires_at_and_id
  • (group_id, user_type, last_used_at, id) WHERE impersonation = FALSE index_pats_on_group_id_and_user_type_and_last_used_at_and_id
  • (group_id) index_personal_access_tokens_on_group_id
  • (id, created_at) index_personal_access_tokens_on_id_and_created_at
  • (organization_id) index_personal_access_tokens_on_organization_id
  • UNIQUE (token_digest) index_personal_access_tokens_on_token_digest
  • (user_id, id) index_personal_access_tokens_on_user_id_and_id

Referenced by

Table checks: char_length(description) <= 255

personal_snippet_upload_states

10 cols · no RLS · line 27413View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
personal_snippet_upload_id bigintNOT NULLsnippet_uploads.id 1:1 · CASCADE
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • UNIQUE (personal_snippet_upload_id) idx_personal_snippet_upload_states_on_ps_upload_id
  • (verification_retry_at) WHERE verification_state = 3 index_personal_snippet_upload_states_failed_verification
  • (personal_snippet_upload_id) WHERE verification_state = 0 OR verification_state = 3 index_personal_snippet_upload_states_needs_verification_id
  • (organization_id) index_personal_snippet_upload_states_on_organization_id
  • (personal_snippet_upload_id, verification_started_at) WHERE verification_state = 1 index_personal_snippet_upload_states_on_verification_started
  • (verification_state) index_personal_snippet_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_personal_snippet_upload_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

snippet 6 tables

Tables whose names start with snippet_.

Entity-relationship diagram: snippet_repositories, snippet_repository_states, snippet_repository_storage_moves, snippet_statistics, snippet_uploads, snippet_user_mentionssnippet_repositoriessnippet_id PKbigintshard_idbigintdisk_pathvarchar(80)verification_retry_countsmallintverification_retry_attimestamptzverified_attimestamptzverification_checksumbyteaverification_failuretextverification_statesmallintverification_started_attimestamptzsnippet_project_id FKbigintsnippet_organization_id FKbigintsnippet_repository_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzsnippet_repository_id FKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextsnippet_project_id FKbigintsnippet_organization_id FKbigintsnippet_repository_storage_movesid PKbigintcreated_attimestamptzupdated_attimestamptzsnippet_id FKbigintstatesmallintsource_storage_nametextdestination_storage_nametexterror_messagetextsnippet_project_id FKbigintsnippet_organization_id FKbigintsnippet_statisticssnippet_id PKbigintrepository_sizebigintfile_countbigintcommit_countbigintsnippet_project_id FKbigintsnippet_organization_id FKbigintsnippet_uploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_idbigintorganization_idbigintnamespace_idbigintproject_idbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextsnippet_user_mentionsid PKbigintsnippet_id FKbigintmentioned_users_idsbigint[]mentioned_projects_idsbigint[]mentioned_groups_idsbigint[]note_id FKbigintsnippet_project_id FKbigintsnippet_organization_id FKbigintnotesorganizationsprojectssnippetssnippet_organization_idsnippet_project_idsnippet_idsnippet_project_idsnippet_organization_idsnippet_idsnippet_organization_idsnippet_project_idsnippet_idsnippet_project_idsnippet_organization_idsnippet_idnote_idsnippet_repository_idsnippet_organization_idsnippet_project_id

Relationships

snippet_repositories

12 cols · no RLS · line 27436View in 3D
  • Nullable foreign key snippet_organization_idsnippet_repositories.snippet_organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key snippet_project_idsnippet_repositories.snippet_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
snippet_id PKbigintNOT NULLsnippets.id 1:1 · CASCADE
shard_id bigintnull
disk_path varchar(80)NOT NULL
verification_retry_count smallintnull
verification_retry_at timestamptznull
verified_at timestamptznull
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
verification_state smallintNOT NULL0
verification_started_at timestamptznull
snippet_project_id bigintnullprojects.id 1:N · CASCADE
snippet_organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_snippet_repositories_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_snippet_repositories_needs_verification
  • UNIQUE (disk_path) index_snippet_repositories_on_disk_path
  • (shard_id) index_snippet_repositories_on_shard_id
  • (snippet_organization_id) index_snippet_repositories_on_snippet_organization_id
  • (snippet_project_id) index_snippet_repositories_on_snippet_project_id
  • (verified_at) WHERE verification_state = 0 index_snippet_repositories_pending_verification
  • (verification_state) index_snippet_repositories_verification_state

Referenced by

Table checks: num_nonnulls(snippet_organization_id, snippet_project_id) = 1; char_length(verification_failure) <= 255

snippet_repository_states

11 cols · no RLS · line 31488View in 3D
  • Nullable foreign key snippet_organization_idsnippet_repository_states.snippet_organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key snippet_project_idsnippet_repository_states.snippet_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
snippet_repository_id bigintNOT NULLsnippet_repositories.snippet_id 1:1 · CASCADE
verification_state smallintNOT NULL0
verification_retry_count smallintnull0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
snippet_project_id bigintnullprojects.id 1:N · CASCADE
snippet_organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_snippet_repository_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_snippet_repository_states_needs_verification
  • (snippet_organization_id) index_snippet_repository_states_on_snippet_organization_id
  • (snippet_project_id) index_snippet_repository_states_on_snippet_project_id
  • UNIQUE (snippet_repository_id) index_snippet_repository_states_on_snippet_repository_id
  • (verification_state) index_snippet_repository_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_snippet_repository_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255; num_nonnulls(snippet_organization_id, snippet_project_id) = 1

snippet_repository_storage_moves

10 cols · no RLS · line 31513View in 3D
  • Nullable foreign key snippet_project_idsnippet_repository_storage_moves.snippet_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key snippet_organization_idsnippet_repository_storage_moves.snippet_organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
snippet_id bigintNOT NULLsnippets.id 1:N · CASCADE
state smallintNOT NULL1
source_storage_name textNOT NULLCHECK char_length(source_storage_name) <= 255
destination_storage_name textNOT NULLCHECK char_length(destination_storage_name) <= 255
error_message textnullCHECK char_length(error_message) <= 256
snippet_project_id bigintnullprojects.id 1:N · CASCADE
snippet_organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (snippet_id) index_snippet_repository_storage_moves_on_snippet_id
  • (snippet_organization_id) index_snippet_repository_storage_moves_on_snippet_organization_
  • (snippet_project_id) index_snippet_repository_storage_moves_on_snippet_project_id
  • (state) WHERE state = ANY(ARRAY[2, 3]) index_snippet_repository_storage_moves_on_state

Referenced by

  • nothing

Table checks: num_nonnulls(snippet_organization_id, snippet_project_id) = 1; char_length(error_message) <= 256; char_length(destination_storage_name) <= 255; char_length(source_storage_name) <= 255

snippet_statistics

6 cols · no RLS · line 31539View in 3D
  • Nullable foreign key snippet_organization_idsnippet_statistics.snippet_organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key snippet_project_idsnippet_statistics.snippet_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
snippet_id PKbigintNOT NULLsnippets.id 1:1 · CASCADE
repository_size bigintNOT NULL0
file_count bigintNOT NULL0
commit_count bigintNOT NULL0
snippet_project_id bigintnullprojects.id 1:N · CASCADE
snippet_organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (snippet_organization_id) index_snippet_statistics_on_snippet_organization_id
  • (snippet_project_id) index_snippet_statistics_on_snippet_project_id

Referenced by

  • nothing

Table checks: num_nonnulls(snippet_organization_id, snippet_project_id) = 1

snippet_uploads

16 cols · no RLS · line 31549View in 3D
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLnextval(CAST('uploads_id_seq' AS regclass))
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnull
organization_id bigintnullCHECK organization_id IS NOT NULL
namespace_id bigintnull
project_id bigintnull
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • UNIQUE (id) idx_snippet_uploads_on_id
  • (checksum) snippet_uploads_checksum_idx
  • (model_id, model_type, uploader, created_at) snippet_uploads_model_id_model_type_uploader_created_at_idx
  • (namespace_id) snippet_uploads_namespace_id_idx
  • (organization_id) snippet_uploads_organization_id_idx
  • (project_id) snippet_uploads_project_id_idx
  • (store) snippet_uploads_store_idx
  • (uploaded_by_user_id) snippet_uploads_uploaded_by_user_id_idx
  • (uploader, path) snippet_uploads_uploader_path_idx

Referenced by

Table checks: char_length(path) <= 511; char_length(checksum) <= 64; organization_id IS NOT NULL

snippet_user_mentions

8 cols · no RLS · line 31571View in 3D
  • Nullable foreign key snippet_project_idsnippet_user_mentions.snippet_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key snippet_organization_idsnippet_user_mentions.snippet_organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key note_idsnippet_user_mentions.note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK snippet_project_id, snippet_organization_id, note_idsnippet_user_mentions has several nullable FKs (snippet_project_id, snippet_organization_id, note_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
snippet_id bigintNOT NULLsnippets.id 1:N · CASCADE
mentioned_users_ids bigint[]null
mentioned_projects_ids bigint[]null
mentioned_groups_ids bigint[]null
note_id bigintnullnotes.id 1:N · CASCADE
snippet_project_id bigintnullprojects.id 1:N · CASCADE
snippet_organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • UNIQUE (note_id) WHERE note_id IS NOT NULL index_snippet_user_mentions_on_note_id
  • (snippet_organization_id) index_snippet_user_mentions_on_snippet_organization_id
  • (snippet_project_id) index_snippet_user_mentions_on_snippet_project_id
  • UNIQUE (snippet_id, note_id) snippet_user_mentions_on_snippet_id_and_note_id_index
  • UNIQUE (snippet_id) WHERE note_id IS NULL snippet_user_mentions_on_snippet_id_index

Referenced by

  • nothing

Table checks: num_nonnulls(snippet_organization_id, snippet_project_id) = 1

pm 10 tables

Tables whose names start with pm_.

Entity-relationship diagram: pm_advisories, pm_affected_packages, pm_checkpoints, pm_cve_enrichment, pm_licenses, pm_malware_advisories, pm_malware_affected_packages, pm_package_version_licenses, pm_package_versions, pm_packagespm_advisoriesid PKbigintadvisory_xidtextpublished_datedatecreated_attimestamptzupdated_attimestamptzsource_xidsmallinttitletextdescriptiontextcvss_v2textcvss_v3texturlstext[]identifiersjsonbcvetextcvss_v4textpm_affected_packagesid PKbigintpm_advisory_id FKbigintcreated_attimestamptzupdated_attimestamptzpurl_typesmallintpackage_nametextdistro_versiontextsolutiontextaffected_rangetextfixed_versionstext[]overridden_advisory_fieldsjsonbversionsjsonbpm_checkpointssequenceintegercreated_attimestamptzupdated_attimestamptzpurl_typesmallintchunksmallintdata_typesmallintversion_formatsmallintid PKbigintfull_sync_target_sequenceintegerpm_cve_enrichmentid PKbigintepss_scoredouble precisioncreated_attimestamptzupdated_attimestamptzcvetextis_known_exploitbooleanpm_licensesid PKbigintspdx_identifiertextcreated_attimestamptzupdated_attimestamptzpm_malware_advisoriesid PKbigintcreated_attimestamptzupdated_attimestamptzpublished_datedatewithdrawn_datedatesource_xidsmallintadvisory_xidtexttitletextdescriptiontextidentifiersjsonburlstext[]pm_malware_affected_packagesid PKbigintpm_malware_advisory_id FKbigintcreated_attimestamptzupdated_attimestamptzpurl_typesmallintpackage_nametextaffected_rangetextpm_package_version_licensespm_package_version_id FKbigintpm_license_id FKbigintcreated_attimestamptzupdated_attimestamptzid PKbigintpm_package_versionsid PKbigintpm_package_id FKbigintversiontextcreated_attimestamptzupdated_attimestamptzpm_packagesid PKbigintpurl_typesmallintnametextcreated_attimestamptzupdated_attimestamptzlicensesjsonbpm_advisory_idpm_malware_advisory_idpm_package_idpm_package_version_idpm_license_id

Relationships

pm_advisories

14 cols · no RLS · line 27629View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
advisory_xid textNOT NULLCHECK char_length(advisory_xid) <= 36
published_date dateNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
source_xid smallintNOT NULL
title textnullCHECK char_length(title) <= 256
description textnullCHECK char_length(description) <= 8192
cvss_v2 textnullCHECK char_length(cvss_v2) <= 128
cvss_v3 textnullCHECK char_length(cvss_v3) <= 128
urls text[]nullCAST('{}' AS text[])CHECK cardinality(urls) <= 20
identifiers jsonbNOT NULL
cve textnullCHECK char_length(cve) <= 24
cvss_v4 textnullCHECK char_length(cvss_v4) <= 180

Indexes

  • UNIQUE (advisory_xid, source_xid) index_pm_advisories_on_advisory_xid_and_source_xid
  • (cve) index_pm_advisories_on_cve
  • (identifiers) index_pm_advisories_on_identifiers

Referenced by

Table checks: char_length(cvss_v2) <= 128; char_length(advisory_xid) <= 36; char_length(cve) <= 24; char_length(cvss_v3) <= 128; char_length(title) <= 256; char_length(description) <= 8192; cardinality(urls) <= 20; char_length(cvss_v4) <= 180

pm_affected_packages

12 cols · no RLS · line 27662View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
pm_advisory_id bigintNOT NULLpm_advisories.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
purl_type smallintNOT NULL
package_name textNOT NULLCHECK char_length(package_name) <= 256
distro_version textNOT NULLCAST('' AS text)CHECK char_length(distro_version) <= 256
solution textnullCHECK char_length(solution) <= 2048
affected_range textNOT NULLCHECK char_length(affected_range) <= 512
fixed_versions text[]nullCAST('{}' AS text[])CHECK cardinality(fixed_versions) <= 10
overridden_advisory_fields jsonbNOT NULLCAST('{}' AS jsonb)
versions jsonbNOT NULLCAST('[]' AS jsonb)

Indexes

  • UNIQUE (pm_advisory_id, purl_type, package_name, distro_version) i_affected_packages_unique_for_upsert
  • (pm_advisory_id) index_pm_affected_packages_on_pm_advisory_id
  • (purl_type, package_name) index_pm_affected_packages_on_purl_type_and_package_name

Referenced by

  • nothing

Table checks: char_length(package_name) <= 256; char_length(affected_range) <= 512; char_length(solution) <= 2048; char_length(distro_version) <= 256; cardinality(fixed_versions) <= 10

pm_checkpoints

9 cols · no RLS · line 27691View in 3D
  • Isolated tablepm_checkpoints references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
sequence integerNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
purl_type smallintNOT NULL
chunk smallintNOT NULL
data_type smallintNOT NULL1
version_format smallintNOT NULL1
id PKbigintNOT NULL
full_sync_target_sequence integernull

Indexes

  • UNIQUE (purl_type, data_type, version_format) pm_checkpoints_path_components

Referenced by

  • nothing

pm_cve_enrichment

6 cols · no RLS · line 27712View in 3D
  • Isolated tablepm_cve_enrichment references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
epss_score double precisionNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
cve textNOT NULLCHECK char_length(cve) <= 24
is_known_exploit booleanNOT NULLFALSE

Indexes

  • UNIQUE (cve) index_pm_cve_enrichment_on_cve
  • (updated_at, id) index_pm_cve_enrichment_on_updated_at_and_id

Referenced by

  • nothing

Table checks: char_length(cve) <= 24

pm_licenses

4 cols · no RLS · line 27731View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
spdx_identifier textNOT NULLCHECK char_length(spdx_identifier) <= 50
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()

Indexes

  • UNIQUE (spdx_identifier) i_pm_licenses_on_spdx_identifier

Referenced by

Table checks: char_length(spdx_identifier) <= 50

pm_malware_advisories

11 cols · no RLS · line 27748View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
published_date dateNOT NULL
withdrawn_date datenull
source_xid smallintNOT NULL
advisory_xid textNOT NULLCHECK char_length(advisory_xid) <= 36
title textnullCHECK char_length(title) <= 2048
description textnullCHECK char_length(description) <= 10000
identifiers jsonbNOT NULLCAST('[]' AS jsonb)
urls text[]NOT NULLCAST('{}' AS text[])

Indexes

  • UNIQUE (advisory_xid, source_xid) i_pm_malware_advisories_xid_source

Referenced by

Table checks: char_length(title) <= 2048; char_length(description) <= 10000; char_length(advisory_xid) <= 36

pm_malware_affected_packages

7 cols · no RLS · line 27774View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
pm_malware_advisory_id bigintNOT NULLpm_malware_advisories.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
purl_type smallintNOT NULL
package_name textNOT NULLCHECK char_length(package_name) <= 512
affected_range textNOT NULLCHECK char_length(affected_range) <= 10000

Indexes

  • (purl_type, package_name) i_pm_malware_affected_packages_on_purl_type_and_package_name
  • UNIQUE (pm_malware_advisory_id, purl_type, package_name) i_pm_malware_affected_packages_unique_for_upsert

Referenced by

  • nothing

Table checks: char_length(package_name) <= 512; char_length(affected_range) <= 10000

pm_package_version_licenses

5 cols · no RLS · line 27795View in 3D
ColumnTypeNullDefaultReferencesNotes
pm_package_version_id bigintNOT NULLpm_package_versions.id 1:N · CASCADE
pm_license_id bigintNOT NULLpm_licenses.id 1:N · CASCADE
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
id PKbigintNOT NULL

Indexes

  • UNIQUE (pm_package_version_id, pm_license_id) i_pm_package_version_licenses_join_ids
  • (pm_license_id) index_pm_package_version_licenses_on_pm_license_id
  • (pm_package_version_id) index_pm_package_version_licenses_on_pm_package_version_id

Referenced by

  • nothing

pm_package_versions

5 cols · no RLS · line 27812View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
pm_package_id bigintNOT NULLpm_packages.id 1:N · CASCADE
version textNOT NULLCHECK char_length(version) <= 255
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()

Indexes

  • UNIQUE (pm_package_id, version) i_pm_package_versions_on_package_id_and_version
  • (pm_package_id) index_pm_package_versions_on_pm_package_id

Referenced by

Table checks: char_length(version) <= 255

pm_packages

6 cols · no RLS · line 27830View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
purl_type smallintNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
licenses jsonbnull

Indexes

  • UNIQUE (purl_type, name) i_pm_packages_purl_type_and_name

Referenced by

Table checks: char_length(name) <= 255

postgres 4 tables

Tables whose names start with postgres_.

Entity-relationship diagram: postgres_async_foreign_key_validations, postgres_async_indexes, postgres_reindex_actions, postgres_reindex_queued_actionspostgres_async_foreign_key_validationsid PKbigintcreated_attimestamptzupdated_attimestamptznametexttable_nametextlast_errortextattemptsintegerconstraint_typesmallintpostgres_async_indexesid PKbigintcreated_attimestamptzupdated_attimestamptznametextdefinitiontexttable_nametextattemptsintegerlast_errortextpostgres_reindex_actionsid PKbigintaction_starttimestamptzaction_endtimestamptzondisk_size_bytes_startbigintondisk_size_bytes_endbigintstatesmallintindex_identifiertextbloat_estimate_bytes_startbigintpostgres_reindex_queued_actionsid PKbigintindex_identifiertextstatesmallintcreated_attimestamptzupdated_attimestamptz

Relationships

No foreign keys in this domain.

postgres_async_foreign_key_validations

8 cols · no RLS · line 27868View in 3D
  • Isolated tablepostgres_async_foreign_key_validations references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 63
table_name textNOT NULLCHECK char_length(table_name) <= 127
last_error textnullCHECK char_length(last_error) <= 10000
attempts integerNOT NULL0
constraint_type smallintNOT NULL0

Indexes

  • UNIQUE (name, table_name) unique_postgres_async_fk_validations_name_and_table_name

Referenced by

  • nothing

Table checks: char_length(last_error) <= 10000; char_length(name) <= 63; char_length(table_name) <= 127

postgres_async_indexes

8 cols · no RLS · line 27891View in 3D
  • Isolated tablepostgres_async_indexes references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 63
definition textNOT NULLCHECK char_length(definition) <= 2048
table_name textNOT NULLCHECK char_length(table_name) <= 127
attempts integerNOT NULL0
last_error textnullCHECK char_length(last_error) <= 10000

Indexes

  • UNIQUE (name) index_postgres_async_indexes_on_name

Referenced by

  • nothing

Table checks: char_length(definition) <= 2048; char_length(last_error) <= 10000; char_length(name) <= 63; char_length(table_name) <= 127

postgres_reindex_actions

8 cols · no RLS · line 28161View in 3D
  • Isolated tablepostgres_reindex_actions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
action_start timestamptzNOT NULL
action_end timestamptznull
ondisk_size_bytes_start bigintNOT NULL
ondisk_size_bytes_end bigintnull
state smallintNOT NULL0
index_identifier textNOT NULLCHECK char_length(index_identifier) <= 255
bloat_estimate_bytes_start bigintnull

Indexes

  • (index_identifier) index_postgres_reindex_actions_on_index_identifier

Referenced by

  • nothing

Table checks: char_length(index_identifier) <= 255

postgres_reindex_queued_actions

5 cols · no RLS · line 28182View in 3D
  • Isolated tablepostgres_reindex_queued_actions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
index_identifier textNOT NULLCHECK char_length(index_identifier) <= 255
state smallintNOT NULL0
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()

Indexes

  • (state) index_postgres_reindex_queued_actions_on_state

Referenced by

  • nothing

Table checks: char_length(index_identifier) <= 255

protected 9 tables

Tables whose names start with protected_.

Entity-relationship diagram: protected_branch_merge_access_levels, protected_branch_push_access_levels, protected_branch_unprotect_access_levels, protected_branches, protected_environment_approval_rules, protected_environment_deploy_access_levels, protected_environments, protected_tag_create_access_levels, protected_tagsprotected_branch_merge_access_levelsid PKbigintprotected_branch_id FKbigintaccess_levelintegercreated_attimestampupdated_attimestampuser_id FKbigintgroup_id FKbigintprotected_branch_project_id FKbigintprotected_branch_namespace_id FKbigintmember_role_id FKbigintprotected_branch_push_access_levelsid PKbigintprotected_branch_id FKbigintaccess_levelintegercreated_attimestampupdated_attimestampuser_id FKbigintgroup_id FKbigintdeploy_key_id FKbigintprotected_branch_project_id FKbigintprotected_branch_namespace_id FKbigintmember_role_id FKbigintprotected_branch_unprotect_access_levelsid PKbigintprotected_branch_id FKbigintaccess_levelintegeruser_id FKbigintgroup_id FKbigintprotected_branch_project_id FKbigintprotected_branch_namespace_id FKbigintmember_role_id FKbigintprotected_branchesid PKbigintproject_id FKbigintnamevarcharcreated_attimestampupdated_attimestampcode_owner_approval_requiredbooleanallow_force_pushbooleannamespace_id FKbigintprotected_environment_approval_rulesid PKbigintprotected_environment_id FKbigintuser_id FKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzaccess_levelsmallintrequired_approvalssmallintgroup_inheritance_typesmallintprotected_environment_project_id FKbigintprotected_environment_group_id FKbigintprotected_environment_deploy_access_levelsid PKbigintcreated_attimestamptzupdated_attimestamptzaccess_levelintegerprotected_environment_id FKbigintuser_id FKbigintgroup_id FKbigintgroup_inheritance_typesmallintprotected_environment_project_id FKbigintprotected_environment_group_id FKbigintprotected_environmentsid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptznamevarchargroup_id FKbigintrequired_approval_countintegerprotected_tag_create_access_levelsid PKbigintprotected_tag_id FKbigintaccess_levelintegeruser_id FKbigintgroup_id FKbigintcreated_attimestampupdated_attimestampdeploy_key_id FKbigintproject_id FKbigintprotected_tagsid PKbigintproject_id FKbigintnamevarcharcreated_attimestampupdated_attimestampkeysmember_rolesnamespacesprojectsusersproject_idnamespace_idgroup_idproject_idproject_idprotected_branch_project_idprotected_branch_idgroup_idmember_role_idprotected_branch_namespace_iduser_iddeploy_key_idprotected_branch_namespace_idgroup_idmember_role_idprotected_branch_idprotected_branch_project_iduser_idprotected_branch_project_idprotected_branch_namespace_idmember_role_iduser_idgroup_idprotected_branch_idprotected_environment_group_idgroup_iduser_idprotected_environment_project_idprotected_environment_idprotected_environment_group_idprotected_environment_project_idgroup_iduser_idprotected_environment_iddeploy_key_idproject_idgroup_idprotected_tag_iduser_id

Relationships

protected_branch_merge_access_levels

10 cols · no RLS · line 29512View in 3D
  • Nullable foreign key protected_branch_project_idprotected_branch_merge_access_levels.protected_branch_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idprotected_branch_merge_access_levels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key member_role_idprotected_branch_merge_access_levels.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key protected_branch_namespace_idprotected_branch_merge_access_levels.protected_branch_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idprotected_branch_merge_access_levels.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK protected_branch_project_id, group_id, member_role_id, protected_branch_namespace_id, user_idprotected_branch_merge_access_levels has several nullable FKs (protected_branch_project_id, group_id, member_role_id, protected_branch_namespace_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
protected_branch_id bigintNOT NULLprotected_branches.id 1:N · CASCADE
access_level integernull40
created_at timestampNOT NULL
updated_at timestampNOT NULL
user_id bigintnullusers.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
protected_branch_project_id bigintnullprojects.id 1:N · CASCADE
protected_branch_namespace_id bigintnullnamespaces.id 1:N · CASCADE
member_role_id bigintnullmember_roles.id 1:N · RESTRICT

Indexes

  • (protected_branch_namespace_id) idx_protected_branch_merge_access_levels_protected_branch_names
  • (protected_branch_project_id) idx_protected_branch_merge_access_levels_protected_branch_proje
  • (protected_branch_id) index_protected_branch_merge_access
  • (group_id) index_protected_branch_merge_access_levels_on_group_id
  • (member_role_id) index_protected_branch_merge_access_levels_on_member_role_id
  • (user_id) index_protected_branch_merge_access_levels_on_user_id

Referenced by

  • nothing

Table checks: num_nonnulls(protected_branch_namespace_id, protected_branch_project_id) = 1

protected_branch_push_access_levels

11 cols · no RLS · line 29535View in 3D
  • Nullable foreign key deploy_key_idprotected_branch_push_access_levels.deploy_key_id may be NULL, so the relationship to keys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key protected_branch_namespace_idprotected_branch_push_access_levels.protected_branch_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idprotected_branch_push_access_levels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key member_role_idprotected_branch_push_access_levels.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key protected_branch_project_idprotected_branch_push_access_levels.protected_branch_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idprotected_branch_push_access_levels.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK deploy_key_id, protected_branch_namespace_id, group_id, member_role_id, protected_branch_project_id, user_idprotected_branch_push_access_levels has several nullable FKs (deploy_key_id, protected_branch_namespace_id, group_id, member_role_id, protected_branch_project_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
protected_branch_id bigintNOT NULLprotected_branches.id 1:N · CASCADE
access_level integernull40
created_at timestampNOT NULL
updated_at timestampNOT NULL
user_id bigintnullusers.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
deploy_key_id bigintnullkeys.id 1:N · CASCADE
protected_branch_project_id bigintnullprojects.id 1:N · CASCADE
protected_branch_namespace_id bigintnullnamespaces.id 1:N · CASCADE
member_role_id bigintnullmember_roles.id 1:N · RESTRICT

Indexes

  • (deploy_key_id) index_deploy_key_id_on_protected_branch_push_access_levels
  • (protected_branch_id) index_protected_branch_push_access
  • (group_id) index_protected_branch_push_access_levels_on_group_id
  • (member_role_id) index_protected_branch_push_access_levels_on_member_role_id
  • (protected_branch_namespace_id) index_protected_branch_push_access_levels_on_protected_branch_n
  • (protected_branch_project_id) index_protected_branch_push_access_levels_on_protected_branch_p
  • (user_id) index_protected_branch_push_access_levels_on_user_id

Referenced by

  • nothing

Table checks: num_nonnulls(protected_branch_namespace_id, protected_branch_project_id) = 1

protected_branch_unprotect_access_levels

8 cols · no RLS · line 29559View in 3D
  • Nullable foreign key protected_branch_project_idprotected_branch_unprotect_access_levels.protected_branch_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key protected_branch_namespace_idprotected_branch_unprotect_access_levels.protected_branch_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key member_role_idprotected_branch_unprotect_access_levels.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idprotected_branch_unprotect_access_levels.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idprotected_branch_unprotect_access_levels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK protected_branch_project_id, protected_branch_namespace_id, member_role_id, user_id, group_idprotected_branch_unprotect_access_levels has several nullable FKs (protected_branch_project_id, protected_branch_namespace_id, member_role_id, user_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
protected_branch_id bigintNOT NULLprotected_branches.id 1:N · CASCADE
access_level integernull40
user_id bigintnullusers.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
protected_branch_project_id bigintnullprojects.id 1:N · CASCADE
protected_branch_namespace_id bigintnullnamespaces.id 1:N · CASCADE
member_role_id bigintnullmember_roles.id 1:N · RESTRICT

Indexes

  • (protected_branch_namespace_id) i_protected_branch_unprotect_access_levels_protected_branch_nam
  • (protected_branch_project_id) i_protected_branch_unprotect_access_levels_protected_branch_pro
  • (member_role_id) idx_protected_branch_unprotect_access_levels_on_member_role_id
  • (protected_branch_id) index_protected_branch_unprotect_access
  • (group_id) index_protected_branch_unprotect_access_levels_on_group_id
  • (user_id) index_protected_branch_unprotect_access_levels_on_user_id

Referenced by

  • nothing

Table checks: num_nonnulls(protected_branch_namespace_id, protected_branch_project_id) = 1

protected_branches

8 cols · no RLS · line 29580View in 3D
  • Nullable foreign key project_idprotected_branches.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idprotected_branches.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
name varcharNOT NULL
created_at timestampnull
updated_at timestampnull
code_owner_approval_required booleanNOT NULLFALSE
allow_force_push booleanNOT NULLFALSE
namespace_id bigintnullnamespaces.id 1:N · CASCADE

Indexes

  • (project_id, code_owner_approval_required) WHERE code_owner_approval_required = TRUE code_owner_approval_required
  • (namespace_id) WHERE namespace_id IS NOT NULL index_protected_branches_namespace_id
  • (project_id) index_protected_branches_on_project_id

Referenced by

Table checks: project_id IS NULL <> namespace_id IS NULL

protected_environment_approval_rules

11 cols · no RLS · line 29601View in 3D
  • Nullable foreign key protected_environment_group_idprotected_environment_approval_rules.protected_environment_group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idprotected_environment_approval_rules.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idprotected_environment_approval_rules.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key protected_environment_project_idprotected_environment_approval_rules.protected_environment_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK protected_environment_group_id, group_id, user_id, protected_environment_project_idprotected_environment_approval_rules has several nullable FKs (protected_environment_group_id, group_id, user_id, protected_environment_project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
protected_environment_id bigintNOT NULLprotected_environments.id 1:N · CASCADE
user_id bigintnullusers.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
access_level smallintnull
required_approvals smallintNOT NULLCHECK required_approvals > 0
group_inheritance_type smallintNOT NULL0
protected_environment_project_id bigintnullprojects.id 1:N · CASCADE
protected_environment_group_id bigintnullnamespaces.id 1:N · CASCADE

Indexes

  • (protected_environment_id) index_approval_rule_on_protected_environment_id
  • (required_approvals, created_at) index_pe_approval_rules_on_required_approvals_and_created_at
  • (group_id) index_protected_environment_approval_rules_on_group_id
  • (user_id) index_protected_environment_approval_rules_on_user_id
  • (protected_environment_group_id) index_protected_environment_group_id_of_protected_environment_a
  • (protected_environment_project_id) index_protected_environment_project_id_of_protected_environment

Referenced by

Table checks: num_nonnulls(protected_environment_group_id, protected_environment_project_id) = 1; (access_level IS NOT NULL AND group_id IS NULL AND user_id IS NULL) OR (user_id IS NOT NULL AND access_level IS NULL AND group_id IS NULL) OR (group_id IS NOT NULL AND user_id IS NULL AND access_level IS NULL); required_approvals > 0

protected_environment_deploy_access_levels

10 cols · no RLS · line 29627View in 3D
  • Nullable foreign key protected_environment_group_idprotected_environment_deploy_access_levels.protected_environment_group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key protected_environment_project_idprotected_environment_deploy_access_levels.protected_environment_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idprotected_environment_deploy_access_levels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idprotected_environment_deploy_access_levels.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK protected_environment_group_id, protected_environment_project_id, group_id, user_idprotected_environment_deploy_access_levels has several nullable FKs (protected_environment_group_id, protected_environment_project_id, group_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
access_level integernull
protected_environment_id bigintNOT NULLprotected_environments.id 1:N · CASCADE
user_id bigintnullusers.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
group_inheritance_type smallintNOT NULL0
protected_environment_project_id bigintnullprojects.id 1:N · CASCADE
protected_environment_group_id bigintnullnamespaces.id 1:N · CASCADE

Indexes

  • (protected_environment_group_id) index_for_protected_environment_group_id_of_protected_environme
  • (protected_environment_project_id) index_for_protected_environment_project_id_of_protected_environ
  • (protected_environment_id) index_protected_environment_deploy_access
  • (group_id) index_protected_environment_deploy_access_levels_on_group_id
  • (user_id) index_protected_environment_deploy_access_levels_on_user_id

Referenced by

  • nothing

Table checks: num_nonnulls(protected_environment_group_id, protected_environment_project_id) = 1; num_nonnulls(user_id, group_id, access_level) = 1

protected_environments

7 cols · no RLS · line 29651View in 3D
  • Nullable foreign key group_idprotected_environments.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idprotected_environments.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name varcharNOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADE
required_approval_count integerNOT NULL0CHECK required_approval_count >= 0

Indexes

  • (required_approval_count, created_at) index_protected_environments_on_approval_count_and_created_at
  • UNIQUE (group_id, name) WHERE group_id IS NOT NULL index_protected_environments_on_group_id_and_name
  • UNIQUE (project_id, name) index_protected_environments_on_project_id_and_name

Referenced by

Table checks: project_id IS NULL <> group_id IS NULL; required_approval_count >= 0

protected_tag_create_access_levels

9 cols · no RLS · line 29672View in 3D
  • Nullable foreign key deploy_key_idprotected_tag_create_access_levels.deploy_key_id may be NULL, so the relationship to keys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idprotected_tag_create_access_levels.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idprotected_tag_create_access_levels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idprotected_tag_create_access_levels.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK deploy_key_id, project_id, group_id, user_idprotected_tag_create_access_levels has several nullable FKs (deploy_key_id, project_id, group_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
protected_tag_id bigintNOT NULLprotected_tags.id 1:N · CASCADE
access_level integernull40
user_id bigintnullusers.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
created_at timestampNOT NULL
updated_at timestampNOT NULL
deploy_key_id bigintnullkeys.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (protected_tag_id) index_protected_tag_create_access
  • (deploy_key_id) index_protected_tag_create_access_levels_on_deploy_key_id
  • (group_id) index_protected_tag_create_access_levels_on_group_id
  • (project_id) index_protected_tag_create_access_levels_on_project_id
  • (user_id) index_protected_tag_create_access_levels_on_user_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

protected_tags

5 cols · no RLS · line 29694View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
name varcharNOT NULL
created_at timestampNOT NULL
updated_at timestampNOT NULL

Indexes

  • UNIQUE (project_id, name) index_protected_tags_on_project_id_and_name

Referenced by

push 2 tables

Tables whose names start with push_.

Entity-relationship diagram: push_event_payloads, push_rulespush_event_payloadscommit_countbigintactionsmallintref_typesmallintcommit_frombyteacommit_tobyteareftextcommit_titlevarchar(70)ref_countintegerevent_id PKbigintproject_id FKbigintpush_rulesid PKbigintcommit_message_regexvarchardeny_delete_tagbooleanproject_id FKbigintcreated_attimestampupdated_attimestampauthor_email_regexvarcharmember_checkbooleanfile_name_regexvarcharis_samplebooleanmax_file_sizeintegerprevent_secretsbooleanbranch_name_regexvarcharreject_unsigned_commitsbooleancommit_committer_checkbooleanregexp_uses_re2booleancommit_message_negative_regexvarcharreject_non_dco_commitsbooleancommit_committer_name_checkbooleanorganization_idbiginteventsprojectsproject_idevent_idproject_id

Relationships

push_event_payloads

10 cols · no RLS · line 29711View in 3D
  • Nullable foreign key project_idpush_event_payloads.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
commit_count bigintNOT NULL
action smallintNOT NULL
ref_type smallintNOT NULL
commit_from byteanull
commit_to byteanull
ref textnull
commit_title varchar(70)null
ref_count integernull
event_id PKbigintNOT NULLevents.id 1:1 · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_push_event_payloads_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

push_rules

20 cols · no RLS · line 29725View in 3D
  • Nullable foreign key project_idpush_rules.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
commit_message_regex varcharnullCHECK char_length(CAST(commit_message_regex AS text)) <= 511
deny_delete_tag booleannull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
created_at timestampnull
updated_at timestampnull
author_email_regex varcharnullCHECK char_length(CAST(author_email_regex AS text)) <= 511
member_check booleanNOT NULLFALSE
file_name_regex varcharnullCHECK char_length(CAST(file_name_regex AS text)) <= 511
is_sample booleannullFALSE
max_file_size integerNOT NULL0
prevent_secrets booleanNOT NULLFALSE
branch_name_regex varcharnullCHECK char_length(CAST(branch_name_regex AS text)) <= 511
reject_unsigned_commits booleannull
commit_committer_check booleannull
regexp_uses_re2 booleannullTRUE
commit_message_negative_regex varcharnullCHECK char_length(CAST(commit_message_negative_regex AS text)) <= 2047
reject_non_dco_commits booleannull
commit_committer_name_check booleanNOT NULLFALSE
organization_id bigintnull

Indexes

  • (is_sample) WHERE is_sample index_push_rules_on_is_sample
  • (organization_id) index_push_rules_on_organization_id
  • (project_id) index_push_rules_on_project_id

Referenced by

Table checks: char_length(CAST(author_email_regex AS text)) <= 511; char_length(CAST(branch_name_regex AS text)) <= 511; char_length(CAST(commit_message_negative_regex AS text)) <= 2047; char_length(CAST(commit_message_regex AS text)) <= 511; char_length(CAST(file_name_regex AS text)) <= 511; project_id IS NOT NULL

requirements 2 tables

Tables whose names start with requirements_.

Entity-relationship diagram: requirements, requirements_management_test_reportsrequirementsid PKbigintproject_id FKbigintiidintegerissue_id FKbigintrequirements_management_test_reportsid PKbigintcreated_attimestamptzauthor_id FKbigintstatesmallintbuild_idbigintissue_id FKbigintuses_legacy_iidbooleanproject_id FKbigintissuesprojectsusersissue_idproject_idproject_idissue_idauthor_id

Relationships

requirements

4 cols · no RLS · line 29966View in 3D
  • Nullable foreign key issue_idrequirements.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
iid integerNOT NULL
issue_id bigintnullissues.id 1:1 · CASCADECHECK issue_id IS NOT NULL

Indexes

  • UNIQUE (issue_id) index_requirements_on_issue_id
  • (project_id) index_requirements_on_project_id
  • UNIQUE (project_id, iid) WHERE project_id IS NOT NULL index_requirements_on_project_id_and_iid

Referenced by

  • nothing

Table checks: issue_id IS NOT NULL

requirements_management_test_reports

8 cols · no RLS · line 29983View in 3D
  • Nullable foreign key project_idrequirements_management_test_reports.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key issue_idrequirements_management_test_reports.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key author_idrequirements_management_test_reports.author_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, issue_id, author_idrequirements_management_test_reports has several nullable FKs (project_id, issue_id, author_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
author_id bigintnullusers.id 1:N · SET NULL
state smallintNOT NULL
build_id bigintnull
issue_id bigintnullissues.id 1:N · CASCADE
uses_legacy_iid booleanNOT NULLTRUE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (issue_id, created_at, id) idx_test_reports_on_issue_id_created_at_and_id
  • (author_id) index_requirements_management_test_reports_on_author_id
  • (build_id) index_requirements_management_test_reports_on_build_id
  • (issue_id) index_requirements_management_test_reports_on_issue_id
  • (project_id) index_requirements_management_test_reports_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

resource 6 tables

Tables whose names start with resource_.

Entity-relationship diagram: resource_iteration_events, resource_label_events, resource_link_events, resource_milestone_events, resource_state_events, resource_weight_eventsresource_iteration_eventsid PKbigintuser_id FKbigintissue_id FKbigintmerge_request_id FKbigintiteration_id FKbigintcreated_attimestamptzactionsmallintautomatedbooleantriggered_by_id FKbigintnamespace_id FKbigintresource_label_eventsid PKbigintactionintegerissue_id FKbigintmerge_request_id FKbigintepic_id FKbigintlabel_id FKbigintuser_id FKbigintcreated_attimestamptzreferencetextimported_fromsmallintnamespace_id FKbigintresource_link_eventsid PKbigintactionsmallintuser_id FKbigintissue_id FKbigintchild_work_item_id FKbigintcreated_attimestamptzsystem_note_metadata_id FKbigintnamespace_id FKbigintresource_milestone_eventsid PKbigintuser_id FKbigintissue_id FKbigintmerge_request_id FKbigintmilestone_id FKbigintactionsmallintstatesmallintcreated_attimestamptzimported_fromsmallintnamespace_id FKbigintresource_state_eventsid PKbigintuser_id FKbigintissue_id FKbigintmerge_request_id FKbigintcreated_attimestamptzstatesmallintepic_id FKbigintsource_committextclose_after_error_tracking_resolvebooleanclose_auto_resolve_prometheus_alertbooleansource_merge_request_id FKbigintimported_fromsmallintnamespace_id FKbigintresource_weight_eventsid PKbigintuser_id FKbigintissue_id FKbigintweightintegercreated_attimestamptzprevious_weightintegernamespace_id FKbigintepicsissueslabelsmerge_requestsmilestonesnamespacessprintssystem_note_metadatauserstriggered_by_idnamespace_iduser_idmerge_request_idissue_iditeration_idnamespace_idissue_idepic_idmerge_request_idlabel_iduser_idsystem_note_metadata_idnamespace_iduser_idchild_work_item_idissue_idnamespace_idmerge_request_idissue_idmilestone_iduser_idnamespace_idissue_idmerge_request_idsource_merge_request_idepic_iduser_idnamespace_idissue_iduser_id

Relationships

resource_iteration_events

10 cols · no RLS · line 30004View in 3D
  • Nullable foreign key triggered_by_idresource_iteration_events.triggered_by_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key merge_request_idresource_iteration_events.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key issue_idresource_iteration_events.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key iteration_idresource_iteration_events.iteration_id may be NULL, so the relationship to sprints is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK triggered_by_id, merge_request_id, issue_id, iteration_idresource_iteration_events has several nullable FKs (triggered_by_id, merge_request_id, issue_id, iteration_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · SET NULL
issue_id bigintnullissues.id 1:N · CASCADE
merge_request_id bigintnullmerge_requests.id 1:N · CASCADE
iteration_id bigintnullsprints.id 1:N · CASCADECHECK iteration_id IS NOT NULL
created_at timestamptzNOT NULL
action smallintNOT NULL
automated booleanNOT NULLFALSE
triggered_by_id bigintnullissues.id 1:N · SET NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • (triggered_by_id) i_resource_iteration_events_on_triggered_by_id
  • (namespace_id) idx_resource_iteration_events_on_namespace_id
  • (issue_id) index_resource_iteration_events_on_issue_id
  • (iteration_id) index_resource_iteration_events_on_iteration_id
  • (iteration_id) WHERE action = 1 index_resource_iteration_events_on_iteration_id_and_add_action
  • (merge_request_id) index_resource_iteration_events_on_merge_request_id
  • (user_id) index_resource_iteration_events_on_user_id

Referenced by

  • nothing

Table checks: iteration_id IS NOT NULL

resource_label_events

11 cols · no RLS · line 30027View in 3D
  • Nullable foreign key issue_idresource_label_events.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key epic_idresource_label_events.epic_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key merge_request_idresource_label_events.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key label_idresource_label_events.label_id may be NULL, so the relationship to labels is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idresource_label_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK issue_id, epic_id, merge_request_id, label_id, user_idresource_label_events has several nullable FKs (issue_id, epic_id, merge_request_id, label_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
action integerNOT NULL
issue_id bigintnullissues.id 1:N · CASCADE
merge_request_id bigintnullmerge_requests.id 1:N · CASCADE
epic_id bigintnullepics.id 1:N · CASCADE
label_id bigintnulllabels.id 1:N · SET NULL
user_id bigintnullusers.id 1:N · SET NULL
created_at timestamptzNOT NULL
reference textnull
imported_from smallintNOT NULL0
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • (issue_id, label_id, action) index_resource_label_events_issue_id_label_id_action
  • (epic_id) index_resource_label_events_on_epic_id
  • (label_id, action) index_resource_label_events_on_label_id_and_action
  • (merge_request_id, label_id, action) index_resource_label_events_on_merge_request_id_label_id_action
  • (namespace_id) index_resource_label_events_on_namespace_id
  • (user_id) index_resource_label_events_on_user_id

Referenced by

  • nothing

Table checks: num_nonnulls(epic_id, issue_id, merge_request_id) = 1

resource_milestone_events

10 cols · no RLS · line 30072View in 3D
  • Nullable foreign key merge_request_idresource_milestone_events.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key issue_idresource_milestone_events.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key milestone_idresource_milestone_events.milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idresource_milestone_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK merge_request_id, issue_id, milestone_id, user_idresource_milestone_events has several nullable FKs (merge_request_id, issue_id, milestone_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintnullusers.id 1:N · SET NULL
issue_id bigintnullissues.id 1:N · CASCADE
merge_request_id bigintnullmerge_requests.id 1:N · CASCADE
milestone_id bigintnullmilestones.id 1:N · CASCADE
action smallintNOT NULL
state smallintNOT NULL
created_at timestamptzNOT NULL
imported_from smallintNOT NULL0
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • (namespace_id) idx_resource_milestone_events_on_namespace_id
  • (created_at) index_resource_milestone_events_created_at
  • (issue_id) index_resource_milestone_events_on_issue_id
  • (merge_request_id) index_resource_milestone_events_on_merge_request_id
  • (milestone_id) index_resource_milestone_events_on_milestone_id
  • (milestone_id) WHERE action = 1 index_resource_milestone_events_on_milestone_id_and_add_action
  • (user_id) index_resource_milestone_events_on_user_id

Referenced by

  • nothing

Table checks: num_nonnulls(issue_id, merge_request_id) = 1

resource_state_events

13 cols · no RLS · line 30095View in 3D
  • Nullable foreign key issue_idresource_state_events.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key merge_request_idresource_state_events.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key source_merge_request_idresource_state_events.source_merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key epic_idresource_state_events.epic_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idresource_state_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK issue_id, merge_request_id, source_merge_request_id, epic_id, user_idresource_state_events has several nullable FKs (issue_id, merge_request_id, source_merge_request_id, epic_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintnullusers.id 1:N · SET NULL
issue_id bigintnullissues.id 1:N · CASCADE
merge_request_id bigintnullmerge_requests.id 1:N · CASCADE
created_at timestamptzNOT NULL
state smallintNOT NULL
epic_id bigintnullepics.id 1:N · CASCADE
source_commit textnullCHECK char_length(source_commit) <= 40
close_after_error_tracking_resolve booleanNOT NULLFALSE
close_auto_resolve_prometheus_alert booleanNOT NULLFALSE
source_merge_request_id bigintnullmerge_requests.id 1:N · SET NULL
imported_from smallintNOT NULL0
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • (epic_id) index_resource_state_events_on_epic_id
  • (issue_id, created_at) index_resource_state_events_on_issue_id_and_created_at
  • (merge_request_id) index_resource_state_events_on_merge_request_id
  • (namespace_id) index_resource_state_events_on_namespace_id
  • (source_merge_request_id) index_resource_state_events_on_source_merge_request_id
  • (user_id) index_resource_state_events_on_user_id

Referenced by

  • nothing

Table checks: num_nonnulls(epic_id, issue_id, merge_request_id) = 1; char_length(source_commit) <= 40

resource_weight_events

7 cols · no RLS · line 30122View in 3D
  • Nullable foreign key namespace_idresource_weight_events.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idresource_weight_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK namespace_id, user_idresource_weight_events has several nullable FKs (namespace_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintnullusers.id 1:N · SET NULL
issue_id bigintNOT NULLissues.id 1:N · CASCADE
weight integernull
created_at timestamptzNOT NULL
previous_weight integernull
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (issue_id, created_at) index_resource_weight_events_on_issue_id_and_created_at
  • (issue_id, weight) index_resource_weight_events_on_issue_id_and_weight
  • (namespace_id) index_resource_weight_events_on_namespace_id
  • (user_id) index_resource_weight_events_on_user_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

saml 2 tables

Tables whose names start with saml_.

Entity-relationship diagram: saml_group_links, saml_providerssaml_group_linksid PKbigintaccess_levelsmallintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzsaml_group_nametextmember_role_id FKbigintassign_duo_seatsbooleanscim_group_uiduuidprovidertextsaml_providersid PKbigintgroup_id FKbigintenabledbooleancertificate_fingerprintvarcharsso_urlvarcharenforced_ssobooleanenforced_group_managed_accountsbooleanprohibited_outer_forksbooleandefault_membership_rolesmallintgit_check_enforcedbooleanmember_role_id FKbigintdisable_password_authentication_for_enterprise_usersbooleanmember_rolesnamespacesmember_role_idgroup_idmember_role_idgroup_id

Relationships

saml_providers

12 cols · no RLS · line 30192View in 3D
  • Nullable foreign key member_role_idsaml_providers.member_role_id may be NULL, so the relationship to member_roles is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
enabled booleanNOT NULL
certificate_fingerprint varcharNOT NULL
sso_url varcharNOT NULL
enforced_sso booleanNOT NULLFALSE
enforced_group_managed_accounts booleanNOT NULLFALSE
prohibited_outer_forks booleanNOT NULLTRUE
default_membership_role smallintNOT NULL10
git_check_enforced booleanNOT NULLFALSE
member_role_id bigintnullmember_roles.id 1:N · SET NULL
disable_password_authentication_for_enterprise_users booleannullFALSE

Indexes

  • (group_id) index_saml_providers_on_group_id
  • (member_role_id) index_saml_providers_on_member_role_id

Referenced by

saved 2 tables

Tables whose names start with saved_.

Entity-relationship diagram: saved_replies, saved_viewssaved_repliesid PKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptznametextcontenttextsaved_viewsid PKbigintcreated_attimestamptzupdated_attimestamptznamespace_id FKbigintcreated_by_id FKbigintversionintegerprivatebooleannametextdescriptiontextsortsmallintfilter_datajsonbdisplay_settingsjsonblock_versionintegerupdated_by_id FKbigintnamespacesusersuser_idcreated_by_idupdated_by_idnamespace_id

Relationships

saved_replies

6 cols · no RLS · line 30216View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
content textNOT NULLCHECK char_length(content) <= 10000

Indexes

  • UNIQUE (user_id, name) index_saved_replies_on_name_text_pattern_ops

Referenced by

  • nothing

Table checks: char_length(content) <= 10000; char_length(name) <= 255

saved_views

14 cols · no RLS · line 30236View in 3D
  • Nullable foreign key created_by_idsaved_views.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key updated_by_idsaved_views.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK created_by_id, updated_by_idsaved_views has several nullable FKs (created_by_id, updated_by_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_by_id bigintnullusers.id 1:N · SET NULL
version integerNOT NULL
private booleanNOT NULLTRUE
name textNOT NULLCHECK char_length(name) <= 140
description textnullCHECK char_length(description) <= 140
sort smallintnull
filter_data jsonbnull
display_settings jsonbnull
lock_version integerNOT NULL0
updated_by_id bigintnullusers.id 1:N · SET NULL

Indexes

  • (created_by_id) index_saved_views_on_created_by_id
  • (description) index_saved_views_on_description_trigram
  • (name) index_saved_views_on_name_trigram
  • (namespace_id, name) index_saved_views_on_namespace_id_and_name
  • (namespace_id, private, created_by_id) index_saved_views_on_namespace_private_created_by
  • (private) index_saved_views_on_private
  • (updated_by_id) index_saved_views_on_updated_by_id

Referenced by

Table checks: char_length(name) <= 140; char_length(description) <= 140

sbom 10 tables

Tables whose names start with sbom_.

Entity-relationship diagram: sbom_component_versions, sbom_components, sbom_graph_paths, sbom_occurrence_refs, sbom_occurrences, sbom_occurrences_vulnerabilities, sbom_source_packages, sbom_sources, sbom_vulnerability_scan_results, sbom_vulnerability_scanssbom_component_versionsid PKbigintcreated_attimestamptzupdated_attimestamptzcomponent_id FKbigintversiontextsource_package_nametextorganization_idbigintsbom_componentsid PKbigintcreated_attimestamptzupdated_attimestamptzcomponent_typesmallintnametextpurl_typesmallintorganization_idbigintsbom_graph_pathsid PKbigintancestor_id FKbigintdescendant_id FKbigintproject_idbigintpath_lengthintegercreated_attimestamptzupdated_attimestamptztop_level_ancestorbooleansbom_occurrence_refsid PKbigintproject_idbigintsbom_occurrence_id FKbigintsecurity_project_tracked_context_id FKbigintcommit_shabyteapipeline_idbigintsbom_occurrencesid PKbigintcreated_attimestamptzupdated_attimestamptzcomponent_version_id FKbigintproject_idbigintpipeline_idbigintsource_id FKbigintcommit_shabyteacomponent_id FKbigintuuiduuidpackage_managertextcomponent_nametextinput_file_pathtextlicensesjsonbhighest_severitysmallintvulnerability_countintegersource_package_id FKbigintarchivedbooleantraversal_idsbigint[]ancestorsjsonbreachabilitysmallintpartition_idbigintsbom_occurrences_vulnerabilitiesid PKbigintsbom_occurrence_id FKbigintvulnerability_id FKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintvulnerability_occurrence_idbigintsbom_occurrence_ref_id FKbigintsbom_source_packagesid PKbigintnametextpurl_typesmallintcreated_attimestamptzupdated_attimestamptzorganization_idbigintsbom_sourcesid PKbigintcreated_attimestamptzupdated_attimestamptzsource_typesmallintsourcejsonborganization_idbigintsbom_vulnerability_scan_resultsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintresult_file_storesmallintresult_filetextsbom_vulnerability_scansid PKbigintcreated_attimestamptzupdated_attimestamptzproject_idbigintbuild_idbigintstatussmallintsbom_file_storesmallintresult_file_storesmallintsbom_filetextsbom_file_final_pathtextresult_filetexterror_messagetextsbom_vulnerability_scan_result_id FKbigintsbom_digesttextsecurity_project_tracked_contextsvulnerabilitiescomponent_idsbom_vulnerability_scan_result_idcomponent_version_idsource_package_idsource_idcomponent_idancestor_iddescendant_idsbom_occurrence_idsecurity_project_tracked_context_idvulnerability_idsbom_occurrence_ref_idsbom_occurrence_id

Relationships

sbom_component_versions

7 cols · no RLS · line 30264View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
component_id bigintNOT NULLsbom_components.id 1:N · CASCADE
version textNOT NULLCHECK char_length(version) <= 255
source_package_name textnullCHECK char_length(source_package_name) <= 255
organization_id bigintNOT NULL

Indexes

  • UNIQUE (component_id, version, organization_id) idx_sbom_comp_versions_on_comp_id_version_and_org_id
  • (organization_id) index_sbom_component_versions_on_organization_id

Referenced by

Table checks: char_length(source_package_name) <= 255; char_length(version) <= 255

sbom_components

7 cols · no RLS · line 30285View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
component_type smallintNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
purl_type smallintnull
organization_id bigintNOT NULL

Indexes

  • UNIQUE (name, purl_type, component_type, organization_id) idx_sbom_components_on_name_purl_type_component_type_and_org_id
  • (organization_id) index_sbom_components_on_organization_id

Referenced by

Table checks: char_length(name) <= 255

sbom_graph_paths

8 cols · no RLS · line 30305View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
ancestor_id bigintNOT NULLsbom_occurrences.id 1:N · CASCADE
descendant_id bigintNOT NULLsbom_occurrences.id 1:N · CASCADE
project_id bigintNOT NULL
path_length integerNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
top_level_ancestor booleanNOT NULLFALSE

Indexes

  • (project_id, created_at) idx_sbom_graph_paths_project_created
  • (project_id, path_length, created_at) idx_sbom_graph_paths_project_path_length_created
  • (ancestor_id) index_sbom_graph_paths_on_ancestor_id
  • (descendant_id) index_sbom_graph_paths_on_descendant_id
  • (descendant_id, created_at) WHERE top_level_ancestor = TRUE index_sbom_graph_paths_on_descendant_id_created_at_top_level
  • (project_id, descendant_id) index_sbom_graph_paths_on_project_id_and_descendant_id
  • (project_id, id) index_sbom_graph_paths_on_project_id_and_id

Referenced by

  • nothing

sbom_occurrence_refs

6 cols · no RLS · line 30325View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
sbom_occurrence_id bigintNOT NULLsbom_occurrences.id 1:N · CASCADE
security_project_tracked_context_id bigintNOT NULLsecurity_project_tracked_contexts.id 1:N · CASCADE
commit_sha byteaNOT NULL
pipeline_id bigintnull

Indexes

  • UNIQUE (sbom_occurrence_id, security_project_tracked_context_id) idx_sbom_occurrence_refs_on_sbom_occ_id_and_tracked_context_id
  • (security_project_tracked_context_id) idx_sbom_occurrence_refs_on_sec_prj_trck_cnxt_id
  • (pipeline_id) index_sbom_occurrence_refs_on_pipeline_id
  • (project_id) index_sbom_occurrence_refs_on_project_id
  • (project_id, id) tmp_idx_sbom_occurrence_refs_on_project_id_id

Referenced by

sbom_occurrences

22 cols · no RLS · line 30343View in 3D
  • Nullable foreign key component_version_idsbom_occurrences.component_version_id may be NULL, so the relationship to sbom_component_versions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key source_package_idsbom_occurrences.source_package_id may be NULL, so the relationship to sbom_source_packages is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key source_idsbom_occurrences.source_id may be NULL, so the relationship to sbom_sources is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK component_version_id, source_package_id, source_idsbom_occurrences has several nullable FKs (component_version_id, source_package_id, source_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
component_version_id bigintnullsbom_component_versions.id 1:N · CASCADE
project_id bigintNOT NULL
pipeline_id bigintnull
source_id bigintnullsbom_sources.id 1:N · CASCADE
commit_sha byteaNOT NULL
component_id bigintNOT NULLsbom_components.id 1:N · CASCADE
uuid uuidNOT NULL
package_manager textnullCHECK char_length(package_manager) <= 255
component_name textnullCHECK char_length(component_name) <= 255
input_file_path textnullCHECK char_length(input_file_path) <= 1024
licenses jsonbnullCAST('[]' AS jsonb)
highest_severity smallintnull
vulnerability_count integerNOT NULL0
source_package_id bigintnullsbom_source_packages.id 1:N · CASCADE
archived booleanNOT NULLFALSE
traversal_ids bigint[]NOT NULLCAST('{}' AS bigint[])
ancestors jsonbNOT NULLCAST('[]' AS jsonb)
reachability smallintnull0
partition_id bigintnull1

Indexes

  • (project_id, component_version_id, input_file_path) idx_sbom_occurr_on_project_component_version_input_file_path
  • (project_id, source_id) idx_sbom_occurrences_on_project_id_and_source_id
  • (traversal_ids, highest_severity, component_id, component_version_id) WHERE archived = FALSE idx_unarchived_occurrences_for_aggregation_severity_nulls_first
  • (project_id, component_version_id, id) index_sbom_occurr_on_project_id_and_component_version_id_and_id
  • (component_id, id) index_sbom_occurrences_on_component_id_and_id
  • (component_version_id) index_sbom_occurrences_on_component_version_id
  • (project_id, highest_severity) index_sbom_occurrences_on_highest_severity
  • (project_id, licenses #> CAST('{0,spdx_identifier}' AS text[]), licenses #> CAST('{1,spdx_identifier}' AS text[])) index_sbom_occurrences_on_licenses_spdx_identifier
  • (component_name, traversal_ids, component_id) index_sbom_occurrences_on_name_traversal_ids_and_component
  • (pipeline_id) index_sbom_occurrences_on_pipeline_id
  • (project_id, component_id, id) index_sbom_occurrences_on_project_id_and_component_id_and_id
  • (project_id, id) index_sbom_occurrences_on_project_id_and_id
  • (project_id, package_manager) index_sbom_occurrences_on_project_id_and_package_manager
  • (source_id) index_sbom_occurrences_on_source_id
  • (traversal_ids, id) WHERE archived = FALSE index_sbom_occurrences_on_traversal_ids_and_id
  • (traversal_ids, package_manager) index_sbom_occurrences_on_traversal_ids_and_package_manager
  • UNIQUE (uuid) index_sbom_occurrences_on_uuid
  • (source_package_id, id) index_sbom_source_packages_on_source_package_id_and_id
  • (traversal_ids, component_name, component_id, component_version_id) WHERE archived = FALSE index_unarchived_occurrences_for_aggregations_component_name
  • (traversal_ids, (licenses -> 0) ->> CAST('spdx_identifier' AS text), component_id, component_version_id) WHERE archived = FALSE index_unarchived_occurrences_for_aggregations_license
  • (traversal_ids, package_manager, component_id, component_version_id) WHERE archived = FALSE index_unarchived_occurrences_for_aggregations_package_manager
  • (traversal_ids, highest_severity, component_id, component_version_id) WHERE archived = FALSE index_unarchived_occurrences_for_aggregations_severity
  • (component_version_id, traversal_ids) WHERE archived = FALSE index_unarchived_occurrences_on_version_id_and_traversal_ids
  • (traversal_ids, component_id, component_version_id) WHERE archived = FALSE index_unarchived_sbom_occurrences_for_aggregations

Referenced by

Table checks: char_length(package_manager) <= 255; char_length(component_name) <= 255; char_length(input_file_path) <= 1024

sbom_occurrences_vulnerabilities

8 cols · no RLS · line 30380View in 3D
  • Nullable foreign key sbom_occurrence_ref_idsbom_occurrences_vulnerabilities.sbom_occurrence_ref_id may be NULL, so the relationship to sbom_occurrence_refs is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
sbom_occurrence_id bigintNOT NULLsbom_occurrences.id 1:N · CASCADE
vulnerability_id bigintNOT NULLvulnerabilities.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintnullCHECK project_id IS NOT NULL
vulnerability_occurrence_id bigintnull
sbom_occurrence_ref_id bigintnullsbom_occurrence_refs.id 1:N · CASCADE

Indexes

  • UNIQUE (sbom_occurrence_id, vulnerability_id, project_id) i_sbom_occ_vulns_on_occ_id_vuln_id_and_project_id
  • (sbom_occurrence_ref_id) idx_sbom_occ_vulns_on_sbom_occurrence_ref_id
  • (vulnerability_occurrence_id) idx_sbom_occ_vulns_on_vulnerability_occurrence_id
  • (project_id) index_sbom_occurrences_vulnerabilities_on_project_id
  • (vulnerability_id) index_sbom_occurrences_vulnerabilities_on_vulnerability_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

sbom_source_packages

6 cols · no RLS · line 30401View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
purl_type smallintNOT NULL
created_at timestamptzNOT NULLnow()
updated_at timestamptzNOT NULLnow()
organization_id bigintNOT NULL

Indexes

  • UNIQUE (name, purl_type, organization_id) index_sbom_source_packages_on_name_and_purl_type_and_org_id
  • (organization_id) index_sbom_source_packages_on_organization_id

Referenced by

Table checks: char_length(name) <= 255

sbom_sources

6 cols · no RLS · line 30420View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
source_type smallintNOT NULL
source jsonbNOT NULLCAST('{}' AS jsonb)
organization_id bigintNOT NULL

Indexes

  • ((source -> CAST('package_manager' AS text)) ->> CAST('name' AS text)) index_on_sbom_sources_package_manager_name
  • (organization_id) index_sbom_sources_on_organization_id
  • UNIQUE (source_type, source, organization_id) index_sbom_sources_on_source_type_and_source_and_org_id

Referenced by

sbom_vulnerability_scan_results

6 cols · no RLS · line 30438View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
result_file_store smallintnull1
result_file textnullCHECK char_length(result_file) <= 255

Indexes

  • none

Referenced by

Table checks: char_length(result_file) <= 255

sbom_vulnerability_scans

14 cols · no RLS · line 30457View in 3D
  • Nullable foreign key sbom_vulnerability_scan_result_idsbom_vulnerability_scans.sbom_vulnerability_scan_result_id may be NULL, so the relationship to sbom_vulnerability_scan_results is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULL
build_id bigintNOT NULL
status smallintnull0
sbom_file_store smallintnull1
result_file_store smallintnull1
sbom_file textnullCHECK char_length(sbom_file) <= 255
sbom_file_final_path textnullCHECK char_length(sbom_file_final_path) <= 1024
result_file textnullCHECK char_length(result_file) <= 255
error_message textnullCHECK char_length(error_message) <= 1024
sbom_vulnerability_scan_result_id bigintnullsbom_vulnerability_scan_results.id 1:N · CASCADE
sbom_digest textnullCHECK char_length(sbom_digest) <= 1024

Indexes

  • (build_id) index_sbom_vulnerability_scans_on_build_id
  • (created_at) index_sbom_vulnerability_scans_on_created_at
  • (project_id, sbom_digest) index_sbom_vulnerability_scans_on_project_id_and_sbom_digest
  • (sbom_vulnerability_scan_result_id) index_sbom_vulnerability_scans_on_sbom_scan_result_id

Referenced by

  • nothing

Table checks: char_length(error_message) <= 1024; char_length(sbom_file_final_path) <= 1024; char_length(sbom_digest) <= 1024; char_length(result_file) <= 255; char_length(sbom_file) <= 255

scan 4 tables

Tables whose names start with scan_.

Entity-relationship diagram: scan_execution_policy_rules, scan_result_policies, scan_result_policy_violation_details, scan_result_policy_violationsscan_execution_policy_rulesid PKbigintsecurity_policy_id FKbigintsecurity_policy_management_project_id FKbigintcreated_attimestamptzupdated_attimestamptzrule_indexsmallinttypesmallintcontentjsonbscan_result_policiesid PKbigintsecurity_orchestration_policy_configuration_id FKbigintcreated_attimestamptzupdated_attimestamptzorchestration_policy_idxsmallintlicense_statestext[]match_on_inclusionbooleanrole_approversinteger[]age_valueintegerage_operatorsmallintage_intervalsmallintvulnerability_attributesjsonbproject_id FKbigintrule_idxsmallintproject_approval_settingsjsonbcommitssmallintsend_bot_messagejsonbfallback_behaviorjsonbpolicy_tuningjsonbaction_idxsmallintcustom_rolesbigint[]licensesjsonbnamespace_id FKbigintapproval_policy_rule_id FKbigintmalicious_rulebooleanscan_result_policy_violation_detailsid PKbigintscan_result_policy_violation_id FKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzpolicy_rule_typesmallintfinding_statesmallintfinding_uuidtextlicense_nametextdependenciestext[]commit_shastext[]metadatajsonbscan_result_policy_violationsid PKbigintscan_result_policy_id FKbigintmerge_request_id FKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzviolation_datajsonbapproval_policy_rule_id FKbigintstatussmallintapproval_policy_rulesmerge_requestsnamespacesprojectssecurity_orchestration_policy_configurationssecurity_policiessecurity_policy_management_project_idsecurity_policy_idapproval_policy_rule_idproject_idnamespace_idsecurity_orchestration_policy_configuration_idmerge_request_idapproval_policy_rule_idproject_idscan_result_policy_idproject_idscan_result_policy_violation_id

Relationships

scan_execution_policy_rules

8 cols · no RLS · line 30488View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
security_policy_id bigintNOT NULLsecurity_policies.id 1:N · CASCADE
security_policy_management_project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
rule_index smallintNOT NULL
type smallintNOT NULL
content jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (security_policy_management_project_id) index_scan_execution_policy_rules_on_policy_mgmt_project_id
  • UNIQUE (security_policy_id, rule_index) index_scan_execution_policy_rules_on_unique_policy_rule_index

Referenced by

  • nothing

scan_result_policies

25 cols · no RLS · line 30508View in 3D
  • Nullable foreign key approval_policy_rule_idscan_result_policies.approval_policy_rule_id may be NULL, so the relationship to approval_policy_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idscan_result_policies.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idscan_result_policies.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK approval_policy_rule_id, project_id, namespace_idscan_result_policies has several nullable FKs (approval_policy_rule_id, project_id, namespace_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
security_orchestration_policy_configuration_id bigintNOT NULLsecurity_orchestration_policy_configurations.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
orchestration_policy_idx smallintNOT NULL
license_states text[]nullCAST('{}' AS text[])
match_on_inclusion booleannull
role_approvers integer[]nullCAST('{}' AS integer[])
age_value integernullCHECK age_value IS NULL OR age_value >= 0
age_operator smallintnull
age_interval smallintnull
vulnerability_attributes jsonbnullCAST('{}' AS jsonb)
project_id bigintnullprojects.id 1:N · CASCADE
rule_idx smallintnullCHECK rule_idx IS NULL OR rule_idx >= 0
project_approval_settings jsonbNOT NULLCAST('{}' AS jsonb)
commits smallintnull
send_bot_message jsonbNOT NULLCAST('{}' AS jsonb)
fallback_behavior jsonbNOT NULLCAST('{}' AS jsonb)
policy_tuning jsonbNOT NULLCAST('{}' AS jsonb)
action_idx smallintNOT NULL0
custom_roles bigint[]NOT NULLCAST('{}' AS bigint[])CHECK array_position(custom_roles, CAST(NULL AS bigint)) IS NULL
licenses jsonbNOT NULLCAST('{}' AS jsonb)
namespace_id bigintnullnamespaces.id 1:N · CASCADE
approval_policy_rule_id bigintnullapproval_policy_rules.id 1:N · CASCADE
malicious_rule booleannull

Indexes

  • (security_orchestration_policy_configuration_id, id, updated_at) idx_scan_result_policies_on_configuration_id_id_updated_at
  • (approval_policy_rule_id) index_scan_result_policies_on_approval_policy_rule_id
  • UNIQUE (security_orchestration_policy_configuration_id, project_id, orchestration_policy_idx, rule_idx, action_idx) index_scan_result_policies_on_configuration_action_and_rule_idx
  • (namespace_id) index_scan_result_policies_on_namespace_id
  • (project_id) index_scan_result_policies_on_project_id

Referenced by

Table checks: age_value IS NULL OR age_value >= 0; num_nonnulls(namespace_id, project_id) >= 1; rule_idx IS NULL OR rule_idx >= 0; array_position(custom_roles, CAST(NULL AS bigint)) IS NULL

scan_result_policy_violation_details

12 cols · no RLS · line 30549View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
scan_result_policy_violation_id bigintNOT NULLscan_result_policy_violations.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
policy_rule_type smallintNOT NULL
finding_state smallintnull
finding_uuid textnullCHECK char_length(finding_uuid) <= 50
license_name textnullCHECK char_length(license_name) <= 255
dependencies text[]NOT NULLCAST('{}' AS text[])
commit_shas text[]NOT NULLCAST('{}' AS text[])
metadata jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (project_id) index_scan_result_policy_violation_details_on_project_id
  • (scan_result_policy_violation_id) index_scan_result_policy_violation_details_on_violation_id

Referenced by

  • nothing

Table checks: char_length(license_name) <= 255; char_length(finding_uuid) <= 50

scan_result_policy_violations

9 cols · no RLS · line 30575View in 3D
  • Nullable foreign key approval_policy_rule_idscan_result_policy_violations.approval_policy_rule_id may be NULL, so the relationship to approval_policy_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key scan_result_policy_idscan_result_policy_violations.scan_result_policy_id may be NULL, so the relationship to scan_result_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
scan_result_policy_id bigintnullscan_result_policies.id 1:N · CASCADE
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
violation_data jsonbnull
approval_policy_rule_id bigintnullapproval_policy_rules.id 1:N · CASCADE
status smallintNOT NULL1

Indexes

  • (project_id, approval_policy_rule_id, id) idx_policy_violations_on_project_id_policy_rule_id_and_id
  • (scan_result_policy_id, id) idx_scan_result_policy_violations_on_policy_id_and_id
  • (approval_policy_rule_id) index_scan_result_policy_violations_on_approval_policy_rule_id
  • (merge_request_id) index_scan_result_policy_violations_on_merge_request_id
  • UNIQUE (scan_result_policy_id, merge_request_id) index_scan_result_policy_violations_on_policy_and_merge_request

Referenced by

Table checks: approval_policy_rule_id IS NOT NULL OR scan_result_policy_id IS NOT NULL

scim 3 tables

Tables whose names start with scim_.

Entity-relationship diagram: scim_group_memberships, scim_identities, scim_oauth_access_tokensscim_group_membershipsid PKbigintcreated_attimestamptzupdated_attimestamptzuser_id FKbigintscim_group_uiduuidscim_identitiesid PKbigintgroup_id FKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptzactivebooleanextern_uidvarchar(255)scim_oauth_access_tokensid PKbigintcreated_attimestamptzupdated_attimestamptzgroup_id FKbiginttoken_encryptedvarcharorganization_id FKbigintnamespacesorganizationsusersuser_idgroup_iduser_idorganization_idgroup_id

Relationships

scim_group_memberships

5 cols · no RLS · line 30602View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
scim_group_uid uuidNOT NULL

Indexes

  • (scim_group_uid) index_scim_group_memberships_on_scim_group_uid
  • UNIQUE (user_id, scim_group_uid) unique_scim_group_memberships_user_id_and_scim_group_uid

Referenced by

  • nothing

scim_identities

7 cols · no RLS · line 30619View in 3D
  • Nullable foreign key group_idscim_identities.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
active booleannullFALSE
extern_uid varchar(255)NOT NULL

Indexes

  • (group_id) index_scim_identities_on_group_id
  • UNIQUE (lower(CAST(extern_uid AS text)), group_id) index_scim_identities_on_lower_extern_uid_and_group_id
  • UNIQUE (user_id, group_id) index_scim_identities_on_user_id_and_group_id

Referenced by

  • nothing

scim_oauth_access_tokens

6 cols · no RLS · line 30638View in 3D
  • Nullable foreign key organization_idscim_oauth_access_tokens.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idscim_oauth_access_tokens.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK organization_id, group_idscim_oauth_access_tokens has several nullable FKs (organization_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADE
token_encrypted varcharNOT NULL
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • UNIQUE (group_id, token_encrypted) index_scim_oauth_access_tokens_on_group_id_and_token_encrypted
  • (organization_id) index_scim_oauth_access_tokens_on_organization_id

Referenced by

  • nothing

Table checks: organization_id IS NOT NULL

secret 2 tables

Tables whose names start with secret_.

Entity-relationship diagram: secret_detection_token_statuses, secret_rotation_infossecret_detection_token_statusesvulnerability_occurrence_id PKbigintproject_idbigintcreated_attimestamptzupdated_attimestamptzstatussmallintlast_verified_attimestamptzsecret_rotation_infosid PKbigintproject_id FKbigintsecret_nametextsecret_metadata_versionintegerrotation_interval_daysintegercreated_attimestamptzupdated_attimestamptznext_reminder_attimestamptzlast_reminder_attimestamptzprojectsvulnerability_occurrencesvulnerability_occurrence_idproject_id

Relationships

secret_detection_token_statuses

6 cols · no RLS · line 30657View in 3D
ColumnTypeNullDefaultReferencesNotes
vulnerability_occurrence_id PKbigintNOT NULLvulnerability_occurrences.id 1:1 · CASCADE
project_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL0
last_verified_at timestamptznull

Indexes

  • (project_id) idx_secret_detect_token_on_project_id

Referenced by

  • nothing

secret_rotation_infos

9 cols · no RLS · line 30666View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
secret_name textNOT NULLCHECK char_length(secret_name) <= 255
secret_metadata_version integerNOT NULL
rotation_interval_days integerNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
next_reminder_at timestamptzNOT NULL
last_reminder_at timestamptznull

Indexes

  • UNIQUE (project_id, secret_name, secret_metadata_version) idx_secret_rotation_infos_project_secret
  • (next_reminder_at) index_secret_rotation_infos_on_next_reminder_at

Referenced by

  • nothing

Table checks: char_length(secret_name) <= 255

secrets 2 tables

Tables whose names start with secrets_.

Entity-relationship diagram: secrets_management_recovery_keys, secrets_manager_namespace_enrollmentssecrets_management_recovery_keysid PKbigintcreated_attimestamptzupdated_attimestamptzactivebooleankeyjsonbsecrets_manager_namespace_enrollmentsid PKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzbetabooleannamespacesnamespace_id

Relationships

secrets_management_recovery_keys

5 cols · no RLS · line 30688View in 3D
  • Isolated tablesecrets_management_recovery_keys references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
active booleanNOT NULLFALSE
key jsonbNOT NULL

Indexes

  • UNIQUE (active) WHERE active idx_secrets_management_recovery_keys_on_active_true

Referenced by

  • nothing

secrets_manager_namespace_enrollments

5 cols · no RLS · line 30705View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
beta booleanNOT NULLTRUE

Indexes

  • UNIQUE (namespace_id) uniq_idx_sm_namespace_enrollments_on_namespace_id

Referenced by

  • nothing

service 4 tables

Tables whose names start with service_.

Entity-relationship diagram: service_access_tokens, service_desk_custom_email_credentials, service_desk_custom_email_verifications, service_desk_settingsservice_access_tokensid PKbigintcreated_attimestamptzupdated_attimestamptzencrypted_tokenbyteaencrypted_token_ivbyteaexpires_attimestamptzservice_desk_custom_email_credentialsproject_id PKbigintcreated_attimestamptzupdated_attimestamptzsmtp_portintegersmtp_addresstextencrypted_smtp_usernamebyteaencrypted_smtp_username_ivbyteaencrypted_smtp_passwordbyteaencrypted_smtp_password_ivbyteasmtp_authenticationsmallintservice_desk_custom_email_verificationsproject_id PKbiginttriggerer_id FKbigintcreated_attimestamptzupdated_attimestamptztriggered_attimestamptzstatesmallinterrorsmallintencrypted_tokenbyteaencrypted_token_ivbyteaservice_desk_settingsproject_id PKbigintissue_template_keyvarchar(255)outgoing_namevarchar(255)project_keyvarchar(255)file_template_project_id FKbigintcustom_email_enabledbooleancustom_emailtextservice_desk_enabledbooleanadd_external_participants_from_ccbooleanreopen_issue_on_external_participant_notebooleantickets_confidential_by_defaultbooleancreated_attimestamptzupdated_attimestamptzproject_key_address_slugtextprojectsusersproject_idtriggerer_idproject_idfile_template_project_idproject_id

Relationships

service_access_tokens

6 cols · no RLS · line 31297View in 3D
  • Isolated tableservice_access_tokens references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
encrypted_token byteaNOT NULL
encrypted_token_iv byteaNOT NULL
expires_at timestamptzNOT NULL

Indexes

  • none

Referenced by

  • nothing

service_desk_custom_email_credentials

10 cols · no RLS · line 31315View in 3D
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
smtp_port integernull
smtp_address textnullCHECK char_length(smtp_address) <= 255
encrypted_smtp_username byteanull
encrypted_smtp_username_iv byteanull
encrypted_smtp_password byteanull
encrypted_smtp_password_iv byteanull
smtp_authentication smallintnull

Indexes

  • none

Referenced by

  • nothing

Table checks: char_length(smtp_address) <= 255

service_desk_custom_email_verifications

9 cols · no RLS · line 31329View in 3D
  • Nullable foreign key triggerer_idservice_desk_custom_email_verifications.triggerer_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
triggerer_id bigintnullusers.id 1:N · SET NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
triggered_at timestamptznull
state smallintNOT NULL0
error smallintnull
encrypted_token byteanull
encrypted_token_iv byteanull

Indexes

  • (triggered_at) WHERE state = 0 i_custom_email_verifications_on_triggered_at_and_state_started
  • (triggerer_id) index_service_desk_custom_email_verifications_on_triggerer_id

Referenced by

  • nothing

service_desk_settings

14 cols · no RLS · line 31341View in 3D
  • Nullable foreign key file_template_project_idservice_desk_settings.file_template_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
issue_template_key varchar(255)null
outgoing_name varchar(255)null
project_key varchar(255)null
file_template_project_id bigintnullprojects.id 1:N · SET NULL
custom_email_enabled booleanNOT NULLFALSE
custom_email textnullCHECK char_length(custom_email) <= 255
service_desk_enabled booleanNOT NULLTRUE
add_external_participants_from_cc booleanNOT NULLFALSE
reopen_issue_on_external_participant_note booleanNOT NULLFALSE
tickets_confidential_by_default booleanNOT NULLTRUE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_key_address_slug textnullCHECK char_length(project_key_address_slug) <= 500

Indexes

  • UNIQUE (custom_email) custom_email_unique_constraint
  • (project_id) WHERE custom_email IS NOT NULL OR project_key IS NOT NULL idx_service_desk_settings_where_custom_email_or_project_key
  • (custom_email_enabled) index_service_desk_settings_on_custom_email_enabled
  • (file_template_project_id) index_service_desk_settings_on_file_template_project_id

Referenced by

  • nothing

Table checks: char_length(project_key_address_slug) <= 500; char_length(custom_email) <= 255

slack 3 tables

Tables whose names start with slack_.

Entity-relationship diagram: slack_api_scopes, slack_integrations, slack_integrations_scopesslack_api_scopesid PKbigintnametextorganization_id FKbigintslack_integrationsid PKbigintteam_idvarcharteam_namevarcharaliasvarcharuser_idvarcharcreated_attimestampupdated_attimestampbot_user_idtextencrypted_bot_access_tokenbyteaencrypted_bot_access_token_ivbyteaintegration_id FKbigintorganization_id FKbigintgroup_id FKbigintproject_id FKbigintslack_integrations_scopesid PKbigintslack_api_scope_id FKbigintslack_integration_id FKbigintproject_id FKbigintgroup_id FKbigintorganization_id FKbigintintegrationsnamespacesorganizationsprojectsorganization_idproject_idgroup_idintegration_idorganization_idorganization_idgroup_idproject_idslack_api_scope_idslack_integration_id

Relationships

slack_api_scopes

3 cols · no RLS · line 31376View in 3D
  • Nullable foreign key organization_idslack_api_scopes.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name textNOT NULLCHECK char_length(name) <= 100
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • UNIQUE (organization_id, name) idx_unique_slack_api_scopes_on_organization_id_and_name

Referenced by

Table checks: char_length(name) <= 100; organization_id IS NOT NULL

slack_integrations

14 cols · no RLS · line 31393View in 3D
  • Nullable foreign key project_idslack_integrations.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idslack_integrations.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key integration_idslack_integrations.integration_id may be NULL, so the relationship to integrations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idslack_integrations.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, group_id, integration_id, organization_idslack_integrations has several nullable FKs (project_id, group_id, integration_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
team_id varcharNOT NULL
team_name varcharNOT NULL
alias varcharNOT NULL
user_id varcharNOT NULL
created_at timestampNOT NULL
updated_at timestampNOT NULL
bot_user_id textnullCHECK char_length(bot_user_id) <= 255
encrypted_bot_access_token byteanull
encrypted_bot_access_token_iv byteanull
integration_id bigintnullintegrations.id 1:N · CASCADECHECK integration_id IS NOT NULL
organization_id bigintnullorganizations.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE

Indexes

  • (group_id) index_slack_integrations_on_group_id
  • (integration_id) index_slack_integrations_on_integration_id
  • (organization_id) index_slack_integrations_on_organization_id
  • (project_id) index_slack_integrations_on_project_id
  • UNIQUE (team_id, alias, group_id) index_slack_integrations_on_team_id_alias_group_id
  • UNIQUE (team_id, alias, organization_id) index_slack_integrations_on_team_id_alias_organization_id
  • UNIQUE (team_id, alias, project_id) index_slack_integrations_on_team_id_alias_project_id
  • (id) WHERE bot_user_id IS NOT NULL partial_index_slack_integrations_with_bot_user_id

Referenced by

Table checks: num_nonnulls(group_id, organization_id, project_id) = 1; char_length(bot_user_id) <= 255; integration_id IS NOT NULL

slack_integrations_scopes

6 cols · no RLS · line 31422View in 3D
  • Nullable foreign key organization_idslack_integrations_scopes.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idslack_integrations_scopes.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idslack_integrations_scopes.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
slack_api_scope_id bigintNOT NULLslack_api_scopes.id 1:N · CASCADE
slack_integration_id bigintNOT NULLslack_integrations.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (slack_api_scope_id) idx_slack_integrations_scopes_on_slack_api_scope_id
  • UNIQUE (slack_integration_id, slack_api_scope_id) index_slack_api_scopes_on_name_and_integration
  • (group_id) index_slack_integrations_scopes_on_group_id
  • (organization_id) index_slack_integrations_scopes_on_organization_id
  • (project_id) index_slack_integrations_scopes_on_project_id

Referenced by

  • nothing

Table checks: num_nonnulls(group_id, organization_id, project_id) = 1

status 3 tables

Tables whose names start with status_.

Entity-relationship diagram: status_check_responses, status_page_published_incidents, status_page_settingsstatus_check_responsesid PKbigintmerge_request_id FKbigintexternal_approval_rule_idbigintshabyteaexternal_status_check_id FKbigintstatussmallintretried_attimestamptzcreated_attimestamptzproject_id FKbigintstatus_page_published_incidentsid PKbigintcreated_attimestamptzupdated_attimestamptzissue_id FKbigintnamespace_id FKbigintstatus_page_settingsproject_id PKbigintcreated_attimestamptzupdated_attimestamptzenabledbooleanaws_s3_bucket_namevarchar(63)aws_regionvarchar(255)aws_access_keyvarchar(255)encrypted_aws_secret_keyvarchar(255)encrypted_aws_secret_key_ivvarchar(255)status_page_urltextexternal_status_checksissuesmerge_requestsnamespacesprojectsexternal_status_check_idproject_idmerge_request_idnamespace_idissue_idproject_id

Relationships

status_check_responses

9 cols · no RLS · line 31704View in 3D
  • Nullable foreign key project_idstatus_check_responses.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
external_approval_rule_id bigintnull
sha byteaNOT NULL
external_status_check_id bigintNOT NULLexternal_status_checks.id 1:N · CASCADE
status smallintNOT NULL0
retried_at timestamptznull
created_at timestamptzNOT NULLnow()
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (id, status) idx_status_check_responses_on_id_and_status
  • (external_approval_rule_id) index_status_check_responses_on_external_approval_rule_id
  • (external_status_check_id) index_status_check_responses_on_external_status_check_id
  • (merge_request_id) index_status_check_responses_on_merge_request_id
  • (project_id) index_status_check_responses_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

status_page_published_incidents

5 cols · no RLS · line 31726View in 3D
  • Nullable foreign key namespace_idstatus_page_published_incidents.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
issue_id bigintNOT NULLissues.id 1:1 · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • UNIQUE (issue_id) index_status_page_published_incidents_on_issue_id
  • (namespace_id) index_status_page_published_incidents_on_namespace_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

status_page_settings

10 cols · no RLS · line 31744View in 3D
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
enabled booleanNOT NULLFALSE
aws_s3_bucket_name varchar(63)NOT NULL
aws_region varchar(255)NOT NULL
aws_access_key varchar(255)NOT NULL
encrypted_aws_secret_key varchar(255)NOT NULL
encrypted_aws_secret_key_iv varchar(255)NOT NULL
status_page_url textnullCHECK char_length(status_page_url) <= 1024

Indexes

  • (project_id) index_status_page_settings_on_project_id

Referenced by

  • nothing

Table checks: char_length(status_page_url) <= 1024

subscription 5 tables

Tables whose names start with subscription_.

Entity-relationship diagram: subscription_add_on_purchases, subscription_add_ons, subscription_seat_assignments, subscription_user_add_on_assignment_versions, subscription_user_add_on_assignmentssubscription_add_on_purchasesid PKbigintcreated_attimestamptzupdated_attimestamptzsubscription_add_on_id FKbigintnamespace_id FKbigintquantityintegerexpires_ondatepurchase_xidtextlast_assigned_users_refreshed_attimestamptztrialbooleanstarted_atdateorganization_id FKbigintsubscription_add_on_uidsmallintsubscription_add_onsid PKbigintcreated_attimestamptzupdated_attimestamptznamesmallintdescriptiontextsubscription_seat_assignmentsid PKbigintnamespace_id FKbigintuser_id FKbigintlast_activity_ontimestamptzcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintseat_typesmallintsubscription_user_add_on_assignment_versionsid PKbigintorganization_id FKbigintitem_idbigintpurchase_idbigintuser_idbigintcreated_attimestamptzitem_typetexteventtextnamespace_pathtextadd_on_nametextwhodunnittextobjectjsonbsubscription_user_add_on_assignmentsid PKbigintadd_on_purchase_id FKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintnamespacesorganizationsuserssubscription_add_on_idnamespace_idorganization_idnamespace_iduser_idorganization_idorganization_idadd_on_purchase_iduser_idorganization_id

Relationships

subscription_add_on_purchases

13 cols · no RLS · line 31767View in 3D
  • Nullable foreign key namespace_idsubscription_add_on_purchases.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
subscription_add_on_id bigintNOT NULLsubscription_add_ons.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
quantity integerNOT NULL
expires_on dateNOT NULL
purchase_xid textNOT NULLCHECK char_length(purchase_xid) <= 255
last_assigned_users_refreshed_at timestamptznull
trial booleanNOT NULLFALSE
started_at datenullCHECK started_at IS NOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
subscription_add_on_uid smallintnullCHECK subscription_add_on_uid IS NOT NULL

Indexes

  • (last_assigned_users_refreshed_at) idx_addon_purchases_on_last_refreshed_at_desc_nulls_last
  • (started_at, expires_on) idx_subscription_add_on_purchases_on_started_on_and_expires_on
  • (subscription_add_on_id) idx_subscription_add_on_purchases_on_subscription_add_on_id
  • UNIQUE (subscription_add_on_id, namespace_id) WHERE namespace_id IS NOT NULL index_add_on_purchases_on_add_on_id_and_namespace_id_not_null
  • UNIQUE (subscription_add_on_id) WHERE namespace_id IS NULL index_add_on_purchases_on_add_on_id_and_namespace_id_null
  • UNIQUE (subscription_add_on_uid, namespace_id) WHERE subscription_add_on_uid IS NOT NULL index_add_on_purchases_on_add_on_uid_and_namespace_id_not_null
  • (organization_id) index_add_on_purchases_on_organization_id
  • (namespace_id, subscription_add_on_id) index_subscription_add_on_purchases_on_namespace_id_add_on_id
  • (subscription_add_on_uid) index_subscription_add_on_purchases_on_subscription_add_on_uid
  • (expires_on) index_subscription_addon_purchases_on_expires_on

Referenced by

Table checks: char_length(purchase_xid) <= 255; subscription_add_on_uid IS NOT NULL; started_at IS NOT NULL

subscription_add_ons

5 cols · no RLS · line 31795View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name smallintNOT NULL
description textNOT NULLCHECK char_length(description) <= 512

Indexes

  • UNIQUE (name) index_subscription_add_ons_on_name

Referenced by

Table checks: char_length(description) <= 512

subscription_seat_assignments

8 cols · no RLS · line 31813View in 3D
  • Nullable foreign key namespace_idsubscription_seat_assignments.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
last_activity_on timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
seat_type smallintnull

Indexes

  • (namespace_id, last_activity_on, created_at) idx_subscription_seat_assignments_namespace_last_activity_on
  • (organization_id) index_subscription_seat_assignments_on_organization_id
  • (user_id) index_subscription_seat_assignments_on_user_id
  • UNIQUE (namespace_id, user_id) WHERE namespace_id IS NOT NULL uniq_idx_subscription_seat_assignments_on_namespace_id_and_user

Referenced by

  • nothing

subscription_user_add_on_assignment_versions

12 cols · no RLS · line 31833View in 3D
  • Polymorphic reference without referential integrity item_type, item_iditem_id points at different tables depending on item_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
item_id bigintnull
purchase_id bigintnull
user_id bigintnull
created_at timestamptznull
item_type textNOT NULLCHECK char_length(item_type) <= 255
event textNOT NULLCHECK char_length(event) <= 255
namespace_path textnullCHECK char_length(namespace_path) <= 255
add_on_name textnullCHECK char_length(add_on_name) <= 255
whodunnit textnullCHECK char_length(whodunnit) <= 255
object jsonbnull

Indexes

  • (organization_id, purchase_id, id) idx_subaoa_versions_on_org_id_purchase_id_and_id
  • (item_id) idx_user_add_on_assignment_versions_on_item_id

Referenced by

  • nothing

Table checks: char_length(item_type) <= 255; char_length(event) <= 255; char_length(namespace_path) <= 255; char_length(add_on_name) <= 255; char_length(whodunnit) <= 255

subscription_user_add_on_assignments

6 cols · no RLS · line 31862View in 3D
  • Nullable foreign key organization_idsubscription_user_add_on_assignments.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
add_on_purchase_id bigintNOT NULLsubscription_add_on_purchases.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • (add_on_purchase_id, id) idx_user_add_on_assignments_on_add_on_purchase_id_and_id
  • (organization_id) index_subscription_user_add_on_assignments_on_organization_id
  • (user_id) index_subscription_user_add_on_assignments_on_user_id
  • UNIQUE (add_on_purchase_id, user_id) uniq_idx_user_add_on_assignments_on_add_on_purchase_and_user

Referenced by

Table checks: organization_id IS NOT NULL

system 5 tables

Tables whose names start with system_.

Entity-relationship diagram: system_access_group_microsoft_applications, system_access_group_microsoft_graph_access_tokens, system_access_microsoft_applications, system_access_microsoft_graph_access_tokens, system_note_metadatasystem_access_group_microsoft_applicationsid PKbigintcreated_attimestamptzupdated_attimestamptzgroup_id FKbigintenabledbooleantenant_xidtextclient_xidtextlogin_endpointtextgraph_endpointtextencrypted_client_secretbyteaencrypted_client_secret_ivbyteasystem_access_group_microsoft_graph_access_tokensid PKbigintcreated_attimestamptzupdated_attimestamptzsystem_access_group_microsoft_application_id FKbigintgroup_id FKbigintexpires_inintegerencrypted_tokenbyteaencrypted_token_ivbyteasystem_access_microsoft_applicationsid PKbigintcreated_attimestamptzupdated_attimestamptznamespace_id FKbigintenabledbooleantenant_xidtextclient_xidtextlogin_endpointtextgraph_endpointtextencrypted_client_secretbyteaencrypted_client_secret_ivbyteasystem_access_microsoft_graph_access_tokensid PKbigintcreated_attimestamptzupdated_attimestamptzsystem_access_microsoft_application_id FKbigintexpires_inintegerencrypted_tokenbyteaencrypted_token_ivbyteasystem_note_metadatacommit_countintegeractionvarcharcreated_attimestampupdated_attimestampdescription_version_id FKbigintnote_id FKbigintid PKbigintnamespace_id FKbigintdescription_versionsnamespacesnotesgroup_idnamespace_idnamespace_idnote_iddescription_version_idsystem_access_group_microsoft_application_idgroup_idsystem_access_microsoft_application_id

Relationships

system_access_group_microsoft_applications

11 cols · no RLS · line 31950View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id bigintNOT NULLnamespaces.id 1:1 · CASCADE
enabled booleanNOT NULLFALSE
tenant_xid textNOT NULLCHECK char_length(tenant_xid) <= 255
client_xid textNOT NULLCHECK char_length(client_xid) <= 255
login_endpoint textNOT NULLCAST('https://login.microsoftonline.com' AS text)CHECK char_length(login_endpoint) <= 255
graph_endpoint textNOT NULLCAST('https://graph.microsoft.com' AS text)CHECK char_length(graph_endpoint) <= 255
encrypted_client_secret byteaNOT NULL
encrypted_client_secret_iv byteaNOT NULL

Indexes

  • UNIQUE (group_id) index_system_access_group_microsoft_applications_on_group_id

Referenced by

Table checks: char_length(graph_endpoint) <= 255; char_length(login_endpoint) <= 255; char_length(tenant_xid) <= 255; char_length(client_xid) <= 255

system_access_group_microsoft_graph_access_tokens

8 cols · no RLS · line 31977View in 3D
  • Nullable foreign key system_access_group_microsoft_application_idsystem_access_group_microsoft_graph_access_tokens.system_access_group_microsoft_application_id may be NULL, so the relationship to system_access_group_microsoft_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
system_access_group_microsoft_application_id bigintnullsystem_access_group_microsoft_applications.id 1:1 · CASCADE
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
expires_in integerNOT NULL
encrypted_token byteaNOT NULL
encrypted_token_iv byteaNOT NULL

Indexes

  • (group_id) index_group_id_on_group_microsoft_access_tokens
  • UNIQUE (system_access_group_microsoft_application_id) unique_index_group_ms_access_tokens_on_ms_app_id

Referenced by

  • nothing

system_access_microsoft_applications

11 cols · no RLS · line 31997View in 3D
  • Nullable foreign key namespace_idsystem_access_microsoft_applications.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
namespace_id bigintnullnamespaces.id 1:1 · CASCADE
enabled booleanNOT NULLFALSE
tenant_xid textNOT NULLCHECK char_length(tenant_xid) <= 255
client_xid textNOT NULLCHECK char_length(client_xid) <= 255
login_endpoint textNOT NULLCAST('https://login.microsoftonline.com' AS text)CHECK char_length(login_endpoint) <= 255
graph_endpoint textNOT NULLCAST('https://graph.microsoft.com' AS text)CHECK char_length(graph_endpoint) <= 255
encrypted_client_secret byteaNOT NULL
encrypted_client_secret_iv byteaNOT NULL

Indexes

  • UNIQUE (namespace_id) index_system_access_microsoft_applications_on_namespace_id

Referenced by

Table checks: char_length(login_endpoint) <= 255; char_length(tenant_xid) <= 255; char_length(graph_endpoint) <= 255; char_length(client_xid) <= 255

system_access_microsoft_graph_access_tokens

7 cols · no RLS · line 32024View in 3D
  • Nullable foreign key system_access_microsoft_application_idsystem_access_microsoft_graph_access_tokens.system_access_microsoft_application_id may be NULL, so the relationship to system_access_microsoft_applications is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
system_access_microsoft_application_id bigintnullsystem_access_microsoft_applications.id 1:1 · CASCADE
expires_in integerNOT NULL
encrypted_token byteaNOT NULL
encrypted_token_iv byteaNOT NULL

Indexes

  • UNIQUE (system_access_microsoft_application_id) unique_index_sysaccess_ms_access_tokens_on_sysaccess_ms_app_id

Referenced by

  • nothing

system_note_metadata

8 cols · no RLS · line 32043View in 3D
  • Nullable foreign key namespace_idsystem_note_metadata.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key description_version_idsystem_note_metadata.description_version_id may be NULL, so the relationship to description_versions is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK namespace_id, description_version_idsystem_note_metadata has several nullable FKs (namespace_id, description_version_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
commit_count integernull
action varcharnull
created_at timestampNOT NULL
updated_at timestampNOT NULL
description_version_id bigintnulldescription_versions.id 1:N · SET NULL
note_id bigintNOT NULLnotes.id 1:1 · CASCADE
id PKbigintNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • UNIQUE (description_version_id) WHERE description_version_id IS NOT NULL index_system_note_metadata_on_description_version_id
  • (namespace_id) index_system_note_metadata_on_namespace_id
  • UNIQUE (note_id) index_system_note_metadata_on_note_id

Referenced by

Table checks: namespace_id IS NOT NULL

tag 3 tables

Tables whose names start with tag_.

Entity-relationship diagram: tag_gpg_signatures, tag_ssh_signatures, tag_x509_signaturestag_gpg_signaturesid PKbigintproject_id FKbigintgpg_key_id FKbigintgpg_key_subkey_id FKbigintverification_statussmallintobject_namebyteagpg_key_primary_keyidbyteagpg_key_user_nametextgpg_key_user_emailtextcreated_attimestamptzupdated_attimestamptztag_ssh_signaturesid PKbigintproject_id FKbigintkey_id FKbigintverification_statussmallintobject_namebyteakey_fingerprint_sha256byteacreated_attimestamptzupdated_attimestamptztag_x509_signaturesid PKbigintproject_id FKbigintx509_certificate_id FKbigintcreated_attimestamptzupdated_attimestamptzverification_statussmallintobject_namebyteagpg_key_subkeysgpg_keyskeysprojectsx509_certificatesgpg_key_subkey_idgpg_key_idproject_idproject_idkey_idx509_certificate_idproject_id

Relationships

tag_gpg_signatures

11 cols · no RLS · line 32064View in 3D
  • Nullable foreign key gpg_key_subkey_idtag_gpg_signatures.gpg_key_subkey_id may be NULL, so the relationship to gpg_key_subkeys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key gpg_key_idtag_gpg_signatures.gpg_key_id may be NULL, so the relationship to gpg_keys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK gpg_key_subkey_id, gpg_key_idtag_gpg_signatures has several nullable FKs (gpg_key_subkey_id, gpg_key_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
gpg_key_id bigintnullgpg_keys.id 1:N · SET NULL
gpg_key_subkey_id bigintnullgpg_key_subkeys.id 1:N · CASCADE
verification_status smallintNOT NULL0
object_name byteaNOT NULL
gpg_key_primary_keyid byteaNOT NULL
gpg_key_user_name textnullCHECK char_length(gpg_key_user_name) <= 255
gpg_key_user_email textnullCHECK char_length(gpg_key_user_email) <= 255
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (gpg_key_id) index_tag_gpg_signatures_on_gpg_key_id
  • (gpg_key_subkey_id) index_tag_gpg_signatures_on_gpg_key_subkey_id
  • UNIQUE (project_id, object_name) index_tag_gpg_signatures_on_project_id_and_object_name

Referenced by

  • nothing

Table checks: char_length(gpg_key_user_name) <= 255; char_length(gpg_key_user_email) <= 255

tag_ssh_signatures

8 cols · no RLS · line 32089View in 3D
  • Nullable foreign key key_idtag_ssh_signatures.key_id may be NULL, so the relationship to keys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
key_id bigintnullkeys.id 1:N · SET NULL
verification_status smallintNOT NULL0
object_name byteaNOT NULL
key_fingerprint_sha256 byteanull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (key_id) index_tag_ssh_signatures_on_key_id
  • UNIQUE (project_id, object_name) index_tag_ssh_signatures_on_project_id_and_object_name

Referenced by

  • nothing

tag_x509_signatures

7 cols · no RLS · line 32109View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
x509_certificate_id bigintNOT NULLx509_certificates.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
verification_status smallintNOT NULL0
object_name byteaNOT NULL

Indexes

  • UNIQUE (project_id, object_name) index_tag_x509_signatures_on_project_id_and_object_name
  • (x509_certificate_id) index_tag_x509_signatures_on_x509_certificate_id

Referenced by

  • nothing

targeted 3 tables

Tables whose names start with targeted_.

Entity-relationship diagram: targeted_message_dismissals, targeted_message_namespaces, targeted_messagestargeted_message_dismissalsid PKbiginttargeted_message_id FKbigintuser_id FKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptztargeted_message_namespacesid PKbiginttargeted_message_id FKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptztargeted_messagesid PKbigintcreated_attimestamptzupdated_attimestamptztarget_typesmallintstarts_attimestamptzends_attimestamptzrolessmallint[]namespacesusersnamespace_iduser_idtargeted_message_idnamespace_idtargeted_message_id

Relationships

targeted_message_dismissals

6 cols · no RLS · line 32162View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
targeted_message_id bigintNOT NULLtargeted_messages.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (namespace_id) index_targeted_message_dismissals_on_namespace_id
  • (targeted_message_id) index_targeted_message_dismissals_on_targeted_message_id
  • UNIQUE (user_id, namespace_id, targeted_message_id) index_targeted_message_dismissals_on_user_ns_targeted_message

Referenced by

  • nothing

targeted_message_namespaces

5 cols · no RLS · line 32180View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
targeted_message_id bigintNOT NULLtargeted_messages.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (targeted_message_id, namespace_id) index_targeted_message_namespaces_on_message_and_namespace
  • (namespace_id) index_targeted_message_namespaces_on_namespace_id

Referenced by

  • nothing

targeted_messages

7 cols · no RLS · line 32197View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
target_type smallintNOT NULL0
starts_at timestamptzNOT NULL
ends_at timestamptzNOT NULL
roles smallint[]NOT NULLCAST('{}' AS smallint[])

Indexes

  • none

Referenced by

Table checks: starts_at < ends_at

terraform 4 tables

Tables whose names start with terraform_.

Entity-relationship diagram: terraform_state_protection_rules, terraform_state_version_states, terraform_state_versions, terraform_statesterraform_state_protection_rulesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintminimum_access_level_for_writesmallintallowed_fromsmallintstate_nametextterraform_state_version_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzterraform_state_version_idbigintproject_idbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextterraform_state_versionsid PKbigintterraform_state_id FKbigintcreated_by_user_id FKbigintcreated_attimestamptzupdated_attimestamptzversionintegerfile_storesmallintfiletextverification_retry_countsmallintverification_retry_attimestamptzverified_attimestamptzverification_checksumbyteaverification_failuretextci_build_idbigintverification_started_attimestamptzverification_statesmallintproject_id FKbigintis_encryptedbooleanterraform_statesid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzfile_storesmallintfilevarchar(255)lock_xidvarchar(255)locked_attimestamptzlocked_by_user_id FKbigintuuidvarchar(32)namevarchar(255)versioning_enabledbooleandeleted_attimestamptzactiverecord_lock_versionintegerprojectsusersproject_idlocked_by_user_idproject_idproject_idcreated_by_user_idterraform_state_id

Relationships

terraform_state_protection_rules

7 cols · no RLS · line 32235View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
minimum_access_level_for_write smallintNOT NULL
allowed_from smallintNOT NULL0
state_name textNOT NULLCHECK char_length(state_name) <= 255

Indexes

  • UNIQUE (project_id, state_name) idx_terraform_state_protection_rules_on_project_id_state_name

Referenced by

  • nothing

Table checks: char_length(state_name) <= 255

terraform_state_version_states

10 cols · no RLS · line 32255View in 3D
  • Isolated tableterraform_state_version_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
terraform_state_version_id bigintNOT NULL
project_id bigintNOT NULL
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_terraform_state_version_states_failed_verification
  • (terraform_state_version_id) WHERE verification_state = 0 OR verification_state = 3 index_terraform_state_version_states_needs_verification_tsv_id
  • (project_id) index_terraform_state_version_states_on_project_id
  • (terraform_state_version_id, verification_started_at) WHERE verification_state = 1 index_terraform_state_version_states_on_verification_started
  • (verification_state) index_terraform_state_version_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_terraform_state_version_states_pending_verification
  • UNIQUE (terraform_state_version_id) index_terraform_state_version_states_state_version_id

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

terraform_state_versions

18 cols · no RLS · line 32278View in 3D
  • Nullable foreign key project_idterraform_state_versions.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key created_by_user_idterraform_state_versions.created_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, created_by_user_idterraform_state_versions has several nullable FKs (project_id, created_by_user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
terraform_state_id bigintNOT NULLterraform_states.id 1:N · CASCADE
created_by_user_id bigintnullusers.id 1:N · SET NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
version integerNOT NULL
file_store smallintNOT NULL
file textNOT NULLCHECK char_length(file) <= 255
verification_retry_count smallintnull
verification_retry_at timestamptznull
verified_at timestamptznull
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
ci_build_id bigintnull
verification_started_at timestamptznull
verification_state smallintNOT NULL0
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
is_encrypted booleanNOT NULLTRUE

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_terraform_state_versions_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_terraform_state_versions_needs_verification
  • (ci_build_id) index_terraform_state_versions_on_ci_build_id
  • (created_by_user_id) index_terraform_state_versions_on_created_by_user_id
  • (project_id) index_terraform_state_versions_on_project_id
  • UNIQUE (terraform_state_id, version) index_terraform_state_versions_on_state_id_and_version
  • (verification_state) index_terraform_state_versions_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_terraform_state_versions_pending_verification

Referenced by

  • nothing

Table checks: char_length(file) <= 255; project_id IS NOT NULL; char_length(verification_failure) <= 255

terraform_states

14 cols · no RLS · line 32311View in 3D
  • Nullable foreign key locked_by_user_idterraform_states.locked_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Soft delete collides with non-partial UNIQUE project_id, nameterraform_states soft-deletes via deleted_at, but (project_id, name) is unique across live AND deleted rows. A user who deletes their account can never sign up again with the same value, and ON CONFLICT upserts will resurrect ghosts.
  • Soft delete collides with non-partial UNIQUE uuidterraform_states soft-deletes via deleted_at, but (uuid) is unique across live AND deleted rows. A user who deletes their account can never sign up again with the same value, and ON CONFLICT upserts will resurrect ghosts.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
file_store smallintnull
file varchar(255)null
lock_xid varchar(255)null
locked_at timestamptznull
locked_by_user_id bigintnullusers.id 1:N · SET NULL
uuid varchar(32)NOT NULL
name varchar(255)NOT NULL
versioning_enabled booleanNOT NULLTRUE
deleted_at timestamptznull
activerecord_lock_version integerNOT NULL0

Indexes

  • (file_store) index_terraform_states_on_file_store
  • (locked_by_user_id) index_terraform_states_on_locked_by_user_id
  • UNIQUE (project_id, name) index_terraform_states_on_project_id_and_name
  • UNIQUE (uuid) index_terraform_states_on_uuid

Referenced by

wiki 4 tables

Tables whose names start with wiki_.

Entity-relationship diagram: wiki_page_meta, wiki_page_meta_user_mentions, wiki_page_slugs, wiki_repository_stateswiki_page_metaid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptztitlevarchar(255)namespace_id FKbigintdeleted_attimestamptzwiki_page_meta_user_mentionsid PKbigintwiki_page_meta_id FKbigintnote_id FKbigintnamespace_id FKbigintmentioned_users_idsbigint[]mentioned_projects_idsbigint[]mentioned_groups_idsbigint[]wiki_page_slugsid PKbigintcanonicalbooleanwiki_page_meta_id FKbigintcreated_attimestamptzupdated_attimestamptzslugvarchar(2048)project_id FKbigintnamespace_id FKbigintwiki_repository_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzproject_wiki_repository_idbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextproject_idbigintnamespacesnotesprojectsnamespace_idproject_idnamespace_idnote_idwiki_page_meta_idproject_idnamespace_idwiki_page_meta_id

Relationships

wiki_page_meta

7 cols · no RLS · line 34580View in 3D
  • Nullable foreign key namespace_idwiki_page_meta.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idwiki_page_meta.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
title varchar(255)NOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADE
deleted_at timestamptznull

Indexes

  • (namespace_id) index_wiki_page_meta_on_namespace_id
  • (project_id) index_wiki_page_meta_on_project_id

Referenced by

Table checks: num_nonnulls(namespace_id, project_id) = 1

wiki_page_meta_user_mentions

7 cols · no RLS · line 34600View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
wiki_page_meta_id bigintNOT NULLwiki_page_meta.id 1:N · CASCADE
note_id bigintNOT NULLnotes.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
mentioned_users_ids bigint[]null
mentioned_projects_ids bigint[]null
mentioned_groups_ids bigint[]null

Indexes

  • UNIQUE (wiki_page_meta_id, note_id) index_wiki_meta_user_mentions_on_wiki_page_meta_id_and_note_id
  • (namespace_id) index_wiki_page_meta_user_mentions_on_namespace_id
  • (note_id) index_wiki_page_meta_user_mentions_on_note_id

Referenced by

  • nothing

wiki_page_slugs

8 cols · no RLS · line 34619View in 3D
  • Nullable foreign key project_idwiki_page_slugs.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idwiki_page_slugs.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
canonical booleanNOT NULLFALSE
wiki_page_meta_id bigintNOT NULLwiki_page_meta.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
slug varchar(2048)NOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE

Indexes

  • (namespace_id) index_wiki_page_slugs_on_namespace_id
  • (project_id) index_wiki_page_slugs_on_project_id
  • UNIQUE (slug, wiki_page_meta_id) index_wiki_page_slugs_on_slug_and_wiki_page_meta_id
  • (wiki_page_meta_id) index_wiki_page_slugs_on_wiki_page_meta_id
  • UNIQUE (wiki_page_meta_id) WHERE canonical = TRUE one_canonical_wiki_page_slug_per_metadata

Referenced by

  • nothing

Table checks: num_nonnulls(namespace_id, project_id) = 1

wiki_repository_states

10 cols · no RLS · line 34640View in 3D
  • Isolated tablewiki_repository_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
project_wiki_repository_id bigintNOT NULL
verification_state smallintNOT NULL0
verification_retry_count smallintnull
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
project_id bigintnullCHECK project_id IS NOT NULL

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_wiki_repository_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_wiki_repository_states_needs_verification
  • (project_id) index_wiki_repository_states_on_project_id
  • UNIQUE (project_wiki_repository_id) index_wiki_repository_states_on_project_wiki_repository_id
  • (verification_state) index_wiki_repository_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_wiki_repository_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255; project_id IS NOT NULL

work 24 tables

Tables whose names start with work_.

Entity-relationship diagram: work_item_agent_plans, work_item_colors, work_item_current_statuses, work_item_custom_lifecycle_statuses, work_item_custom_lifecycles, work_item_custom_status_mappings, work_item_custom_statuses, work_item_custom_types, work_item_date_field_values, work_item_dates_sources, work_item_number_field_values, work_item_parent_links, work_item_positions, work_item_progresses, work_item_select_field_values, work_item_settings, work_item_text_field_values, work_item_transitions, work_item_type_custom_fields, work_item_type_custom_lifecycles, work_item_type_user_preferences, work_item_type_visibilities, work_item_type_visibility_defaults, work_item_weights_sourceswork_item_agent_planswork_item_id PKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzcached_markdown_versionintegerfile_storesmallintreadiness_scoresmallintai_planning_enabledbooleanwork_item_colorscreated_attimestamptzupdated_attimestamptzissue_id PKbigintnamespace_id FKbigintcolortextwork_item_current_statusesid PKbigintnamespace_id FKbigintwork_item_id FKbigintsystem_defined_status_idbigintcustom_status_id FKbigintupdated_attimestamptzwork_item_custom_lifecycle_statusesid PKbigintnamespace_id FKbigintlifecycle_id FKbigintstatus_id FKbigintcreated_attimestamptzupdated_attimestamptzpositionintegerwork_item_custom_lifecyclesid PKbigintnamespace_id FKbigintdefault_open_status_id FKbigintdefault_closed_status_id FKbigintdefault_duplicate_status_id FKbigintcreated_attimestamptzupdated_attimestamptznametextcreated_by_id FKbigintupdated_by_id FKbigintwork_item_custom_status_mappingsid PKbigintnamespace_id FKbigintold_status_id FKbigintnew_status_id FKbigintwork_item_type_idbigintvalid_fromtimestamptzvalid_untiltimestamptzcreated_attimestamptzupdated_attimestamptzold_status_rolesmallintwork_item_custom_statusesid PKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzcategorysmallintnametextdescriptiontextcolortextcreated_by_id FKbigintupdated_by_id FKbigintconverted_from_system_defined_status_identifiersmallintwork_item_custom_typesid PKbigintcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintnamespace_id FKbiginticon_namesmallintconverted_from_system_defined_type_identifiersmallintnametextarchivedbooleanwork_item_date_field_valuesid PKbigintnamespace_id FKbigintwork_item_id FKbigintcustom_field_id FKbigintcreated_attimestamptzupdated_attimestamptzvaluedatework_item_dates_sourcescreated_attimestamptzupdated_attimestamptzissue_id PKbigintnamespace_id FKbigintstart_date_is_fixedbooleandue_date_is_fixedbooleanstart_datedatedue_datedatestart_date_sourcing_work_item_id FKbigintstart_date_sourcing_milestone_id FKbigintdue_date_sourcing_work_item_id FKbigintdue_date_sourcing_milestone_id FKbigintstart_date_fixeddatedue_date_fixeddatework_item_number_field_valuesid PKbigintnamespace_id FKbigintwork_item_id FKbigintcustom_field_id FKbigintcreated_attimestamptzupdated_attimestamptzvaluenumericwork_item_parent_linksid PKbigintwork_item_id FKbigintwork_item_parent_id FKbigintrelative_positionintegercreated_attimestamptzupdated_attimestamptznamespace_id FKbigintwork_item_positionswork_item_id PKbigintnamespace_id FKbigintrelative_positionbigintcreated_attimestamptzupdated_attimestamptzrelative_positioning_namespace_idbigintwork_item_progressescreated_attimestamptzupdated_attimestamptzissue_id PKbigintprogresssmallintstart_valuedouble precisionend_valuedouble precisioncurrent_valuedouble precisionrollup_progressbooleanreminder_frequencysmallintlast_reminder_sent_attimestamptznamespace_id FKbigintwork_item_select_field_valuesid PKbigintnamespace_id FKbigintwork_item_id FKbigintcustom_field_id FKbigintcustom_field_select_option_id FKbigintcreated_attimestamptzupdated_attimestamptzwork_item_settingsid PKbigintorganization_id FKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzcustomizable_type_visibilitybooleanwork_item_text_field_valuesid PKbigintnamespace_id FKbigintwork_item_id FKbigintcustom_field_id FKbigintcreated_attimestamptzupdated_attimestamptzvaluetextwork_item_transitionswork_item_id PKbigintnamespace_id FKbigintmoved_to_id FKbigintduplicated_to_id FKbigintpromoted_to_epic_id FKbigintwork_item_type_custom_fieldsid PKbigintnamespace_id FKbigintcustom_field_id FKbigintwork_item_type_idbigintcreated_attimestamptzupdated_attimestamptzwork_item_type_custom_lifecyclesid PKbigintnamespace_id FKbigintwork_item_type_idbigintlifecycle_id FKbigintcreated_attimestamptzupdated_attimestamptzwork_item_type_user_preferencesid PKbigintcreated_attimestamptzupdated_attimestamptzuser_id FKbigintnamespace_id FKbigintwork_item_type_idbigintsorttextdisplay_settingsjsonbwork_item_type_visibilitiesid PKbigintnamespace_id FKbigintwork_item_type_idbigintcreated_attimestamptzupdated_attimestamptzenabledbooleanpropagatebooleanwork_item_type_visibility_defaultsid PKbigintnamespace_id FKbigintwork_item_type_idbigintcreated_attimestamptzupdated_attimestamptzenabledbooleanorganization_id FKbigintwork_item_weights_sourceswork_item_id PKbigintnamespace_id FKbigintrolled_up_weightbigintrolled_up_completed_weightbigintcreated_attimestamptzupdated_attimestamptzcustom_field_select_optionscustom_fieldsepicsissuesmilestonesnamespacesorganizationsusersnamespace_idwork_item_idissue_idnamespace_idnamespace_idupdated_by_idcreated_by_idorganization_idnamespace_idnamespace_idwork_item_idcustom_field_idstart_date_sourcing_milestone_idstart_date_sourcing_work_item_iddue_date_sourcing_work_item_iddue_date_sourcing_milestone_idissue_idnamespace_idnamespace_idwork_item_idcustom_field_idnamespace_idwork_item_parent_idwork_item_idnamespace_idwork_item_idnamespace_idissue_idnamespace_idwork_item_idcustom_field_select_option_idcustom_field_idnamespace_idorganization_idnamespace_idwork_item_idcustom_field_idpromoted_to_epic_idwork_item_idduplicated_to_idmoved_to_idnamespace_idcustom_field_idnamespace_iduser_idnamespace_idnamespace_idnamespace_idorganization_idnamespace_idwork_item_idcustom_status_idwork_item_idnamespace_idnamespace_iddefault_open_status_idupdated_by_idcreated_by_iddefault_duplicate_status_iddefault_closed_status_idnamespace_idnew_status_idold_status_idnamespace_idstatus_idlifecycle_idlifecycle_idnamespace_id

Relationships

work_item_agent_plans

8 cols · no RLS · line 34664View in 3D
ColumnTypeNullDefaultReferencesNotes
work_item_id PKbigintNOT NULLissues.id 1:1 · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
cached_markdown_version integernull
file_store smallintNOT NULL1
readiness_score smallintnull
ai_planning_enabled booleanNOT NULLFALSE

Indexes

  • (namespace_id) index_work_item_agent_plans_on_namespace_id

Referenced by

  • nothing

work_item_colors

5 cols · no RLS · line 34675View in 3D
  • Junction table allows duplicate links issue_id, namespace_idwork_item_colors looks like a many-to-many link table but has no unique constraint across (issue_id, namespace_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
issue_id PKbigintNOT NULLissues.id 1:1 · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
color textNOT NULLCHECK char_length(color) <= 7

Indexes

  • (namespace_id) wi_colors_namespace_id_index

Referenced by

  • nothing

Table checks: char_length(color) <= 7

work_item_current_statuses

6 cols · no RLS · line 34684View in 3D
  • Nullable foreign key custom_status_idwork_item_current_statuses.custom_status_id may be NULL, so the relationship to work_item_custom_statuses is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
work_item_id bigintNOT NULLissues.id 1:1 · CASCADE
system_defined_status_id bigintnull
custom_status_id bigintnullwork_item_custom_statuses.id 1:N · SET NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (work_item_id, custom_status_id) idx_wi_current_statuses_on_wi_id_custom_status_id_unique
  • UNIQUE (work_item_id, system_defined_status_id) idx_wi_current_statuses_on_wi_id_system_def_status_id_unique
  • (custom_status_id) index_work_item_current_statuses_on_custom_status_id
  • (namespace_id) index_work_item_current_statuses_on_namespace_id
  • UNIQUE (work_item_id) index_work_item_current_statuses_on_work_item_id

Referenced by

  • nothing

Table checks: num_nonnulls(custom_status_id, system_defined_status_id) > 0

work_item_custom_lifecycle_statuses

7 cols · no RLS · line 34703View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
lifecycle_id bigintNOT NULLwork_item_custom_lifecycles.id 1:N · CASCADE
status_id bigintNOT NULLwork_item_custom_statuses.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
position integerNOT NULL0CHECK position >= 0

Indexes

  • UNIQUE (lifecycle_id, status_id) idx_lifecycle_statuses_on_lifecycle_and_status
  • (namespace_id) idx_wi_custom_lifecycle_statuses_on_namespace_id
  • (status_id) idx_wi_custom_lifecycle_statuses_on_status_id

Referenced by

  • nothing

Table checks: position >= 0

work_item_custom_lifecycles

10 cols · no RLS · line 34723View in 3D
  • Nullable foreign key updated_by_idwork_item_custom_lifecycles.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key created_by_idwork_item_custom_lifecycles.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK updated_by_id, created_by_idwork_item_custom_lifecycles has several nullable FKs (updated_by_id, created_by_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
default_open_status_id bigintNOT NULLwork_item_custom_statuses.id 1:N · CASCADE
default_closed_status_id bigintNOT NULLwork_item_custom_statuses.id 1:N · CASCADE
default_duplicate_status_id bigintNOT NULLwork_item_custom_statuses.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 64
created_by_id bigintnullusers.id 1:N · SET NULL
updated_by_id bigintnullusers.id 1:N · SET NULL

Indexes

  • (default_closed_status_id) idx_wi_custom_lifecycles_on_closed_status_id
  • (default_duplicate_status_id) idx_wi_custom_lifecycles_on_duplicate_status_id
  • (default_open_status_id) idx_wi_custom_lifecycles_on_open_status_id
  • (created_by_id) index_work_item_custom_lifecycles_on_created_by_id
  • UNIQUE (namespace_id, name) index_work_item_custom_lifecycles_on_namespace_id_and_name
  • (updated_by_id) index_work_item_custom_lifecycles_on_updated_by_id

Referenced by

Table checks: char_length(name) <= 64

work_item_custom_status_mappings

10 cols · no RLS · line 34746View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
old_status_id bigintNOT NULLwork_item_custom_statuses.id 1:N · RESTRICT
new_status_id bigintNOT NULLwork_item_custom_statuses.id 1:N · CASCADE
work_item_type_id bigintNOT NULL
valid_from timestamptznull
valid_until timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
old_status_role smallintnull

Indexes

  • (namespace_id) index_work_item_custom_status_mappings_on_namespace_id
  • (new_status_id) index_work_item_custom_status_mappings_on_new_status_id
  • (old_status_id) index_work_item_custom_status_mappings_on_old_status_id
  • (work_item_type_id) index_work_item_custom_status_mappings_on_work_item_type_id

Referenced by

  • nothing

Table checks: valid_from IS NULL OR valid_until IS NULL OR valid_from < valid_until; old_status_id <> new_status_id

work_item_custom_statuses

11 cols · no RLS · line 34770View in 3D
  • Nullable foreign key updated_by_idwork_item_custom_statuses.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key created_by_idwork_item_custom_statuses.created_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK updated_by_id, created_by_idwork_item_custom_statuses has several nullable FKs (updated_by_id, created_by_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
category smallintNOT NULL1CHECK category > 0
name textNOT NULLCHECK char_length(name) <= 32
description textnullCHECK char_length(description) <= 128
color textNOT NULLCHECK char_length(color) <= 7
created_by_id bigintnullusers.id 1:N · SET NULL
updated_by_id bigintnullusers.id 1:N · SET NULL
converted_from_system_defined_status_identifier smallintnull

Indexes

  • (created_by_id) index_work_item_custom_statuses_on_created_by_id
  • UNIQUE (namespace_id, pg_catalog.btrim(lower(name))) index_work_item_custom_statuses_on_namespace_id_and_lower_name
  • (updated_by_id) index_work_item_custom_statuses_on_updated_by_id

Referenced by

Table checks: char_length(color) <= 7; char_length(name) <= 32; char_length(description) <= 128; category > 0; name !~ CAST('^["''`]|["''`]$|[\x00-\x1F\x7F]' AS text)

work_item_custom_types

9 cols · no RLS · line 34797View in 3D
  • Nullable foreign key organization_idwork_item_custom_types.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idwork_item_custom_types.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULLCHECK id >= 1001
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintnullorganizations.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
icon_name smallintNOT NULL0
converted_from_system_defined_type_identifier smallintnull
name textNOT NULLCHECK char_length(name) <= 48
archived booleanNOT NULLFALSE

Indexes

  • UNIQUE (namespace_id, lower(name)) WHERE namespace_id IS NOT NULL idx_work_item_custom_types_on_ns_id_and_name
  • UNIQUE (organization_id, lower(name)) WHERE organization_id IS NOT NULL idx_work_item_custom_types_on_org_id_and_name

Referenced by

  • nothing

Table checks: id >= 1001; char_length(name) <= 48; num_nonnulls(namespace_id, organization_id) = 1

work_item_date_field_values

7 cols · no RLS · line 34821View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
work_item_id bigintNOT NULLissues.id 1:N · CASCADE
custom_field_id bigintNOT NULLcustom_fields.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
value dateNOT NULL

Indexes

  • UNIQUE (work_item_id, custom_field_id) i_wi_date_values_on_work_item_id_custom_field_id
  • (custom_field_id) index_work_item_date_field_values_on_custom_field_id
  • (namespace_id) index_work_item_date_field_values_on_namespace_id

Referenced by

  • nothing

work_item_dates_sources

14 cols · no RLS · line 34840View in 3D
  • Nullable foreign key start_date_sourcing_milestone_idwork_item_dates_sources.start_date_sourcing_milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key start_date_sourcing_work_item_idwork_item_dates_sources.start_date_sourcing_work_item_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key due_date_sourcing_work_item_idwork_item_dates_sources.due_date_sourcing_work_item_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key due_date_sourcing_milestone_idwork_item_dates_sources.due_date_sourcing_milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK start_date_sourcing_milestone_id, start_date_sourcing_work_item_id, due_date_sourcing_work_item_id, due_date_sourcing_milestone_idwork_item_dates_sources has several nullable FKs (start_date_sourcing_milestone_id, start_date_sourcing_work_item_id, due_date_sourcing_work_item_id, due_date_sourcing_milestone_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
issue_id PKbigintNOT NULLissues.id 1:1 · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
start_date_is_fixed booleanNOT NULLFALSE
due_date_is_fixed booleanNOT NULLFALSE
start_date datenull
due_date datenull
start_date_sourcing_work_item_id bigintnullissues.id 1:N · SET NULL
start_date_sourcing_milestone_id bigintnullmilestones.id 1:N · SET NULL
due_date_sourcing_work_item_id bigintnullissues.id 1:N · SET NULL
due_date_sourcing_milestone_id bigintnullmilestones.id 1:N · SET NULL
start_date_fixed datenull
due_date_fixed datenull

Indexes

  • (due_date_sourcing_milestone_id) wi_datessources_due_date_sourcing_milestone_id_index
  • (due_date_sourcing_work_item_id) wi_datessources_due_date_sourcing_work_item_id_index
  • (namespace_id) wi_datessources_namespace_id_index
  • (start_date_sourcing_milestone_id) wi_datessources_start_date_sourcing_milestone_id_index
  • (start_date_sourcing_work_item_id) wi_datessources_start_date_sourcing_work_item_id_index

Referenced by

  • nothing

work_item_number_field_values

7 cols · no RLS · line 34857View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
work_item_id bigintNOT NULLissues.id 1:N · CASCADE
custom_field_id bigintNOT NULLcustom_fields.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
value numericNOT NULL

Indexes

  • UNIQUE (work_item_id, custom_field_id) idx_wi_number_values_on_work_item_id_custom_field_id
  • (custom_field_id) index_work_item_number_field_values_on_custom_field_id
  • (namespace_id) index_work_item_number_field_values_on_namespace_id

Referenced by

  • nothing

work_item_positions

6 cols · no RLS · line 34896View in 3D
ColumnTypeNullDefaultReferencesNotes
work_item_id PKbigintNOT NULLissues.id 1:1 · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
relative_position bigintnull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relative_positioning_namespace_id bigintnull

Indexes

  • (relative_positioning_namespace_id, relative_position) index_wi_positions_on_positioning_ns_id_and_relative_position
  • (namespace_id, relative_position) index_work_item_positions_on_namespace_id_and_relative_position

Referenced by

  • nothing

work_item_progresses

11 cols · no RLS · line 34905View in 3D
  • Nullable foreign key namespace_idwork_item_progresses.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
issue_id PKbigintNOT NULLissues.id 1:1 · CASCADE
progress smallintNOT NULL0
start_value double precisionNOT NULL0.0
end_value double precisionNOT NULL100.0
current_value double precisionNOT NULL0.0
rollup_progress booleanNOT NULLTRUE
reminder_frequency smallintNOT NULL0
last_reminder_sent_at timestamptznull
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (reminder_frequency) idx_reminder_frequency_on_work_item_progresses
  • (namespace_id) index_work_item_progresses_on_namespace_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

work_item_select_field_values

7 cols · no RLS · line 34920View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
work_item_id bigintNOT NULLissues.id 1:N · CASCADE
custom_field_id bigintNOT NULLcustom_fields.id 1:N · CASCADE
custom_field_select_option_id bigintNOT NULLcustom_field_select_options.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (custom_field_select_option_id) idx_wi_select_field_values_on_custom_field_select_option_id
  • UNIQUE (work_item_id, custom_field_id, custom_field_select_option_id) idx_wi_select_values_on_wi_custom_field_id_select_option_id
  • (custom_field_id) index_work_item_select_field_values_on_custom_field_id
  • (namespace_id) index_work_item_select_field_values_on_namespace_id

Referenced by

  • nothing

work_item_settings

6 cols · no RLS · line 34939View in 3D
  • Nullable foreign key namespace_idwork_item_settings.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idwork_item_settings.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintnullorganizations.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
customizable_type_visibility booleanNOT NULLFALSE

Indexes

  • UNIQUE (namespace_id) WHERE namespace_id IS NOT NULL idx_work_item_settings_on_namespace_id
  • UNIQUE (organization_id) WHERE organization_id IS NOT NULL idx_work_item_settings_on_organization_id

Referenced by

  • nothing

Table checks: num_nonnulls(namespace_id, organization_id) = 1

work_item_text_field_values

7 cols · no RLS · line 34958View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
work_item_id bigintNOT NULLissues.id 1:N · CASCADE
custom_field_id bigintNOT NULLcustom_fields.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
value textNOT NULLCHECK char_length(value) <= 1024

Indexes

  • UNIQUE (work_item_id, custom_field_id) idx_wi_text_values_on_work_item_id_custom_field_id
  • (custom_field_id) index_work_item_text_field_values_on_custom_field_id
  • (namespace_id) index_work_item_text_field_values_on_namespace_id

Referenced by

  • nothing

Table checks: char_length(value) <= 1024

work_item_transitions

5 cols · no RLS · line 34978View in 3D
  • Nullable foreign key promoted_to_epic_idwork_item_transitions.promoted_to_epic_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key duplicated_to_idwork_item_transitions.duplicated_to_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key moved_to_idwork_item_transitions.moved_to_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK promoted_to_epic_id, duplicated_to_id, moved_to_idwork_item_transitions has several nullable FKs (promoted_to_epic_id, duplicated_to_id, moved_to_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
work_item_id PKbigintNOT NULLissues.id 1:1 · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
moved_to_id bigintnullissues.id 1:N · SET NULL
duplicated_to_id bigintnullissues.id 1:N · SET NULL
promoted_to_epic_id bigintnullepics.id 1:N · SET NULL

Indexes

  • (duplicated_to_id) WHERE duplicated_to_id IS NOT NULL index_work_item_transitions_on_duplicated_to_id
  • (moved_to_id) WHERE moved_to_id IS NOT NULL index_work_item_transitions_on_moved_to_id
  • (namespace_id) index_work_item_transitions_on_namespace_id
  • (promoted_to_epic_id) WHERE promoted_to_epic_id IS NOT NULL index_work_item_transitions_on_promoted_to_epic_id

Referenced by

  • nothing

work_item_type_custom_fields

6 cols · no RLS · line 34986View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
custom_field_id bigintNOT NULLcustom_fields.id 1:N · CASCADE
work_item_type_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (namespace_id, work_item_type_id, custom_field_id) idx_wi_type_custom_fields_on_ns_id_wi_type_id_custom_field_id
  • (custom_field_id) index_work_item_type_custom_fields_on_custom_field_id
  • (work_item_type_id) index_work_item_type_custom_fields_on_work_item_type_id

Referenced by

  • nothing

work_item_type_custom_lifecycles

6 cols · no RLS · line 35004View in 3D
  • Junction table allows duplicate links lifecycle_id, namespace_idwork_item_type_custom_lifecycles looks like a many-to-many link table but has no unique constraint across (lifecycle_id, namespace_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
work_item_type_id bigintNOT NULL
lifecycle_id bigintNOT NULLwork_item_custom_lifecycles.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (lifecycle_id) idx_wi_type_custom_lifecycles_on_lifecycle_id
  • UNIQUE (namespace_id, work_item_type_id) idx_wi_type_custom_lifecycles_on_namespace_and_work_item_type
  • (work_item_type_id) idx_wi_type_custom_lifecycles_on_work_item_type_id

Referenced by

  • nothing

work_item_type_user_preferences

8 cols · no RLS · line 35022View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
work_item_type_id bigintnull
sort textnullCHECK char_length(sort) <= 255
display_settings jsonbNOT NULLCAST('{}' AS jsonb)CHECK jsonb_typeof(display_settings) = CAST('object' AS text)

Indexes

  • (namespace_id) index_work_item_type_user_preferences_on_namespace_id
  • (work_item_type_id) index_work_item_type_user_preferences_on_work_item_type_id
  • (user_id, namespace_id, work_item_type_id) uniq_preference_by_user_namespace_and_work_item_type

Referenced by

  • nothing

Table checks: char_length(sort) <= 255; jsonb_typeof(display_settings) = CAST('object' AS text)

work_item_type_visibilities

7 cols · no RLS · line 35044View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
work_item_type_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
enabled booleanNOT NULLTRUE
propagate booleanNOT NULLFALSE

Indexes

  • (work_item_type_id) index_work_item_type_visibilities_on_work_item_type_id
  • UNIQUE (namespace_id, work_item_type_id) uniq_wi_type_visibilities_on_namespace_and_type

Referenced by

  • nothing

work_item_type_visibility_defaults

7 cols · no RLS · line 35063View in 3D
  • Nullable foreign key namespace_idwork_item_type_visibility_defaults.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idwork_item_type_visibility_defaults.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADE
work_item_type_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
enabled booleanNOT NULLTRUE
organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (work_item_type_id) index_work_item_type_visibility_defaults_on_work_item_type_id
  • UNIQUE (namespace_id, work_item_type_id) WHERE namespace_id IS NOT NULL uniq_wi_type_visibility_defaults_on_namespace_and_type
  • UNIQUE (organization_id, work_item_type_id) WHERE organization_id IS NOT NULL uniq_wi_type_visibility_defaults_on_org_and_type

Referenced by

  • nothing

Table checks: num_nonnulls(namespace_id, organization_id) = 1

work_item_weights_sources

6 cols · no RLS · line 35083View in 3D
ColumnTypeNullDefaultReferencesNotes
work_item_id PKbigintNOT NULLissues.id 1:1 · CASCADE
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
rolled_up_weight bigintnull
rolled_up_completed_weight bigintnull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (namespace_id) index_work_item_weights_sources_on_namespace_id
  • (work_item_id) index_work_item_weights_sources_on_work_item_id

Referenced by

  • nothing

workspace 3 tables

Tables whose names start with workspace_.

Entity-relationship diagram: workspace_agentk_states, workspace_tokens, workspace_variablesworkspace_agentk_statesid PKbigintcreated_attimestamptzupdated_attimestamptzworkspace_id FKbigintproject_id FKbigintdesired_configjsonbworkspace_tokensid PKbigintworkspace_id FKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbiginttoken_encryptedtextworkspace_variablesid PKbigintworkspace_id FKbigintvariable_typesmallintcreated_attimestamptzupdated_attimestamptzkeytextencrypted_valuebyteaencrypted_value_ivbyteaproject_id FKbigintuser_providedbooleanprojectsworkspacesworkspace_idproject_idproject_idworkspace_idproject_idworkspace_id

Relationships

workspace_agentk_states

6 cols · no RLS · line 35092View in 3D
  • Junction table allows duplicate links project_id, workspace_idworkspace_agentk_states looks like a many-to-many link table but has no unique constraint across (project_id, workspace_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
workspace_id bigintNOT NULLworkspaces.id 1:1 · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
desired_config jsonbNOT NULL

Indexes

  • (project_id) index_workspace_agentk_states_on_project_id
  • UNIQUE (workspace_id) index_workspace_agentk_states_on_workspace_id

Referenced by

  • nothing

workspace_tokens

6 cols · no RLS · line 35110View in 3D
  • Junction table allows duplicate links project_id, workspace_idworkspace_tokens looks like a many-to-many link table but has no unique constraint across (project_id, workspace_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
workspace_id bigintNOT NULLworkspaces.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
token_encrypted textNOT NULLCHECK char_length(token_encrypted) <= 512

Indexes

  • (project_id) index_workspace_tokens_on_project_id
  • (token_encrypted) index_workspace_tokens_on_token_encrypted
  • UNIQUE (workspace_id) index_workspace_tokens_on_workspace_id

Referenced by

  • nothing

Table checks: char_length(token_encrypted) <= 512; char_length(token_encrypted) <= 512

workspace_variables

10 cols · no RLS · line 35130View in 3D
  • Nullable foreign key project_idworkspace_variables.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
workspace_id bigintNOT NULLworkspaces.id 1:N · CASCADE
variable_type smallintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
key textNOT NULLCHECK char_length(key) <= 255
encrypted_value byteaNOT NULL
encrypted_value_iv byteaNOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
user_provided booleanNOT NULLFALSE

Indexes

  • (project_id) index_workspace_variables_on_project_id
  • (workspace_id) index_workspace_variables_on_workspace_id

Referenced by

  • nothing

Table checks: char_length(key) <= 255; project_id IS NOT NULL

workspaces 3 tables

Tables whose names start with workspaces_.

Entity-relationship diagram: workspaces, workspaces_agent_config_versions, workspaces_agent_configsworkspacesid PKbigintcreated_attimestamptzupdated_attimestamptzuser_id FKbigintproject_id FKbigintcluster_agent_id FKbigintdesired_state_updated_attimestamptzresponded_to_agent_attimestamptznametextnamespacetextdesired_statetextactual_statetextdevfile_pathtextdevfiletextprocessed_devfiletexturltextdeployment_resource_versiontextpersonal_access_token_id FKbigintforce_include_all_resourcesbooleanurl_prefixtexturl_query_stringtextworkspaces_agent_config_versionintegerproject_reftextactual_state_updated_attimestamptzworkspaces_agent_config_versionsid PKbigintcreated_attimestamptzproject_id FKbigintitem_idbiginteventtextwhodunnittextitem_typetextobjectjsonbobject_changesjsonbworkspaces_agent_configsid PKbigintcreated_attimestamptzupdated_attimestamptzcluster_agent_id FKbigintworkspaces_quotabigintworkspaces_per_user_quotabigintproject_id FKbigintenabledbooleannetwork_policy_enabledbooleandns_zonetextgitlab_workspaces_proxy_namespacetextnetwork_policy_egressjsonbdefault_resources_per_workspace_containerjsonbmax_resources_per_workspacejsonballow_privilege_escalationbooleanuse_kubernetes_user_namespacesbooleandefault_runtime_classtextannotationsjsonblabelsjsonbimage_pull_secretsjsonbmax_active_hours_before_stopsmallintmax_stopped_hours_before_terminationsmallintshared_namespacetextgitlab_workspaces_proxy_http_enabledbooleangitlab_workspaces_proxy_ssh_enabledbooleancluster_agentspersonal_access_tokensprojectsusersuser_idproject_idpersonal_access_token_idcluster_agent_idproject_idcluster_agent_idproject_id

Relationships

workspaces

24 cols · no RLS · line 35154View in 3D
  • Nullable foreign key personal_access_token_idworkspaces.personal_access_token_id may be NULL, so the relationship to personal_access_tokens is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
cluster_agent_id bigintNOT NULLcluster_agents.id 1:N · CASCADE
desired_state_updated_at timestamptzNOT NULL
responded_to_agent_at timestamptznull
name textNOT NULLCHECK char_length(name) <= 64
namespace textNOT NULLCHECK char_length(namespace) <= 64
desired_state textNOT NULLCHECK char_length(desired_state) <= 32
actual_state textNOT NULLCHECK char_length(actual_state) <= 32
devfile_path textnullCHECK char_length(devfile_path) <= 2048
devfile textnullCHECK char_length(devfile) <= 65535
processed_devfile textnullCHECK char_length(processed_devfile) <= 65535
url textnullCHECK char_length(url) <= 1024
deployment_resource_version textnullCHECK char_length(deployment_resource_version) <= 64
personal_access_token_id bigintnullpersonal_access_tokens.id 1:N · RESTRICTCHECK personal_access_token_id IS NOT NULL
force_include_all_resources booleanNOT NULLTRUE
url_prefix textnullCHECK char_length(url_prefix) <= 256
url_query_string textnullCHECK char_length(url_query_string) <= 256
workspaces_agent_config_version integerNOT NULL
project_ref textnullCHECK char_length(project_ref) <= 256
actual_state_updated_at timestamptzNOT NULL

Indexes

  • (cluster_agent_id) index_workspaces_on_cluster_agent_id
  • UNIQUE (name) index_workspaces_on_name
  • (personal_access_token_id) index_workspaces_on_personal_access_token_id
  • (project_id) index_workspaces_on_project_id
  • (user_id) index_workspaces_on_user_id

Referenced by

Table checks: char_length(name) <= 64; char_length(namespace) <= 64; char_length(deployment_resource_version) <= 64; char_length(project_ref) <= 256; char_length(processed_devfile) <= 65535; char_length(url_query_string) <= 256; char_length(actual_state) <= 32; char_length(url) <= 1024; project_ref IS NOT NULL; char_length(desired_state) <= 32; char_length(devfile_path) <= 2048; char_length(devfile) <= 65535; char_length(url_prefix) <= 256; personal_access_token_id IS NOT NULL

workspaces_agent_config_versions

9 cols · no RLS · line 35194View in 3D
  • Polymorphic reference without referential integrity item_type, item_iditem_id points at different tables depending on item_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptznull
project_id bigintNOT NULLprojects.id 1:N · CASCADE
item_id bigintNOT NULL
event textNOT NULLCHECK char_length(event) <= 20
whodunnit textnullCHECK char_length(whodunnit) <= 255
item_type textNOT NULLCHECK char_length(item_type) <= 255
object jsonbnull
object_changes jsonbnull

Indexes

  • (item_id) index_workspaces_agent_config_versions_on_item_id
  • (project_id) index_workspaces_agent_config_versions_on_project_id

Referenced by

  • nothing

Table checks: char_length(whodunnit) <= 255; char_length(event) <= 20; char_length(item_type) <= 255

workspaces_agent_configs

25 cols · no RLS · line 35218View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
cluster_agent_id bigintNOT NULLcluster_agents.id 1:1 · CASCADE
workspaces_quota bigintNOT NULLCAST('-1' AS integer)
workspaces_per_user_quota bigintNOT NULLCAST('-1' AS integer)
project_id bigintNOT NULLprojects.id 1:N · CASCADE
enabled booleanNOT NULL
network_policy_enabled booleanNOT NULLTRUE
dns_zone textNOT NULLCAST('' AS text)CHECK char_length(dns_zone) <= 256
gitlab_workspaces_proxy_namespace textNOT NULLCAST('gitlab-workspaces' AS text)CHECK char_length(gitlab_workspaces_proxy_namespace) <= 63
network_policy_egress jsonbNOT NULLCAST('[{"allow": "0.0.0.0/0", "except": ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]}]' AS jsonb)
default_resources_per_workspace_container jsonbNOT NULLCAST('{}' AS jsonb)
max_resources_per_workspace jsonbNOT NULLCAST('{}' AS jsonb)
allow_privilege_escalation booleanNOT NULLFALSE
use_kubernetes_user_namespaces booleanNOT NULLFALSE
default_runtime_class textNOT NULLCAST('' AS text)CHECK char_length(default_runtime_class) <= 253
annotations jsonbNOT NULLCAST('{}' AS jsonb)
labels jsonbNOT NULLCAST('{}' AS jsonb)
image_pull_secrets jsonbNOT NULLCAST('[]' AS jsonb)
max_active_hours_before_stop smallintNOT NULL36CHECK max_active_hours_before_stop > 0
max_stopped_hours_before_termination smallintNOT NULL744CHECK max_stopped_hours_before_termination > 0
shared_namespace textNOT NULLCAST('' AS text)CHECK char_length(shared_namespace) <= 63
gitlab_workspaces_proxy_http_enabled booleanNOT NULLTRUE
gitlab_workspaces_proxy_ssh_enabled booleanNOT NULLTRUE

Indexes

  • (project_id) index_workspaces_agent_configs_on_project_id
  • UNIQUE (cluster_agent_id) index_workspaces_agent_configs_on_unique_cluster_agent_id

Referenced by

  • nothing

Table checks: char_length(shared_namespace) <= 63; max_stopped_hours_before_termination > 0; char_length(dns_zone) <= 256; (max_active_hours_before_stop + max_stopped_hours_before_termination) <= 8760; char_length(default_runtime_class) <= 253; max_active_hours_before_stop > 0; char_length(gitlab_workspaces_proxy_namespace) <= 63

x509 3 tables

Tables whose names start with x509_.

Entity-relationship diagram: x509_certificates, x509_commit_signatures, x509_issuersx509_certificatesid PKbigintcreated_attimestamptzupdated_attimestamptzsubject_key_identifiervarchar(255)subjectvarchar(512)emailvarchar(255)serial_numberbyteacertificate_statussmallintx509_issuer_id FKbigintemailsvarchar[]project_id FKbigintx509_commit_signaturesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintx509_certificate_id FKbigintcommit_shabyteaverification_statussmallintcommitter_emailtextx509_issuersid PKbigintcreated_attimestamptzupdated_attimestamptzsubject_key_identifiervarchar(255)subjectvarchar(255)crl_urlvarchar(255)project_id FKbigintprojectsproject_idproject_idx509_issuer_idx509_certificate_idproject_id

Relationships

x509_certificates

11 cols · no RLS · line 35271View in 3D
  • Nullable foreign key project_idx509_certificates.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
subject_key_identifier varchar(255)NOT NULL
subject varchar(512)null
email varchar(255)NOT NULL
serial_number byteaNOT NULLCHECK octet_length(serial_number) <= 25
certificate_status smallintNOT NULL0
x509_issuer_id bigintNOT NULLx509_issuers.id 1:N · CASCADE
emails varchar[]NOT NULLCAST('{}' AS varchar[])
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_x509_certificates_on_project_id
  • (subject_key_identifier) index_x509_certificates_on_subject_key_identifier
  • (x509_issuer_id) index_x509_certificates_on_x509_issuer_id

Referenced by

Table checks: project_id IS NOT NULL; octet_length(serial_number) <= 25

x509_commit_signatures

8 cols · no RLS · line 35295View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
x509_certificate_id bigintNOT NULLx509_certificates.id 1:N · CASCADE
commit_sha byteaNOT NULL
verification_status smallintNOT NULL0
committer_email textnullCHECK char_length(committer_email) <= 255

Indexes

  • (commit_sha) index_x509_commit_signatures_on_commit_sha
  • (project_id) index_x509_commit_signatures_on_project_id
  • (x509_certificate_id) index_x509_commit_signatures_on_x509_certificate_id

Referenced by

  • nothing

Table checks: char_length(committer_email) <= 255

x509_issuers

7 cols · no RLS · line 35316View in 3D
  • Nullable foreign key project_idx509_issuers.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
subject_key_identifier varchar(255)NOT NULL
subject varchar(255)null
crl_url varchar(255)null
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_x509_issuers_on_project_id
  • (subject_key_identifier) index_x509_issuers_on_subject_key_identifier

Referenced by

Table checks: project_id IS NOT NULL

misc 120 tables

Tables whose name prefix is theirs alone.

Entity-relationship diagram: groups_visits, verification_codes, uploads, achievements, activation_metrics, activity_pub_releases_subscriptions, admin_roles, allowed_email_domains, appearances, approvals, ar_internal_metadata, arkose_sessions, artifact_registry_namespace_mappings, atlassian_identities, authentication_events, automation_rules, award_emoji, aws_roles, badges, banned_users, broadcast_messages, burned_project_routes, cells_outstanding_leases, commit_user_mentions, compromised_password_detections, content_blocked_states, conversational_development_index_metrics, country_access_logs, coverage_fuzzing_corpuses, csv_issue_imports, deployments, description_versions, designated_beneficiaries, detached_partitions, diff_note_positions, dingtalk_tracker_data, draft_notes, early_access_program_tracking_events, emails, environments, epics, events, evidences, excluded_merge_requests, feature_gates, features, ghost_user_migrations, grafana_integrations, granular_scopes, routes, shards, historical_data, iam_outbox, identities, index_statuses, insights, integrations, internal_ids, ip_restrictions, issues, iterations_cadences, job_environments, keys, knowledge_graph_enabled_namespaces, labels, licenses, list_user_preferences, lists, milestone_releases, milestones, mobile_device_push_subscriptions, non_sql_service_pings, notes, notification_settings, onboarding_progresses, organizations, path_locks, snippets, pipl_users, plan_limits, plans, pool_repositories, programming_languages, queries_service_pings, raw_usage_data, redirect_routes, related_epic_links, relation_import_trackers, release_links, releases, remote_mirrors, repository_languages, required_code_owners_sections, reviews, schema_migrations, sentry_issues, slsa_attestations, smartcard_identities, software_license_policies, spam_logs, sprints, ssh_signatures, subscriptions, suggestions, supply_chain_attestation_states, tags, target_branch_rules, term_agreements, timelog_categories, timelogs, todos, topics, upcoming_reconciliations, upload_states, vs_code_settings, vulnerabilities, webauthn_registrations, xray_reports, zentao_tracker_data, zoom_meetingsgroups_visitsid PKbigintentity_idbigintuser_idbigintvisited_at PKtimestamptzverification_codescreated_at PKtimestamptzvisitor_id_code PKtextcode PKtextphone PKtextuploadsid PKbigintsizebigintmodel_idbigintuploaded_by_user_id FKbigintorganization_id FKbigintnamespace_id FKbigintproject_id FKbigintcreated_attimestampstoreintegerversionintegerpathtextchecksumtextmodel_type PKtextuploadertextmount_pointtextsecrettextachievementsid PKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptznametextavatartextdescriptiontextactivation_metricsid PKbigintcreated_attimestamptzupdated_attimestamptzuser_id FKbigintnamespace_id FKbigintmetricsmallintactivity_pub_releases_subscriptionsid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzstatussmallintshared_inbox_urltextsubscriber_inbox_urltextsubscriber_urltextpayloadjsonbadmin_rolesid PKbigintnametextdescriptiontextpermissionsjsonbcreated_attimestamptzupdated_attimestamptzorganization_id FKbigintallowed_email_domainsid PKbigintcreated_attimestamptzupdated_attimestamptzgroup_id FKbigintdomainvarchar(255)appearancesid PKbiginttitlevarchardescriptiontextlogovarcharupdated_byintegerheader_logovarcharcreated_attimestamptzupdated_attimestamptzdescription_htmltextcached_markdown_versionintegernew_project_guidelinestextnew_project_guidelines_htmltextheader_messagetextheader_message_htmltextfooter_messagetextfooter_message_htmltextmessage_background_colortextmessage_font_colortextfaviconvarcharemail_header_and_footer_enabledbooleanprofile_image_guidelinestextprofile_image_guidelines_htmltextpwa_short_nametextpwa_icontextpwa_nametextpwa_descriptiontextmember_guidelinestextmember_guidelines_htmltextsite_nametextapprovalsid PKbigintmerge_request_id FKbigintuser_idbigintcreated_attimestampupdated_attimestamppatch_id_shabyteaproject_id FKbigintar_internal_metadatakey PKvarcharvaluevarcharcreated_attimestamp(6)updated_attimestamp(6)arkose_sessionsid PKbigintsession_created_attimestamptzchecked_answer_attimestamptzverified_attimestamptzuser_id FKbigintglobal_scoreintegercustom_scoreintegerchallenge_shownbooleanchallenge_solvedbooleansession_is_legitbooleanis_torbooleanis_vpnbooleanis_proxybooleanis_botbooleansession_xidtexttelltale_usertextuser_agenttextuser_language_showntextdevice_xidtexttelltale_listtext[]user_iptextcountrytextregiontextcitytextisptextconnection_typetextrisk_bandtextrisk_categorytextja4_hashtextcanvas_fingerprintbigintartifact_registry_namespace_mappingsid PKbigintorganization_id FKbigintar_namespace_iduuidcreated_attimestamptzupdated_attimestamptzatlassian_identitiesuser_id PKbigintcreated_attimestamptzupdated_attimestamptzexpires_attimestamptzextern_uidtextencrypted_tokenbyteaencrypted_token_ivbyteaencrypted_refresh_tokenbyteaencrypted_refresh_token_ivbyteaauthentication_eventsid PKbigintcreated_attimestamptzuser_id FKbigintresultsmallintip_addressinetprovidertextuser_nametextorganization_id FKbigintautomation_rulesid PKbigintnamespace_id FKbigintissues_eventsbooleanmerge_requests_eventsbooleanpermanently_disabledbooleannametextruletextcreated_attimestamptzupdated_attimestamptzaward_emojiid PKbigintnamevarcharuser_idbigintawardable_typevarcharcreated_attimestampupdated_attimestampawardable_idbigintnamespace_id FKbigintorganization_id FKbigintaws_rolesuser_id PKbigintcreated_attimestamptzupdated_attimestamptzrole_arnvarchar(2048)role_external_idvarchar(64)regiontextbadgesid PKbigintlink_urlvarcharimage_urlvarcharproject_id FKbigintgroup_id FKbiginttypevarcharnamevarchar(255)created_attimestamptzupdated_attimestamptzbanned_userscreated_attimestamptzupdated_attimestamptzuser_id PKbigintprojects_deletedbooleanbroadcast_messagesid PKbigintmessagetextstarts_attimestampends_attimestampcreated_attimestampupdated_attimestampcolorvarcharfontvarcharmessage_htmltextcached_markdown_versionintegertarget_pathvarchar(255)broadcast_typesmallintdismissablebooleantarget_access_levelsinteger[]themesmallintshow_in_clibooleanburned_project_routesid PKbigintorganization_id FKbigintproject_idbigintburned_attimestamptzcreated_attimestamptzupdated_attimestamptzpathtextcells_outstanding_leasesuuid PKuuidcreated_attimestamptzupdated_attimestamptzcommit_user_mentionsid PKbigintmentioned_users_idsbigint[]mentioned_projects_idsbigint[]mentioned_groups_idsbigint[]commit_idvarcharnote_id FKbigintnamespace_id FKbigintcompromised_password_detectionsid PKbigintcreated_attimestamptzupdated_attimestamptzresolved_attimestamptzuser_id FKbigintcontent_blocked_statesid PKbigintcreated_attimestamptzupdated_attimestamptzcommit_shabyteablob_shabyteapathtextcontainer_identifiertextconversational_development_index_metricsid PKbigintleader_issuesdouble precisioninstance_issuesdouble precisionleader_notesdouble precisioninstance_notesdouble precisionleader_milestonesdouble precisioninstance_milestonesdouble precisionleader_boardsdouble precisioninstance_boardsdouble precisionleader_merge_requestsdouble precisioninstance_merge_requestsdouble precisionleader_ci_pipelinesdouble precisioninstance_ci_pipelinesdouble precisionleader_environmentsdouble precisioninstance_environmentsdouble precisionleader_deploymentsdouble precisioninstance_deploymentsdouble precisionleader_projects_prometheus_activedouble precisioninstance_projects_prometheus_activedouble precisionleader_service_desk_issuesdouble precisioninstance_service_desk_issuesdouble precisioncreated_attimestampupdated_attimestamppercentage_boardsdouble precisionpercentage_ci_pipelinesdouble precisionpercentage_deploymentsdouble precisionpercentage_environmentsdouble precisionpercentage_issuesdouble precisionpercentage_merge_requestsdouble precisionpercentage_milestonesdouble precisionpercentage_notesdouble precisionpercentage_projects_prometheus_activedouble precisionpercentage_service_desk_issuesdouble precisionusage_data_idbigintcountry_access_logsid PKbigintcreated_attimestamptzupdated_attimestamptzaccess_count_reset_attimestamptzfirst_access_attimestamptzlast_access_attimestamptzuser_idbigintaccess_countintegercountry_codesmallintcoverage_fuzzing_corpusesid PKbigintproject_id FKbigintuser_id FKbigintpackage_id FKbigintfile_updated_attimestamptzcreated_attimestamptzupdated_attimestamptzcsv_issue_importsid PKbigintproject_id FKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptzdeploymentsid PKbigintiidintegerproject_id FKbigintenvironment_id FKbigintrefvarchartagbooleanshavarcharuser_idbigintdeployable_typevarcharcreated_attimestampupdated_attimestampon_stopvarcharstatussmallintfinished_attimestamptzdeployable_idbigintarchivedbooleandescription_versionsid PKbigintcreated_attimestamptzupdated_attimestamptzissue_id FKbigintmerge_request_id FKbigintepic_id FKbigintdescriptiontextdeleted_attimestamptznamespace_id FKbigintdesignated_beneficiariesid PKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptztypesmallintnametextrelationshiptextemailtextdetached_partitionsid PKbigintcreated_attimestamptzupdated_attimestamptzdrop_aftertimestamptztable_nametextdiff_note_positionsid PKbigintnote_id FKbigintold_lineintegernew_lineintegerdiff_content_typesmallintdiff_typesmallintline_codevarchar(255)base_shabyteastart_shabyteahead_shabyteaold_pathtextnew_pathtextnamespace_id FKbigintdingtalk_tracker_dataid PKbigintintegration_id FKbigintcreated_attimestamptzupdated_attimestamptzcorpidtextdraft_notesid PKbigintmerge_request_id FKbigintauthor_id FKbigintresolve_discussionbooleandiscussion_idvarcharnotetextpositiontextoriginal_positiontextchange_positiontextcommit_idbytealine_codetextinternalbooleannote_typesmallintproject_id FKbigintearly_access_program_tracking_eventsid PKbigintuser_id FKbigintevent_nametextevent_labeltextcategorytextcreated_attimestamptzupdated_attimestamptzemailsid PKbigintuser_id FKbigintemailvarcharcreated_attimestampupdated_attimestampconfirmation_tokenvarcharconfirmed_attimestampconfirmation_sent_attimestampdetumbled_emailtextenvironmentsid PKbigintproject_id FKbigintnamevarcharcreated_attimestampupdated_attimestampexternal_urlvarcharenvironment_typevarcharstatevarcharslugvarcharauto_stop_attimestamptzauto_delete_attimestamptztiersmallintmerge_request_id FKbigintcluster_agent_id FKbigintkubernetes_namespacetextflux_resource_pathtextdescriptiontextdescription_htmltextcached_markdown_versionintegerauto_stop_settingsmallintepicsid PKbigintgroup_id FKbigintauthor_id FKbigintassignee_id FKbigintiidintegercached_markdown_versionintegerupdated_by_idbigintlast_edited_by_idbigintlock_versionintegerstart_datedateend_datedatelast_edited_attimestampcreated_attimestampupdated_attimestamptitlevarchartitle_htmlvarchardescriptiontextdescription_htmltextstart_date_sourcing_milestone_id FKbigintdue_date_sourcing_milestone_id FKbigintstart_date_fixeddatedue_date_fixeddatestart_date_is_fixedbooleandue_date_is_fixedbooleanclosed_by_id FKbigintclosed_attimestampparent_id FKbigintrelative_positionintegerstate_idsmallintstart_date_sourcing_epic_id FKbigintdue_date_sourcing_epic_id FKbigintconfidentialbooleanexternal_keyvarchar(255)colortexttotal_opened_issue_weightintegertotal_closed_issue_weightintegertotal_opened_issue_countintegertotal_closed_issue_countintegerissue_id FKbigintimportedsmallintimported_fromsmallintwork_item_parent_link_id FKbiginteventsproject_id FKbigintauthor_idbigintcreated_attimestamptzupdated_attimestamptzactionsmallinttarget_typevarchargroup_id FKbigintfingerprintbyteaid PKbiginttarget_idbigintimported_fromsmallintpersonal_namespace_id FKbigintevidencesid PKbigintrelease_id FKbigintcreated_attimestamptzupdated_attimestamptzsummary_shabyteasummaryjsonbproject_id FKbigintexcluded_merge_requestsid PKbigintmerge_request_id FKbigintfeature_gatesid PKbigintfeature_keyvarcharkeyvarcharvaluevarcharcreated_attimestampupdated_attimestampfeaturesid PKbigintkeyvarcharcreated_attimestampupdated_attimestampghost_user_migrationsid PKbigintuser_id FKbigintinitiator_user_idbigintcreated_attimestamptzupdated_attimestamptzhard_deletebooleanconsume_aftertimestamptzuser_typesmallintgrafana_integrationsid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzencrypted_tokenvarchar(255)encrypted_token_ivvarchar(255)grafana_urlvarchar(1024)enabledbooleangranular_scopesid PKbigintorganization_id FKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzpermissionsjsonbaccesssmallintroutesid PKbigintsource_idbigintsource_typevarcharpathvarcharcreated_attimestampupdated_attimestampnamevarcharnamespace_id FKbigintshardsid PKbigintnamevarcharhistorical_dataid PKbigintdatedateactive_user_countintegercreated_attimestampupdated_attimestamprecorded_attimestamptziam_outboxid PKbigintorganization_id FKbigintentity_idbigintl0_delivered_attimestamptzl2_delivered_attimestamptzcreated_attimestamptzupdated_attimestamptzevent_typesmallintl0_attemptssmallintl2_attemptssmallintentity_typetextl0_last_errortextl2_last_errortextpayloadjsonbidentitiesid PKbigintextern_uidvarcharprovidervarcharuser_id FKbigintcreated_attimestampupdated_attimestampsecondary_extern_uidvarcharsaml_provider_id FKbiginttrusted_extern_uidbooleanindex_statusesid PKbigintproject_id FKbigintindexed_attimestampnotetextlast_commitvarcharcreated_attimestampupdated_attimestamplast_wiki_commitbyteawiki_indexed_attimestamptzinsightsid PKbigintnamespace_id FKbigintproject_id FKbigintintegrationsid PKbigintproject_id FKbigintcreated_attimestampupdated_attimestampactivebooleanpush_eventsbooleanissues_eventsbooleanmerge_requests_eventsbooleantag_push_eventsbooleannote_eventsbooleancategoryvarcharwiki_page_eventsbooleanpipeline_eventsbooleanconfidential_issues_eventsbooleancommit_eventsbooleanjob_eventsbooleanconfidential_note_eventsbooleandeployment_eventsbooleancomment_on_event_enabledbooleaninstancebooleancomment_detailsmallintinherit_from_id FKbigintalert_eventsbooleangroup_id FKbiginttype_newtextvulnerability_eventsbooleanarchive_trace_eventsbooleanencrypted_propertiesbyteaencrypted_properties_ivbyteaincident_eventsbooleangroup_mention_eventsbooleangroup_confidential_mention_eventsbooleanorganization_id FKbigintevent_filtersjsonbfilterjsonbinternal_idsid PKbigintproject_id FKbigintusageintegerlast_valueintegernamespace_id FKbigintip_restrictionsid PKbigintgroup_id FKbigintrangevarcharissuesid PKbiginttitlevarcharauthor_id FKbigintproject_id FKbigintcreated_attimestampupdated_attimestampdescriptiontextmilestone_id FKbigintiidintegerupdated_by_id FKbigintweightintegerconfidentialbooleandue_datedatemoved_to_id FKbigintlock_versionintegertitle_htmltextdescription_htmltexttime_estimateintegerrelative_positionintegerservice_desk_reply_tovarcharcached_markdown_versionintegerlast_edited_attimestamplast_edited_by_idbigintdiscussion_lockedbooleanclosed_attimestamptzclosed_by_id FKbigintstate_idsmallintduplicated_to_id FKbigintpromoted_to_epic_id FKbiginthealth_statussmallintsprint_id FKbigintblocking_issues_countintegerupvotes_countintegerwork_item_type_idbigintnamespace_id FKbigintstart_datedateimported_fromsmallintnamespace_traversal_idsbigint[]iterations_cadencesid PKbigintgroup_id FKbigintcreated_attimestamptzupdated_attimestamptzstart_datedateduration_in_weeksintegeriterations_in_advanceintegeractivebooleanautomaticbooleantitletextroll_overbooleandescriptiontextnext_run_datedatejob_environmentsid PKbigintproject_id FKbigintenvironment_id FKbigintci_pipeline_idbigintci_job_idbigintdeployment_id FKbigintexpanded_environment_nametextoptionsjsonbkeysid PKbigintuser_idbigintcreated_attimestampupdated_attimestampkeytexttitlevarchartypevarcharfingerprintvarcharpublicbooleanlast_used_attimestampfingerprint_sha256byteaexpires_attimestamptzexpiry_notification_delivered_attimestamptzbefore_expiry_notification_delivered_attimestamptzusage_typesmallintorganization_id FKbigintknowledge_graph_enabled_namespacesid PKbigintroot_namespace_id FKbigintcreated_attimestamptzupdated_attimestamptzlabelsid PKbiginttitlevarcharcolorvarcharproject_id FKbigintcreated_attimestampupdated_attimestamptemplatebooleandescriptionvarchardescription_htmltexttypevarchargroup_id FKbigintcached_markdown_versionintegerlock_on_mergebooleanarchivedbooleanorganization_id FKbigintlicensesid PKbigintdatatextcreated_attimestampupdated_attimestampcloudbooleanlast_synced_attimestamptzlist_user_preferencesid PKbigintuser_id FKbigintlist_id FKbigintcreated_attimestamptzupdated_attimestamptzcollapsedbooleanlistsid PKbigintboard_id FKbigintlabel_id FKbigintlist_typeintegerpositionintegercreated_attimestampupdated_attimestampuser_id FKbigintmilestone_id FKbigintmax_issue_countintegermax_issue_weightintegerlimit_metricvarchar(20)iteration_id FKbigintgroup_id FKbigintproject_id FKbigintcustom_status_id FKbigintsystem_defined_status_identifiersmallintmilestone_releasesmilestone_id PKbigintrelease_id PKbigintproject_id FKbigintmilestonesid PKbiginttitlevarcharproject_id FKbigintdescriptiontextdue_datedatecreated_attimestampupdated_attimestampstatevarchariidintegertitle_htmltextdescription_htmltextstart_datedatecached_markdown_versionintegergroup_id FKbigintlock_versionintegermobile_device_push_subscriptionsid PKbigintuser_id FKbigintlast_seen_attimestamptzcreated_attimestamptzupdated_attimestamptzplatformsmallintapns_environmentsmallintpayload_modesmallintdevice_tokenjsonbbundle_identifiertextdevice_nametextapp_versiontextlocaletextnon_sql_service_pingsid PKbigintcreated_attimestamptzupdated_attimestamptzrecorded_attimestamptzpayloadjsonborganization_id FKbigintmetadatajsonbnotesnotetextnoteable_typevarcharauthor_idbigintcreated_attimestampupdated_attimestampproject_id FKbigintline_codevarcharcommit_idvarcharnoteable_idbigintsystembooleanst_difftextupdated_by_idbiginttypevarcharpositiontextoriginal_positiontextresolved_attimestampresolved_by_idbigintdiscussion_idvarcharnote_htmltextcached_markdown_versionintegerchange_positiontextresolved_by_pushbooleanreview_id FKbigintconfidentialbooleanlast_edited_attimestamptzinternalbooleanid PKbigintnamespace_id FKbigintimported_fromsmallintorganization_id FKbigintnotification_settingsid PKbigintuser_idbigintsource_idbigintsource_typevarcharlevelintegercreated_attimestampupdated_attimestampnew_notebooleannew_issuebooleanreopen_issuebooleanclose_issuebooleanreassign_issuebooleannew_merge_requestbooleanreopen_merge_requestbooleanclose_merge_requestbooleanreassign_merge_requestbooleanmerge_merge_requestbooleanfailed_pipelinebooleansuccess_pipelinebooleanpush_to_merge_requestbooleanissue_duebooleannew_epicbooleannotification_emailvarcharfixed_pipelinebooleannew_releasebooleanmoved_projectbooleanchange_reviewer_merge_requestbooleanmerge_when_pipeline_succeedsbooleanapproverbooleanservice_account_failed_pipelinebooleanservice_account_success_pipelinebooleanservice_account_fixed_pipelinebooleanonboarding_progressesid PKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzmerge_request_created_attimestamptzpipeline_created_attimestamptzuser_added_attimestamptztrial_started_attimestamptzrequired_mr_approvals_enabled_attimestamptzcode_owners_enabled_attimestamptzissue_created_attimestamptzsecure_dependency_scanning_run_attimestamptzsecure_dast_run_attimestamptzlicense_scanning_run_attimestamptzcode_added_attimestamptzended_attimestamptzduo_seat_assigned_attimestamptzorganizationsid PKbigintcreated_attimestamptzupdated_attimestamptznametextpathtextvisibility_levelsmallintstatesmallintuuiduuidpath_locksid PKbigintpathvarcharproject_id FKbigintuser_id FKbigintcreated_attimestampupdated_attimestampsnippetsid PKbiginttitlevarcharcontenttextauthor_idbigintproject_id FKbigintcreated_attimestampupdated_attimestampfile_namevarchartypevarcharvisibility_levelintegertitle_htmltextcontent_htmltextcached_markdown_versionintegerdescriptiontextdescription_htmltextencrypted_secret_tokenvarchar(255)encrypted_secret_token_ivvarchar(255)secretbooleanrepository_read_onlybooleanimported_fromsmallintorganization_idbigintpipl_usersuser_id PKbigintcreated_attimestamptzupdated_attimestamptzinitial_email_sent_attimestamptzlast_access_from_pipl_country_attimestamptzstatesmallintplan_limitsid PKbigintplan_id FKbigintci_pipeline_sizeintegerci_active_jobsintegerproject_hooksintegergroup_hooksintegerci_project_subscriptionsintegerci_pipeline_schedulesintegeroffset_pagination_limitintegerci_instance_level_variablesintegerstorage_size_limitintegerci_max_artifact_size_lsifintegerci_max_artifact_size_archiveintegerci_max_artifact_size_metadataintegerci_max_artifact_size_traceintegerci_max_artifact_size_junitintegerci_max_artifact_size_sastintegerci_max_artifact_size_dependency_scanningintegerci_max_artifact_size_container_scanningintegerci_max_artifact_size_dastintegerci_max_artifact_size_codequalityintegerci_max_artifact_size_license_managementintegerci_max_artifact_size_license_scanningintegerci_max_artifact_size_performanceintegerci_max_artifact_size_metricsintegerci_max_artifact_size_metrics_refereeintegerci_max_artifact_size_network_refereeintegerci_max_artifact_size_dotenvintegerci_max_artifact_size_coberturaintegerci_max_artifact_size_terraformintegerci_max_artifact_size_accessibilityintegerci_max_artifact_size_cluster_applicationsintegerci_max_artifact_size_secret_detectionintegerci_max_artifact_size_requirementsintegerci_max_artifact_size_coverage_fuzzingintegerci_max_artifact_size_browser_performanceintegerci_max_artifact_size_load_performanceintegerci_needs_size_limitintegerconan_max_file_sizebigintmaven_max_file_sizebigintnpm_max_file_sizebigintnuget_max_file_sizebigintpypi_max_file_sizebigintgeneric_packages_max_file_sizebigintgolang_max_file_sizebigintdebian_max_file_sizebigintproject_feature_flagsintegerci_max_artifact_size_api_fuzzingintegerci_pipeline_deploymentsintegerpull_mirror_interval_secondsintegerdaily_invitesintegerrubygems_max_file_sizebigintterraform_module_max_file_sizebiginthelm_max_file_sizebigintci_registered_group_runnersintegerci_registered_project_runnersintegerci_daily_pipeline_schedule_triggersintegerci_max_artifact_size_running_container_scanningintegerci_max_artifact_size_cluster_image_scanningintegerci_jobs_trace_size_limitintegerpages_file_entriesintegerdast_profile_schedulesintegerexternal_audit_event_destinationsintegerdotenv_variablesintegerdotenv_sizeintegerpipeline_triggersintegerproject_ci_secure_filesintegerrepository_sizebigintsecurity_policy_scan_execution_schedulesintegerweb_hook_calls_midintegerweb_hook_calls_lowintegerproject_ci_variablesintegergroup_ci_variablesintegerci_max_artifact_size_cyclonedxintegerrpm_max_file_sizebigintci_max_artifact_size_requirements_v2integerpipeline_hierarchy_sizeintegerenforcement_limitintegernotification_limitintegerdashboard_limit_enabled_attimestamptzweb_hook_callsintegerproject_access_token_limitintegergoogle_cloud_logging_configurationsintegerml_model_max_file_sizebigintlimits_historyjsonbupdated_attimestamptzci_max_artifact_size_annotationsintegerci_job_annotations_sizeintegerci_job_annotations_numintegerfile_size_limit_mbdouble precisionaudit_events_amazon_s3_configurationsintegerci_max_artifact_size_repository_xraybigintactive_versioned_pages_deployments_limit_by_namespaceintegerci_max_artifact_size_jacocobigintimport_placeholder_user_limit_tier_1integerimport_placeholder_user_limit_tier_2integerimport_placeholder_user_limit_tier_3integerimport_placeholder_user_limit_tier_4integerci_max_artifact_size_slsa_provenance_statementbigintcargo_max_file_sizebigintplan_name_uidsmallintci_max_artifact_size_sarifintegermax_pipelines_per_merge_trainsmallintplansid PKbigintcreated_attimestampupdated_attimestampnamevarchartitlevarcharplan_name_uidsmallintpool_repositoriesid PKbigintshard_id FKbigintdisk_pathvarcharstatevarcharsource_project_idbigintorganization_id FKbigintprogramming_languagesid PKbigintnamevarcharcolorvarcharcreated_attimestamptzlanguage_idbigintqueries_service_pingsid PKbigintcreated_attimestamptzupdated_attimestamptzrecorded_attimestamptzpayloadjsonborganization_id FKbigintraw_usage_dataid PKbigintcreated_attimestamptzupdated_attimestamptzrecorded_attimestamptzsent_attimestamptzpayloadjsonbversion_usage_data_id_valuebigintorganization_id FKbigintredirect_routesid PKbigintsource_idbigintsource_typevarcharpathvarcharcreated_attimestampupdated_attimestampnamespace_id FKbigintrelated_epic_linksid PKbigintsource_id FKbiginttarget_id FKbigintcreated_attimestamptzupdated_attimestamptzlink_typesmallintgroup_id FKbigintissue_link_id FKbigintrelation_import_trackersid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzrelationsmallintstatussmallintrelease_linksid PKbigintrelease_id FKbiginturlvarcharnamevarcharcreated_attimestamptzupdated_attimestamptzfilepathvarchar(128)link_typesmallintproject_id FKbigintreleasesid PKbiginttagvarchardescriptiontextproject_id FKbigintcreated_attimestampupdated_attimestampdescription_htmltextcached_markdown_versionintegerauthor_id FKbigintnamevarcharshavarcharreleased_attimestamptzrelease_published_attimestamptzremote_mirrorsid PKbigintproject_id FKbiginturlvarcharenabledbooleanupdate_statusvarcharlast_update_attimestamplast_successful_update_attimestamplast_errorvarcharencrypted_credentialstextencrypted_credentials_ivvarcharencrypted_credentials_saltvarcharcreated_attimestampupdated_attimestamplast_update_started_attimestamponly_protected_branchesbooleanremote_namevarcharerror_notification_sentbooleankeep_divergent_refsbooleanmirror_branch_regextextrepository_languagesproject_id PKbigintprogramming_language_id PKbigintsharedouble precisionlanguage_idbigintrequired_code_owners_sectionsid PKbigintprotected_branch_id FKbigintnametextprotected_branch_project_id FKbigintprotected_branch_namespace_id FKbigintreviewsid PKbigintauthor_id FKbigintmerge_request_id FKbigintproject_id FKbigintcreated_attimestamptzschema_migrationsversion PKvarcharfinished_attimestamptzsentry_issuesid PKbigintissue_id FKbigintsentry_issue_identifierbigintnamespace_id FKbigintslsa_attestationsid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintbuild_idbigintstatussmallintexpire_attimestamptzpredicate_kindsmallintpredicate_typetextsubject_digesttextfiletextfile_storesmallintiidintegerpredicate_filetextpredicate_file_storesmallintsmartcard_identitiesid PKbigintuser_id FKbigintsubjectvarcharissuervarcharsoftware_license_policiesid PKbigintproject_id FKbigintclassificationintegercreated_attimestamptzupdated_attimestamptzscan_result_policy_id FKbigintcustom_software_license_id FKbigintapproval_policy_rule_id FKbigintsoftware_license_spdx_identifiertextspam_logsid PKbigintuser_id FKbigintsource_ipvarcharuser_agentvarcharvia_apibooleannoteable_typevarchartitlevarchardescriptiontextcreated_attimestampupdated_attimestampsubmitted_as_hambooleanrecaptcha_verifiedbooleantarget_idbigintorganization_id FKbigintsprintsid PKbigintcreated_attimestamptzupdated_attimestamptzstart_datedatedue_datedategroup_id FKbigintiidintegercached_markdown_versionintegertitletexttitle_htmltextdescriptiontextdescription_htmltextstate_enumsmallintiterations_cadence_id FKbigintsequenceintegerssh_signaturesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintkey_id FKbigintverification_statussmallintcommit_shabyteauser_id FKbigintkey_fingerprint_sha256byteacommitter_emailtextsubscriptionsid PKbigintuser_id FKbigintsubscribable_idbigintsubscribable_typevarcharsubscribedbooleancreated_attimestampupdated_attimestampproject_id FKbigintsuggestionsid PKbigintrelative_ordersmallintappliedbooleancommit_idvarcharfrom_contenttextto_contenttextlines_aboveintegerlines_belowintegeroutdatedbooleannote_id FKbigintnamespace_id FKbigintsupply_chain_attestation_statesid PKbigintverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzsupply_chain_attestation_idbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextproject_id FKbiginttagsid PKbigintnamevarchartaggings_countintegertarget_branch_rulesid PKbigintcreated_attimestamptzupdated_attimestamptzproject_id FKbigintnametexttarget_branchtextterm_agreementsid PKbigintterm_id FKbigintuser_id FKbigintacceptedbooleancreated_attimestamptzupdated_attimestamptztimelog_categoriesid PKbigintnamespace_id FKbigintcreated_attimestamptzupdated_attimestamptzbilling_ratenumeric(18, 4)billablebooleannametextdescriptiontextcolortexttimelogsid PKbiginttime_spentintegeruser_idbigintcreated_attimestampupdated_attimestampissue_id FKbigintmerge_request_id FKbigintspent_attimestampproject_id FKbigintsummarytextnote_id FKbiginttimelog_category_id FKbigintnamespace_id FKbiginttodosid PKbigintuser_id FKbigintproject_id FKbiginttarget_idbiginttarget_typevarcharauthor_id FKbigintactionintegerstatevarcharcreated_attimestampupdated_attimestampcommit_idvarchargroup_id FKbigintresolved_by_actionsmallintnote_id FKbigintsnoozed_untiltimestamptzorganization_id FKbiginttopicsid PKbigintnametextcreated_attimestamptzupdated_attimestamptzavatartextdescriptiontexttotal_projects_countbigintnon_private_projects_countbiginttitletextslugtextorganization_id FKbigintcached_markdown_versionintegerdescription_htmltextupcoming_reconciliationsid PKbigintnamespace_id FKbigintnext_reconciliation_datedatedisplay_alert_fromdatecreated_attimestamptzupdated_attimestamptzorganization_id FKbigintupload_statesverification_started_attimestamptzverification_retry_attimestamptzverified_attimestamptzupload_id PKbigintverification_statesmallintverification_retry_countsmallintverification_checksumbyteaverification_failuretextvs_code_settingsid PKbigintuser_id FKbigintcreated_attimestamptzupdated_attimestamptzsetting_typetextcontenttextuuiduuidversionintegersettings_context_hashtextvulnerabilitiesid PKbigintproject_idbigintauthor_idbigintcreated_attimestamptzupdated_attimestamptztitlevarchar(255)title_htmltextdescriptiontextdescription_htmltextstatesmallintseveritysmallintseverity_overriddenbooleanresolved_by_idbigintresolved_attimestamptzreport_typesmallintcached_markdown_versionintegerconfirmed_by_idbigintconfirmed_attimestamptzdismissed_attimestamptzdismissed_by_idbigintresolved_on_default_branchbooleanpresent_on_default_branchbooleandetected_attimestamptzfinding_id FKbigintcvssjsonbauto_resolvedbooleanuuiduuidsolutiontextpartition_idbigintwebauthn_registrationsid PKbigintuser_id FKbigintcounterbigintcreated_attimestamptzupdated_attimestamptzcredential_xidtextnametextpublic_keytextauthentication_modesmallintpasskey_eligiblebooleanlast_used_attimestamptzxray_reportsid PKbigintproject_id FKbigintcreated_attimestamptzupdated_attimestamptzlangtextpayloadjsonbzentao_tracker_dataid PKbigintintegration_id FKbigintcreated_attimestamptzupdated_attimestamptzencrypted_urlbyteaencrypted_url_ivbyteaencrypted_api_urlbyteaencrypted_api_url_ivbyteaencrypted_zentao_product_xidbyteaencrypted_zentao_product_xid_ivbyteaencrypted_api_tokenbyteaencrypted_api_token_ivbyteaproject_id FKbigintgroup_id FKbigintorganization_id FKbigintzoom_meetingsid PKbigintproject_id FKbigintissue_id FKbigintcreated_attimestamptzupdated_attimestamptzissue_statussmallinturlvarchar(255)application_setting_termsapproval_policy_rulesboardscluster_agentscustom_software_licensesissue_linksmerge_requestsnamespacespackages_packagesprojectsprotected_branchessaml_providersscan_result_policiesusersvulnerability_occurrenceswork_item_custom_statuseswork_item_parent_linksdue_date_sourcing_epic_idstart_date_sourcing_epic_idissue_idparent_idinherit_from_idduplicated_to_idmoved_to_idnamespace_iduser_idnamespace_idproject_idorganization_idgroup_idmerge_request_idproject_iduser_idorganization_iduser_idorganization_iduser_idnamespace_idorganization_idnamespace_iduser_idproject_idgroup_iduser_idorganization_iduser_idproject_iduser_idpackage_iduser_idproject_iduser_idproject_idauthor_idmerge_request_iduser_iduser_idmerge_request_idcluster_agent_idproject_idpersonal_namespace_idproject_idgroup_idmerge_request_iduser_idproject_idnamespace_idorganization_idorganization_iduser_idsaml_provider_idproject_idnamespace_idproject_idproject_idorganization_idgroup_idnamespace_idproject_idgroup_idgroup_idorganization_idroot_namespace_idproject_idorganization_idgroup_idgroup_idproject_iduser_idorganization_idnamespace_idproject_iduser_iduser_idplan_idorganization_idshard_idorganization_idorganization_idnamespace_idproject_idproject_idauthor_idproject_idproject_idprotected_branch_project_idprotected_branch_namespace_idprotected_branch_idauthor_idmerge_request_idproject_idnamespace_idproject_iduser_idproject_idcustom_software_license_idapproval_policy_rule_idproject_idscan_result_policy_iduser_idorganization_iduser_idproject_idproject_idproject_iduser_idterm_idnamespace_idorganization_idorganization_idnamespace_iduploaded_by_user_idproject_idnamespace_idorganization_iduser_idfinding_iduser_idproject_idenvironment_idproject_idintegration_idstart_date_sourcing_milestone_idauthor_iddue_date_sourcing_milestone_idwork_item_parent_link_idclosed_by_idassignee_idgroup_idproject_idrelease_idproject_idrelease_idmilestone_idreview_idnamespace_idproject_idorganization_idproject_idrelease_iditerations_cadence_idgroup_iduser_idproject_idkey_idproject_idgroup_idorganization_idintegration_idnamespace_idnote_idnamespace_idnote_idauthor_idsprint_idproject_idmilestone_idclosed_by_idnamespace_idpromoted_to_epic_idupdated_by_idenvironment_idproject_iddeployment_idboard_idcustom_status_iditeration_idproject_idlabel_iduser_idgroup_idmilestone_idnamespace_idnote_idproject_idorganization_idnote_idauthor_iduser_idgroup_idlist_iduser_idnamespace_idissue_idproject_idnamespace_idtimelog_category_idissue_idmerge_request_idnote_idproject_idissue_idnamespace_idmerge_request_idissue_idepic_idgroup_idissue_link_idtarget_idsource_id

Relationships

groups_visits

4 cols · no RLS · line 6685View in 3D
  • Isolated tablegroups_visits references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
entity_id bigintNOT NULL
user_id bigintNOT NULL
visited_at PKtimestamptzNOT NULL

Indexes

  • (entity_id) index_groups_visits_on_entity_id
  • (user_id, entity_id, visited_at) index_groups_visits_on_user_id_and_entity_id_and_visited_at

Referenced by

  • nothing

verification_codes

4 cols · no RLS · line 7149View in 3D

JiHu-specific table

  • Isolated tableverification_codes references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
created_at PKtimestamptzNOT NULLnow()
visitor_id_code PKtextNOT NULLCHECK char_length(visitor_id_code) <= 64
code PKtextNOT NULLCHECK char_length(code) <= 8
phone PKtextNOT NULLCHECK char_length(phone) <= 50

Indexes

  • UNIQUE (visitor_id_code, phone, created_at) index_verification_codes_on_phone_and_visitor_id_code

Referenced by

  • nothing

Table checks: char_length(code) <= 8; char_length(visitor_id_code) <= 64; char_length(phone) <= 50

uploads

16 cols · no RLS · line 12381View in 3D
  • Nullable foreign key uploaded_by_user_iduploads.uploaded_by_user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_iduploads.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_iduploads.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_iduploads.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK model_typemodel_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity model_type, model_idmodel_id points at different tables depending on model_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • Either/or foreign keys without a CHECK uploaded_by_user_id, project_id, namespace_id, organization_iduploads has several nullable FKs (uploaded_by_user_id, project_id, namespace_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
size bigintNOT NULL
model_id bigintNOT NULL
uploaded_by_user_id bigintnullusers.id 1:N · SET NULL
organization_id bigintnullorganizations.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestampnull
store integerNOT NULL1
version integernull1
path textNOT NULLCHECK char_length(path) <= 511
checksum textnullCHECK char_length(checksum) <= 64
model_type PKtextNOT NULL
uploader textNOT NULL
mount_point textnull
secret textnull

Indexes

  • (checksum) index_uploads_9ba88c4165_on_checksum
  • (model_id, model_type, uploader, created_at) index_uploads_9ba88c4165_on_model_uploader_created_at
  • (namespace_id) index_uploads_9ba88c4165_on_namespace_id
  • (organization_id) index_uploads_9ba88c4165_on_organization_id
  • (project_id) index_uploads_9ba88c4165_on_project_id
  • (store) index_uploads_9ba88c4165_on_store
  • (uploaded_by_user_id) index_uploads_9ba88c4165_on_uploaded_by_user_id
  • (uploader, path) index_uploads_9ba88c4165_on_uploader_and_path

Referenced by

  • nothing

Table checks: char_length(path) <= 511; char_length(checksum) <= 64

achievements

7 cols · no RLS · line 12541View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
avatar textnullCHECK char_length(avatar) <= 255
description textnullCHECK char_length(description) <= 1024

Indexes

  • UNIQUE (namespace_id, lower(name)) index_achievements_on_namespace_id_LOWER_name

Referenced by

Table checks: char_length(name) <= 255; char_length(description) <= 1024; char_length(avatar) <= 255

activation_metrics

6 cols · no RLS · line 12563View in 3D
  • Nullable foreign key namespace_idactivation_metrics.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
metric smallintNOT NULL

Indexes

  • (namespace_id) index_activation_metrics_on_namespace_id
  • UNIQUE (user_id, namespace_id, metric) unique_activation_metric_user_id_namespace_id_and_metric

Referenced by

  • nothing

activity_pub_releases_subscriptions

9 cols · no RLS · line 12581View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
status smallintNOT NULL1
shared_inbox_url textnullCHECK char_length(shared_inbox_url) <= 1024
subscriber_inbox_url textnullCHECK char_length(subscriber_inbox_url) <= 1024
subscriber_url textNOT NULLCHECK char_length(subscriber_url) <= 1024
payload jsonbnull

Indexes

  • UNIQUE (project_id, lower(subscriber_inbox_url)) index_activity_pub_releases_sub_on_project_id_inbox_url
  • UNIQUE (project_id, lower(subscriber_url)) index_activity_pub_releases_sub_on_project_id_sub_url

Referenced by

  • nothing

Table checks: char_length(subscriber_inbox_url) <= 1024; char_length(subscriber_url) <= 1024; char_length(shared_inbox_url) <= 1024

admin_roles

7 cols · no RLS · line 12605View in 3D
  • Nullable foreign key organization_idadmin_roles.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 255
permissions jsonbNOT NULLCAST('{}' AS jsonb)
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • UNIQUE (organization_id, name) index_admin_roles_on_organization_id_and_name

Referenced by

Table checks: organization_id IS NOT NULL; char_length(name) <= 255; char_length(description) <= 255

allowed_email_domains

5 cols · no RLS · line 13575View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
domain varchar(255)NOT NULL

Indexes

  • (group_id) index_allowed_email_domains_on_group_id

Referenced by

  • nothing

appearances

29 cols · no RLS · line 13877View in 3D
  • Isolated tableappearances references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
title varcharNOT NULL
description textNOT NULL
logo varcharnull
updated_by integernull
header_logo varcharnull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
description_html textnull
cached_markdown_version integernull
new_project_guidelines textnull
new_project_guidelines_html textnull
header_message textnull
header_message_html textnull
footer_message textnull
footer_message_html textnull
message_background_color textnull
message_font_color textnull
favicon varcharnull
email_header_and_footer_enabled booleanNOT NULLFALSE
profile_image_guidelines textnullCHECK char_length(profile_image_guidelines) <= 4096
profile_image_guidelines_html textnull
pwa_short_name textnullCHECK char_length(pwa_short_name) <= 255
pwa_icon textnullCHECK char_length(pwa_icon) <= 1024
pwa_name textnullCHECK char_length(pwa_name) <= 255
pwa_description textnullCHECK char_length(pwa_description) <= 2048
member_guidelines textnullCHECK char_length(member_guidelines) <= 4096
member_guidelines_html textnull
site_name textnullCHECK char_length(site_name) <= 255

Indexes

  • none

Referenced by

  • nothing

Table checks: char_length(profile_image_guidelines) <= 4096; char_length(pwa_name) <= 255; char_length(member_guidelines) <= 4096; char_length(pwa_short_name) <= 255; char_length(pwa_description) <= 2048; char_length(pwa_icon) <= 1024; char_length(site_name) <= 255

approvals

7 cols · no RLS · line 14985View in 3D
  • Nullable foreign key project_idapprovals.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
user_id bigintNOT NULL
created_at timestampnull
updated_at timestampnull
patch_id_sha byteanull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (merge_request_id, created_at) index_approvals_on_merge_request_id_and_created_at
  • (project_id) index_approvals_on_project_id
  • UNIQUE (user_id, merge_request_id) index_approvals_on_user_id_and_merge_request_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

ar_internal_metadata

4 cols · no RLS · line 15005View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tablear_internal_metadata references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
key PKvarcharNOT NULL
value varcharnull
created_at timestamp(6)NOT NULL
updated_at timestamp(6)NOT NULL

Indexes

  • none

Referenced by

  • nothing

arkose_sessions

30 cols · no RLS · line 15012View in 3D
  • Wide table (30 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
session_created_at timestamptznull
checked_answer_at timestamptznull
verified_at timestamptzNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
global_score integernull
custom_score integernull
challenge_shown booleanNOT NULLFALSE
challenge_solved booleanNOT NULLFALSE
session_is_legit booleanNOT NULLTRUE
is_tor booleanNOT NULLFALSE
is_vpn booleanNOT NULLFALSE
is_proxy booleanNOT NULLFALSE
is_bot booleanNOT NULLFALSE
session_xid textNOT NULLCHECK char_length(session_xid) <= 64
telltale_user textnullCHECK char_length(telltale_user) <= 128
user_agent textnullCHECK char_length(user_agent) <= 255
user_language_shown textnullCHECK char_length(user_language_shown) <= 64
device_xid textnullCHECK char_length(device_xid) <= 64
telltale_list text[]NOT NULLCAST('{}' AS text[])
user_ip textnullCHECK char_length(user_ip) <= 64
country textnullCHECK char_length(country) <= 64
region textnullCHECK char_length(region) <= 64
city textnullCHECK char_length(city) <= 64
isp textnullCHECK char_length(isp) <= 128
connection_type textnullCHECK char_length(connection_type) <= 64
risk_band textnullCHECK char_length(risk_band) <= 64
risk_category textnullCHECK char_length(risk_category) <= 64
ja4_hash textnullCHECK char_length(ja4_hash) <= 64
canvas_fingerprint bigintnull

Indexes

  • (session_xid) index_arkose_sessions_on_session_xid
  • (user_id) index_arkose_sessions_on_user_id
  • (verified_at) index_arkose_sessions_on_verified_at

Referenced by

  • nothing

Table checks: char_length(ja4_hash) <= 64; char_length(user_agent) <= 255; char_length(telltale_user) <= 128; char_length(risk_band) <= 64; char_length(session_xid) <= 64; char_length(device_xid) <= 64; char_length(user_ip) <= 64; char_length(risk_category) <= 64; char_length(city) <= 64; char_length(isp) <= 128; char_length(region) <= 64; char_length(country) <= 64; char_length(user_language_shown) <= 64; char_length(connection_type) <= 64

artifact_registry_namespace_mappings

5 cols · no RLS · line 15068View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:1 · CASCADE
ar_namespace_id uuidNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (organization_id) index_artifact_registry_namespace_mappings_on_organization_id

Referenced by

  • nothing

atlassian_identities

9 cols · no RLS · line 15206View in 3D
ColumnTypeNullDefaultReferencesNotes
user_id PKbigintNOT NULLusers.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
expires_at timestamptznull
extern_uid textNOT NULLCHECK char_length(extern_uid) <= 255
encrypted_token byteanullCHECK octet_length(encrypted_token) <= 5120
encrypted_token_iv byteanullCHECK octet_length(encrypted_token_iv) <= 12
encrypted_refresh_token byteanullCHECK octet_length(encrypted_refresh_token) <= 5000
encrypted_refresh_token_iv byteanullCHECK octet_length(encrypted_refresh_token_iv) <= 12

Indexes

  • UNIQUE (extern_uid) index_atlassian_identities_on_extern_uid

Referenced by

  • nothing

Table checks: octet_length(encrypted_refresh_token_iv) <= 12; octet_length(encrypted_refresh_token) <= 5000; octet_length(encrypted_token_iv) <= 12; octet_length(encrypted_token) <= 5120; char_length(extern_uid) <= 255

authentication_events

8 cols · no RLS · line 15605View in 3D
  • Nullable foreign key user_idauthentication_events.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
user_id bigintnullusers.id 1:N · SET NULL
result smallintNOT NULL
ip_address inetnull
provider textNOT NULLCHECK char_length(provider) <= 64
user_name textNOT NULLCHECK char_length(user_name) <= 255
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE

Indexes

  • (organization_id) index_authentication_events_on_organization_id
  • (provider) index_authentication_events_on_provider
  • (user_id, ip_address, result) index_authentication_events_on_user_and_ip_address_and_result
  • (user_id, provider, created_at) WHERE result = 1 index_successful_authentication_events_for_metrics

Referenced by

  • nothing

Table checks: char_length(user_name) <= 255; char_length(provider) <= 64

automation_rules

9 cols · no RLS · line 15627View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
issues_events booleanNOT NULLFALSE
merge_requests_events booleanNOT NULLFALSE
permanently_disabled booleanNOT NULLFALSE
name textNOT NULLCHECK char_length(name) <= 255
rule textNOT NULLCHECK char_length(rule) <= 2048
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (namespace_id, lower(name)) index_automation_rules_namespace_id_name
  • (namespace_id, permanently_disabled) index_automation_rules_namespace_id_permanently_disabled

Referenced by

  • nothing

Table checks: char_length(name) <= 255; char_length(rule) <= 2048

award_emoji

9 cols · no RLS · line 15650View in 3D
  • Nullable foreign key organization_idaward_emoji.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idaward_emoji.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK awardable_typeawardable_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity awardable_type, awardable_idawardable_id points at different tables depending on awardable_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name varcharnull
user_id bigintnull
awardable_type varcharnull
created_at timestampnull
updated_at timestampnull
awardable_id bigintnull
namespace_id bigintnullnamespaces.id 1:N · CASCADE
organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (user_id, name, awardable_type, awardable_id) idx_award_emoji_on_user_emoji_name_awardable_type_awardable_id
  • (awardable_type, awardable_id) index_award_emoji_on_awardable_type_and_awardable_id
  • (namespace_id) index_award_emoji_on_namespace_id
  • (organization_id) index_award_emoji_on_organization_id

Referenced by

  • nothing

Table checks: num_nonnulls(namespace_id, organization_id) = 1

aws_roles

6 cols · no RLS · line 15672View in 3D
ColumnTypeNullDefaultReferencesNotes
user_id PKbigintNOT NULLusers.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
role_arn varchar(2048)null
role_external_id varchar(64)NOT NULL
region textnullCHECK char_length(region) <= 255

Indexes

  • UNIQUE (role_external_id) index_aws_roles_on_role_external_id
  • UNIQUE (user_id) index_aws_roles_on_user_id

Referenced by

  • nothing

Table checks: char_length(region) <= 255

badges

9 cols · no RLS · line 15700View in 3D
  • Nullable foreign key project_idbadges.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idbadges.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK typetype is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
link_url varcharNOT NULL
image_url varcharNOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
type varcharNOT NULL
name varchar(255)null
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (group_id) index_badges_on_group_id
  • (project_id) index_badges_on_project_id

Referenced by

  • nothing

Table checks: num_nonnulls(group_id, project_id) = 1

banned_users

4 cols · no RLS · line 15722View in 3D
ColumnTypeNullDefaultReferencesNotes
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
user_id PKbigintNOT NULLusers.id 1:1 · CASCADE
projects_deleted booleanNOT NULLFALSE

Indexes

  • none

Referenced by

  • nothing

broadcast_messages

16 cols · no RLS · line 16081View in 3D
  • TIMESTAMP without time zone starts_atstarts_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone ends_atends_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
message textNOT NULL
starts_at timestampNOT NULL
ends_at timestampNOT NULL
created_at timestampNOT NULL
updated_at timestampNOT NULL
color varcharnull
font varcharnull
message_html textNOT NULL
cached_markdown_version integernull
target_path varchar(255)null
broadcast_type smallintNOT NULL1
dismissable booleannull
target_access_levels integer[]NOT NULLCAST('{}' AS integer[])
theme smallintNOT NULL0
show_in_cli booleanNOT NULLTRUE

Indexes

  • (ends_at, broadcast_type, id) index_broadcast_message_on_ends_at_and_broadcast_type_and_id

Referenced by

burned_project_routes

7 cols · no RLS · line 16405View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
project_id bigintNOT NULL
burned_at timestamptzNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
path textNOT NULL

Indexes

  • UNIQUE (organization_id, lower(path)) index_burned_project_routes_on_org_id_lower_path

Referenced by

  • nothing

cells_outstanding_leases

3 cols · no RLS · line 17030View in 3D
  • Isolated tablecells_outstanding_leases references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
uuid PKuuidNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • none

Referenced by

  • nothing

commit_user_mentions

7 cols · no RLS · line 18678View in 3D
  • Nullable foreign key namespace_idcommit_user_mentions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
mentioned_users_ids bigint[]null
mentioned_projects_ids bigint[]null
mentioned_groups_ids bigint[]null
commit_id varcharNOT NULL
note_id bigintNOT NULLnotes.id 1:1 · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • UNIQUE (commit_id, note_id) commit_user_mentions_on_commit_id_and_note_id_unique_index
  • (namespace_id) index_commit_user_mentions_on_namespace_id
  • UNIQUE (note_id) index_commit_user_mentions_on_note_id

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

compromised_password_detections

5 cols · no RLS · line 18797View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
resolved_at timestamptznull
user_id bigintNOT NULLusers.id 1:N · CASCADE

Indexes

  • (user_id) index_compromised_password_detections_on_user_id
  • UNIQUE (user_id) WHERE resolved_at IS NULL index_unresolved_compromised_password_detection_on_user_id

Referenced by

  • nothing

content_blocked_states

7 cols · no RLS · line 18912View in 3D

JiHu-specific table

  • Isolated tablecontent_blocked_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
commit_sha byteaNOT NULL
blob_sha byteaNOT NULL
path textNOT NULLCHECK char_length(path) <= 2048
container_identifier textNOT NULLCHECK char_length(container_identifier) <= 255

Indexes

  • UNIQUE (container_identifier, commit_sha, path) index_content_blocked_states_on_container_id_commit_sha_path

Referenced by

  • nothing

Table checks: char_length(container_identifier) <= 255; char_length(path) <= 2048

conversational_development_index_metrics

34 cols · no RLS · line 18935View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tableconversational_development_index_metrics references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
  • Wide table (34 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
leader_issues double precisionNOT NULL
instance_issues double precisionNOT NULL
leader_notes double precisionNOT NULL
instance_notes double precisionNOT NULL
leader_milestones double precisionNOT NULL
instance_milestones double precisionNOT NULL
leader_boards double precisionNOT NULL
instance_boards double precisionNOT NULL
leader_merge_requests double precisionNOT NULL
instance_merge_requests double precisionNOT NULL
leader_ci_pipelines double precisionNOT NULL
instance_ci_pipelines double precisionNOT NULL
leader_environments double precisionNOT NULL
instance_environments double precisionNOT NULL
leader_deployments double precisionNOT NULL
instance_deployments double precisionNOT NULL
leader_projects_prometheus_active double precisionnull
instance_projects_prometheus_active double precisionnull
leader_service_desk_issues double precisionNOT NULL
instance_service_desk_issues double precisionNOT NULL
created_at timestampNOT NULL
updated_at timestampNOT NULL
percentage_boards double precisionNOT NULL0.0
percentage_ci_pipelines double precisionNOT NULL0.0
percentage_deployments double precisionNOT NULL0.0
percentage_environments double precisionNOT NULL0.0
percentage_issues double precisionNOT NULL0.0
percentage_merge_requests double precisionNOT NULL0.0
percentage_milestones double precisionNOT NULL0.0
percentage_notes double precisionNOT NULL0.0
percentage_projects_prometheus_active double precisionNOT NULL0.0
percentage_service_desk_issues double precisionNOT NULL0.0
usage_data_id bigintnull

Indexes

  • none

Referenced by

  • nothing

country_access_logs

9 cols · no RLS · line 18981View in 3D
  • Isolated tablecountry_access_logs references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
access_count_reset_at timestamptznull
first_access_at timestamptznull
last_access_at timestamptznull
user_id bigintNOT NULL
access_count integerNOT NULL0
country_code smallintNOT NULL

Indexes

  • UNIQUE (user_id, country_code) index_country_access_logs_on_user_id_and_country_code

Referenced by

  • nothing

coverage_fuzzing_corpuses

7 cols · no RLS · line 19002View in 3D
  • Nullable foreign key user_idcoverage_fuzzing_corpuses.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
user_id bigintnullusers.id 1:N · CASCADE
package_id bigintNOT NULLpackages_packages.id 1:1 · CASCADE
file_updated_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (package_id) index_coverage_fuzzing_corpuses_on_package_id
  • (project_id) index_coverage_fuzzing_corpuses_on_project_id
  • (user_id) index_coverage_fuzzing_corpuses_on_user_id

Referenced by

  • nothing

csv_issue_imports

5 cols · no RLS · line 19021View in 3D
  • Junction table allows duplicate links project_id, user_idcsv_issue_imports looks like a many-to-many link table but has no unique constraint across (project_id, user_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
user_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (project_id) index_csv_issue_imports_on_project_id
  • (user_id) index_csv_issue_imports_on_user_id

Referenced by

  • nothing

deployments

16 cols · no RLS · line 19948View in 3D
  • Enum-like column with no CHECK deployable_typedeployable_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity deployable_type, deployable_iddeployable_id points at different tables depending on deployable_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
iid integerNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
environment_id bigintNOT NULLenvironments.id 1:N · CASCADE
ref varcharNOT NULL
tag booleanNOT NULL
sha varcharNOT NULL
user_id bigintnull
deployable_type varcharnull
created_at timestampnull
updated_at timestampnull
on_stop varcharnull
status smallintNOT NULL
finished_at timestamptznull
deployable_id bigintnull
archived booleanNOT NULLFALSE

Indexes

  • (environment_id, finished_at) WHERE status = ANY(ARRAY[1, 2, 3, 4, 6]) index_deployments_for_visible_scope
  • (archived, project_id, iid) index_deployments_on_archived_project_id_iid
  • (created_at) index_deployments_on_created_at
  • (deployable_type, deployable_id) index_deployments_on_deployable_type_and_deployable_id
  • (environment_id, id) index_deployments_on_environment_id_and_id
  • (environment_id, ref) index_deployments_on_environment_id_and_ref
  • (environment_id, status, finished_at) index_deployments_on_environment_id_status_and_finished_at
  • (environment_id, status, id) index_deployments_on_environment_id_status_and_id
  • (environment_id, status, sha) index_deployments_on_environment_status_sha
  • (id, status, created_at) index_deployments_on_id_and_status_and_created_at
  • (project_id, environment_id, updated_at, id) index_deployments_on_project_and_environment_and_updated_at_id
  • (project_id, finished_at) WHERE status = 2 index_deployments_on_project_and_finished
  • (project_id, id) index_deployments_on_project_id_and_id
  • UNIQUE (project_id, iid) index_deployments_on_project_id_and_iid
  • (project_id, status, created_at) index_deployments_on_project_id_and_status_and_created_at
  • (project_id, updated_at, id) index_deployments_on_project_id_and_updated_at_and_id
  • (user_id, status, created_at) index_deployments_on_user_id_and_status_and_created_at

Referenced by

description_versions

9 cols · no RLS · line 19976View in 3D
  • Nullable foreign key merge_request_iddescription_versions.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key issue_iddescription_versions.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key epic_iddescription_versions.epic_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
issue_id bigintnullissues.id 1:N · CASCADE
merge_request_id bigintnullmerge_requests.id 1:N · CASCADE
epic_id bigintnullepics.id 1:N · CASCADE
description textnull
deleted_at timestamptznull
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • (namespace_id) idx_description_versions_on_namespace_id
  • (epic_id) WHERE epic_id IS NOT NULL index_description_versions_on_epic_id
  • (issue_id) WHERE issue_id IS NOT NULL index_description_versions_on_issue_id
  • (merge_request_id) WHERE merge_request_id IS NOT NULL index_description_versions_on_merge_request_id

Referenced by

Table checks: num_nonnulls(epic_id, issue_id, merge_request_id) = 1

designated_beneficiaries

8 cols · no RLS · line 20160View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestamptzNOT NULLCURRENT_TIMESTAMP
updated_at timestamptzNOT NULLCURRENT_TIMESTAMP
type smallintNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
relationship textnullCHECK char_length(relationship) <= 255
email textnullCHECK char_length(email) <= 255

Indexes

  • (user_id) index_designated_beneficiaries_on_user_id

Referenced by

  • nothing

Table checks: char_length(relationship) <= 255; char_length(name) <= 255; char_length(email) <= 255

detached_partitions

5 cols · no RLS · line 20183View in 3D
  • Isolated tabledetached_partitions references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
drop_after timestamptzNOT NULL
table_name textNOT NULLCHECK char_length(table_name) <= 63

Indexes

  • none

Referenced by

  • nothing

Table checks: char_length(table_name) <= 63

diff_note_positions

13 cols · no RLS · line 20201View in 3D
  • Nullable foreign key namespace_iddiff_note_positions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
note_id bigintNOT NULLnotes.id 1:N · CASCADE
old_line integernull
new_line integernull
diff_content_type smallintNOT NULL
diff_type smallintNOT NULL
line_code varchar(255)NOT NULL
base_sha byteaNOT NULL
start_sha byteaNOT NULL
head_sha byteaNOT NULL
old_path textNOT NULL
new_path textNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (namespace_id) index_diff_note_positions_on_namespace_id
  • UNIQUE (note_id, diff_type) index_diff_note_positions_on_note_id_and_diff_type

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

dingtalk_tracker_data

5 cols · no RLS · line 20227View in 3D

JiHu-specific table

ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
integration_id bigintNOT NULLintegrations.id 1:N · CASCADEJiHu-specific column
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
corpid textnullJiHu-specific columnCHECK char_length(corpid) <= 255

Indexes

  • (integration_id) index_dingtalk_tracker_data_on_integration_id
  • (corpid) WHERE corpid IS NOT NULL index_on_dingtalk_tracker_data_corpid

Referenced by

  • nothing

Table checks: char_length(corpid) <= 255

draft_notes

14 cols · no RLS · line 20308View in 3D
  • Nullable foreign key project_iddraft_notes.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
author_id bigintNOT NULLusers.id 1:N · CASCADE
resolve_discussion booleanNOT NULLFALSE
discussion_id varcharnull
note textNOT NULL
position textnull
original_position textnull
change_position textnull
commit_id byteanull
line_code textnullCHECK char_length(line_code) <= 255
internal booleanNOT NULLFALSE
note_type smallintnull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (author_id) index_draft_notes_on_author_id
  • (discussion_id) index_draft_notes_on_discussion_id
  • (merge_request_id) index_draft_notes_on_merge_request_id
  • (project_id) index_draft_notes_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(line_code) <= 255

early_access_program_tracking_events

7 cols · no RLS · line 20575View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
event_name textNOT NULLCHECK char_length(event_name) <= 255
event_label textnullCHECK char_length(event_label) <= 255
category textnullCHECK char_length(category) <= 255
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (category) index_early_access_program_tracking_events_on_category
  • (event_label) index_early_access_program_tracking_events_on_event_label
  • (event_name) index_early_access_program_tracking_events_on_event_name
  • (user_id) index_early_access_program_tracking_events_on_user_id

Referenced by

  • nothing

Table checks: char_length(event_label) <= 255; char_length(event_name) <= 255; char_length(category) <= 255

emails

9 cols · no RLS · line 20707View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone confirmed_atconfirmed_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone confirmation_sent_atconfirmation_sent_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
email varcharNOT NULL
created_at timestampnull
updated_at timestampnull
confirmation_token varcharnull
confirmed_at timestampnull
confirmation_sent_at timestampnull
detumbled_email textnullCHECK char_length(detumbled_email) <= 255

Indexes

  • (confirmation_token) index_emails_confirmation_token
  • (created_at) WHERE confirmed_at IS NULL index_emails_on_created_at_where_confirmed_at_is_null
  • (detumbled_email) index_emails_on_detumbled_email
  • UNIQUE (email) index_emails_on_email
  • (email) index_emails_on_email_trigram
  • (user_id) index_emails_on_user_id
  • UNIQUE (user_id, confirmation_token) index_emails_on_user_id_and_confirmation_token

Referenced by

Table checks: char_length(detumbled_email) <= 255

environments

20 cols · no RLS · line 20769View in 3D
  • Nullable foreign key merge_request_idenvironments.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key cluster_agent_idenvironments.cluster_agent_id may be NULL, so the relationship to cluster_agents is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK environment_typeenvironment_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Enum-like column with no CHECK statestate is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Either/or foreign keys without a CHECK merge_request_id, cluster_agent_idenvironments has several nullable FKs (merge_request_id, cluster_agent_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
name varcharNOT NULL
created_at timestampnull
updated_at timestampnull
external_url varcharnull
environment_type varcharnull
state varcharNOT NULLCAST('available' AS varchar)
slug varcharNOT NULL
auto_stop_at timestamptznull
auto_delete_at timestamptznull
tier smallintnull
merge_request_id bigintnullmerge_requests.id 1:N · SET NULL
cluster_agent_id bigintnullcluster_agents.id 1:N · SET NULL
kubernetes_namespace textnullCHECK char_length(kubernetes_namespace) <= 63
flux_resource_path textnullCHECK char_length(flux_resource_path) <= 255
description textnullCHECK char_length(description) <= 10000
description_html textnullCHECK char_length(description_html) <= 50000
cached_markdown_version integernull
auto_stop_setting smallintNOT NULL0

Indexes

  • (cluster_agent_id) WHERE cluster_agent_id IS NOT NULL index_environments_cluster_agent_id
  • (project_id, lower(ltrim(ltrim(CAST(name AS text), CAST(environment_type AS text)), CAST('/' AS text))), state) index_environments_name_without_type
  • (merge_request_id) index_environments_on_merge_request_id
  • (name) index_environments_on_name_varchar_pattern_ops
  • (project_id, id) index_environments_on_project_id_and_id
  • UNIQUE (project_id, name) index_environments_on_project_id_and_name
  • UNIQUE (project_id, slug) index_environments_on_project_id_and_slug
  • (project_id, tier) WHERE tier IS NOT NULL index_environments_on_project_id_and_tier
  • (project_id, state, environment_type) index_environments_on_project_id_state_environment_type
  • (project_id, lower(CAST(name AS text)), state) index_environments_on_project_name_varchar_pattern_ops_state
  • (auto_delete_at) WHERE auto_delete_at IS NOT NULL AND CAST(state AS text) = CAST('stopped' AS text) index_environments_on_state_and_auto_delete_at
  • (state, auto_stop_at) WHERE auto_stop_at IS NOT NULL AND CAST(state AS text) = CAST('available' AS text) index_environments_on_state_and_auto_stop_at
  • (updated_at) WHERE CAST(state AS text) = CAST('stopping' AS text) index_environments_on_updated_at_for_stopping_state

Referenced by

Table checks: char_length(flux_resource_path) <= 255; char_length(description) <= 10000; char_length(kubernetes_namespace) <= 63; char_length(description_html) <= 50000

epics

42 cols · no RLS · line 20844View in 3D
  • Nullable foreign key due_date_sourcing_epic_idepics.due_date_sourcing_epic_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key start_date_sourcing_milestone_idepics.start_date_sourcing_milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key due_date_sourcing_milestone_idepics.due_date_sourcing_milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key work_item_parent_link_idepics.work_item_parent_link_id may be NULL, so the relationship to work_item_parent_links is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key start_date_sourcing_epic_idepics.start_date_sourcing_epic_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key closed_by_idepics.closed_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key assignee_idepics.assignee_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key issue_idepics.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key parent_idepics.parent_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK due_date_sourcing_epic_id, start_date_sourcing_milestone_id, due_date_sourcing_milestone_id, work_item_parent_link_id, start_date_sourcing_epic_id, closed_by_id, assignee_id, issue_id, parent_idepics has several nullable FKs (due_date_sourcing_epic_id, start_date_sourcing_milestone_id, due_date_sourcing_milestone_id, work_item_parent_link_id, start_date_sourcing_epic_id, closed_by_id, assignee_id, issue_id, parent_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone last_edited_atlast_edited_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone closed_atclosed_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Wide table (42 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
author_id bigintNOT NULLusers.id 1:N · CASCADE
assignee_id bigintnullusers.id 1:N · SET NULL
iid integerNOT NULL
cached_markdown_version integernull
updated_by_id bigintnull
last_edited_by_id bigintnull
lock_version integernull0CHECK lock_version IS NOT NULL
start_date datenull
end_date datenull
last_edited_at timestampnull
created_at timestampNOT NULL
updated_at timestampNOT NULL
title varcharNOT NULL
title_html varcharNOT NULL
description textnull
description_html textnull
start_date_sourcing_milestone_id bigintnullmilestones.id 1:N · SET NULL
due_date_sourcing_milestone_id bigintnullmilestones.id 1:N · SET NULL
start_date_fixed datenull
due_date_fixed datenull
start_date_is_fixed booleannull
due_date_is_fixed booleannull
closed_by_id bigintnullusers.id 1:N · SET NULL
closed_at timestampnull
parent_id bigintnullepics.id 1:N · SET NULL
relative_position integernull
state_id smallintNOT NULL1
start_date_sourcing_epic_id bigintnullepics.id 1:N · SET NULL
due_date_sourcing_epic_id bigintnullepics.id 1:N · SET NULL
confidential booleanNOT NULLFALSE
external_key varchar(255)null
color textnullCAST('#1068bf' AS text)CHECK char_length(color) <= 7
total_opened_issue_weight integerNOT NULL0
total_closed_issue_weight integerNOT NULL0
total_opened_issue_count integerNOT NULL0
total_closed_issue_count integerNOT NULL0
issue_id bigintnullissues.id 1:1 · CASCADECHECK issue_id IS NOT NULL
imported smallintNOT NULL0
imported_from smallintNOT NULL0
work_item_parent_link_id bigintnullwork_item_parent_links.id 1:1 · SET NULL

Indexes

  • (assignee_id) index_epics_on_assignee_id
  • (author_id) index_epics_on_author_id
  • (closed_by_id) index_epics_on_closed_by_id
  • (confidential) index_epics_on_confidential
  • (due_date_sourcing_epic_id) WHERE due_date_sourcing_epic_id IS NOT NULL index_epics_on_due_date_sourcing_epic_id
  • (due_date_sourcing_milestone_id) index_epics_on_due_date_sourcing_milestone_id
  • (end_date) index_epics_on_end_date
  • UNIQUE (group_id, external_key) WHERE external_key IS NOT NULL index_epics_on_group_id_and_external_key
  • UNIQUE (group_id, iid) index_epics_on_group_id_and_iid
  • (group_id, CAST(iid AS varchar)) index_epics_on_group_id_and_iid_varchar_pattern
  • (iid) index_epics_on_iid
  • (last_edited_by_id) index_epics_on_last_edited_by_id
  • (parent_id) index_epics_on_parent_id
  • (start_date) index_epics_on_start_date
  • (start_date_sourcing_epic_id) WHERE start_date_sourcing_epic_id IS NOT NULL index_epics_on_start_date_sourcing_epic_id
  • (start_date_sourcing_milestone_id) index_epics_on_start_date_sourcing_milestone_id
  • UNIQUE (issue_id) index_unique_epics_on_issue_id
  • UNIQUE (work_item_parent_link_id) index_unique_parent_link_id_on_epics

Referenced by

Table checks: issue_id IS NOT NULL; char_length(color) <= 7; lock_version IS NOT NULL

events

12 cols · no RLS · line 20974View in 3D
  • Nullable foreign key personal_namespace_idevents.personal_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idevents.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idevents.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK target_typetarget_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity target_type, target_idtarget_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
ColumnTypeNullDefaultReferencesNotes
project_id bigintnullprojects.id 1:N · CASCADE
author_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
action smallintNOT NULL
target_type varcharnull
group_id bigintnullnamespaces.id 1:N · CASCADE
fingerprint byteanullCHECK octet_length(fingerprint) <= 128
id PKbigintNOT NULL
target_id bigintnull
imported_from smallintNOT NULL0
personal_namespace_id bigintnullnamespaces.id 1:N · CASCADE

Indexes

  • (created_at, author_id) analytics_index_events_on_created_at_and_author_id
  • (author_id, group_id, action, target_type, created_at) index_events_author_id_group_id_action_target_type_created_at
  • (author_id, project_id, action, target_type, created_at) index_events_author_id_project_id_action_target_type_created_at
  • (author_id, target_type, action, id) index_events_for_followed_users
  • (group_id, target_type, action, id) WHERE group_id IS NOT NULL index_events_for_group_activity
  • (project_id, target_type, action, id) index_events_for_project_activity
  • (author_id, created_at) index_events_on_author_id_and_created_at
  • (author_id, id) index_events_on_author_id_and_id
  • (created_at, id) WHERE created_at > CAST('2021-08-27 00:00:00+00' AS timestamptz) index_events_on_created_at_and_id
  • (group_id, id) WHERE group_id IS NOT NULL index_events_on_group_id_and_id
  • (personal_namespace_id) WHERE personal_namespace_id IS NOT NULL index_events_on_personal_namespace_id
  • (project_id, created_at) index_events_on_project_id_and_created_at
  • (project_id, id) index_events_on_project_id_and_id
  • UNIQUE (target_type, target_id, fingerprint) index_events_on_target_type_and_target_id_and_fingerprint
  • (project_id, target_type, action, created_at, author_id, id) index_on_events_to_improve_contribution_analytics_performance

Referenced by

Table checks: octet_length(fingerprint) <= 128; group_id IS NOT NULL OR project_id IS NOT NULL OR personal_namespace_id IS NOT NULL

evidences

7 cols · no RLS · line 21000View in 3D
  • Nullable foreign key project_idevidences.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
release_id bigintNOT NULLreleases.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
summary_sha byteanull
summary jsonbNOT NULLCAST('{}' AS jsonb)
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_evidences_on_project_id
  • (release_id) index_evidences_on_release_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

excluded_merge_requests

2 cols · no RLS · line 21020View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE

Indexes

  • (merge_request_id) index_excluded_merge_requests_on_merge_request_id

Referenced by

  • nothing

feature_gates

6 cols · no RLS · line 21117View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tablefeature_gates references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
feature_key varcharNOT NULL
key varcharNOT NULL
value varcharnull
created_at timestampNOT NULL
updated_at timestampNOT NULL

Indexes

  • UNIQUE (feature_key, key, value) index_feature_gates_on_feature_key_and_key_and_value

Referenced by

  • nothing

features

4 cols · no RLS · line 21135View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tablefeatures references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
key varcharNOT NULL
created_at timestampNOT NULL
updated_at timestampNOT NULL

Indexes

  • UNIQUE (key) index_features_on_key

Referenced by

  • nothing

ghost_user_migrations

8 cols · no RLS · line 21353View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:1 · CASCADE
initiator_user_id bigintnull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
hard_delete booleanNOT NULLFALSE
consume_after timestamptzNOT NULLnow()
user_type smallintnull

Indexes

  • (consume_after, id) index_ghost_user_migrations_on_consume_after_id
  • UNIQUE (user_id) index_ghost_user_migrations_on_user_id
  • (user_type, consume_after, id) index_ghost_user_migrations_on_user_type_consume_after_id

Referenced by

  • nothing

grafana_integrations

8 cols · no RLS · line 21555View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
encrypted_token varchar(255)NOT NULL
encrypted_token_iv varchar(255)NOT NULL
grafana_url varchar(1024)NOT NULL
enabled booleanNOT NULLFALSE

Indexes

  • (enabled) WHERE …(enabled) index_grafana_integrations_on_enabled
  • (project_id) index_grafana_integrations_on_project_id

Referenced by

  • nothing

granular_scopes

7 cols · no RLS · line 21575View in 3D
  • Nullable foreign key namespace_idgranular_scopes.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
permissions jsonbNOT NULLCAST('[]' AS jsonb)CHECK jsonb_typeof(permissions) = CAST('array' AS text)
access smallintNOT NULL0

Indexes

  • (namespace_id) idx_granular_scopes_on_namespace_id
  • (organization_id) idx_granular_scopes_on_organization_id

Referenced by

Table checks: jsonb_typeof(permissions) = CAST('array' AS text)

routes

8 cols · no RLS · line 22056View in 3D
  • Nullable foreign key namespace_idroutes.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK source_typesource_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity source_type, source_idsource_id points at different tables depending on source_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
source_id bigintNOT NULL
source_type varcharNOT NULL
path varcharNOT NULL
created_at timestampnull
updated_at timestampnull
name varcharnull
namespace_id bigintnullnamespaces.id 1:1 · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (lower(CAST(path AS text))) index_on_routes_lower_path
  • (name) index_route_on_name_trigram
  • (id) WHERE strpos(CAST(path AS text), CAST('/' AS text)) = 0 index_routes_on_id_for_top_level_paths
  • UNIQUE (namespace_id) index_routes_on_namespace_id
  • UNIQUE (path) index_routes_on_path
  • (path) index_routes_on_path_text_pattern_ops
  • (path) index_routes_on_path_trigram
  • UNIQUE (source_type, source_id) index_routes_on_source_type_and_source_id
  • (id) WHERE namespace_id IS NULL AND CAST(source_type AS text) = CAST('Project' AS text) tmp_index_for_project_namespace_id_migration_on_routes

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

shards

2 cols · no RLS · line 22068View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name varcharNOT NULL

Indexes

  • UNIQUE (name) index_shards_on_name

Referenced by

historical_data

6 cols · no RLS · line 22092View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tablehistorical_data references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
date datenull
active_user_count integernull
created_at timestampnull
updated_at timestampnull
recorded_at timestamptznullCHECK recorded_at IS NOT NULL

Indexes

  • (recorded_at) index_historical_data_on_recorded_at

Referenced by

  • nothing

Table checks: recorded_at IS NOT NULL

iam_outbox

14 cols · no RLS · line 22111View in 3D
  • Polymorphic reference without referential integrity entity_type, entity_identity_id points at different tables depending on entity_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
entity_id bigintNOT NULL
l0_delivered_at timestamptznull
l2_delivered_at timestamptznull
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
event_type smallintNOT NULL
l0_attempts smallintNOT NULL0
l2_attempts smallintNOT NULL0
entity_type textNOT NULLCHECK char_length(entity_type) <= 255
l0_last_error textnullCHECK char_length(l0_last_error) <= 4096
l2_last_error textnullCHECK char_length(l2_last_error) <= 4096
payload jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (entity_type, entity_id, event_type) WHERE l0_delivered_at IS NULL index_iam_outbox_l0_undelivered_lookup
  • (entity_type, entity_id, event_type) WHERE l2_delivered_at IS NULL index_iam_outbox_l2_undelivered_lookup
  • (organization_id) index_iam_outbox_on_organization_id

Referenced by

  • nothing

Table checks: char_length(l2_last_error) <= 4096; char_length(l0_last_error) <= 4096; char_length(entity_type) <= 255

identities

9 cols · no RLS · line 22140View in 3D
  • Nullable foreign key user_ididentities.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key saml_provider_ididentities.saml_provider_id may be NULL, so the relationship to saml_providers is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK user_id, saml_provider_ididentities has several nullable FKs (user_id, saml_provider_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
extern_uid varcharnull
provider varcharnull
user_id bigintnullusers.id 1:N · CASCADECHECK user_id IS NOT NULL
created_at timestampnull
updated_at timestampnull
secondary_extern_uid varcharnull
saml_provider_id bigintnullsaml_providers.id 1:N · CASCADE
trusted_extern_uid booleannullTRUE

Indexes

  • (saml_provider_id) WHERE saml_provider_id IS NOT NULL index_identities_on_saml_provider_id
  • (user_id) index_identities_on_user_id
  • (lower(CAST(extern_uid AS text)), provider) index_on_identities_lower_extern_uid_and_provider

Referenced by

  • nothing

Table checks: user_id IS NOT NULL

index_statuses

9 cols · no RLS · line 22637View in 3D
  • TIMESTAMP without time zone indexed_atindexed_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:1 · CASCADE
indexed_at timestampnull
note textnull
last_commit varcharnull
created_at timestampNOT NULL
updated_at timestampNOT NULL
last_wiki_commit byteanull
wiki_indexed_at timestamptznull

Indexes

  • UNIQUE (project_id) index_index_statuses_on_project_id

Referenced by

  • nothing

insights

3 cols · no RLS · line 22658View in 3D
  • Junction table allows duplicate links namespace_id, project_idinsights looks like a many-to-many link table but has no unique constraint across (namespace_id, project_id). The same pair can be inserted twice; every join through it will double-count.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE

Indexes

  • (namespace_id) index_insights_on_namespace_id
  • (project_id) index_insights_on_project_id

Referenced by

  • nothing

integrations

35 cols · no RLS · line 22779View in 3D
  • Nullable foreign key project_idintegrations.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idintegrations.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idintegrations.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key inherit_from_idintegrations.inherit_from_id may be NULL, so the relationship to integrations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK categorycategory is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Either/or foreign keys without a CHECK project_id, organization_id, group_id, inherit_from_idintegrations has several nullable FKs (project_id, organization_id, group_id, inherit_from_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Wide table (35 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestampnull
updated_at timestampnull
active booleanNOT NULLFALSE
push_events booleannullTRUE
issues_events booleannullTRUE
merge_requests_events booleannullTRUE
tag_push_events booleannullTRUE
note_events booleanNOT NULLTRUE
category varcharNOT NULLCAST('common' AS varchar)
wiki_page_events booleannullTRUE
pipeline_events booleanNOT NULLFALSE
confidential_issues_events booleanNOT NULLTRUE
commit_events booleanNOT NULLTRUE
job_events booleanNOT NULLFALSE
confidential_note_events booleannullTRUE
deployment_events booleanNOT NULLFALSE
comment_on_event_enabled booleanNOT NULLTRUE
instance booleanNOT NULLFALSE
comment_detail smallintnull
inherit_from_id bigintnullintegrations.id 1:N · CASCADE
alert_events booleannull
group_id bigintnullnamespaces.id 1:N · CASCADE
type_new textnullCHECK char_length(type_new) <= 255
vulnerability_events booleanNOT NULLFALSE
archive_trace_events booleanNOT NULLFALSE
encrypted_properties byteanull
encrypted_properties_iv byteanull
incident_events booleanNOT NULLFALSE
group_mention_events booleanNOT NULLFALSE
group_confidential_mention_events booleanNOT NULLFALSE
organization_id bigintnullorganizations.id 1:N · CASCADE
event_filters jsonbNOT NULLCAST('{}' AS jsonb)
filter jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • (inherit_from_id) index_integrations_on_inherit_from_id
  • (organization_id) index_integrations_on_organization_id
  • (project_id, type_new) WHERE inherit_from_id IS NULL index_integrations_on_project_and_type_new_where_inherit_null
  • UNIQUE (project_id, type_new) index_integrations_on_project_id_and_type_new_unique
  • (type_new) index_integrations_on_type_new
  • (type_new, instance) WHERE instance = TRUE index_integrations_on_type_new_and_instance_partial
  • (type_new, id, inherit_from_id) WHERE active = TRUE AND group_id IS NOT NULL index_integrations_on_type_new_id_when_active_and_has_group
  • (type_new, id) WHERE active = TRUE AND project_id IS NOT NULL index_integrations_on_type_new_id_when_active_and_has_project
  • (group_id, type_new) index_integrations_on_unique_group_id_and_type_new

Referenced by

Table checks: num_nonnulls(group_id, organization_id, project_id) = 1; char_length(type_new) <= 255

internal_ids

5 cols · no RLS · line 22828View in 3D
  • Nullable foreign key namespace_idinternal_ids.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idinternal_ids.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
usage integerNOT NULL
last_value integerNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADE

Indexes

  • (namespace_id) index_internal_ids_on_namespace_id
  • (project_id) index_internal_ids_on_project_id
  • UNIQUE (usage, namespace_id) WHERE namespace_id IS NOT NULL index_internal_ids_on_usage_and_namespace_id
  • UNIQUE (usage, project_id) WHERE project_id IS NOT NULL index_internal_ids_on_usage_and_project_id

Referenced by

  • nothing

Table checks: num_nonnulls(namespace_id, project_id) = 1

ip_restrictions

3 cols · no RLS · line 22846View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
range varcharNOT NULL

Indexes

  • (group_id) index_ip_restrictions_on_group_id

Referenced by

  • nothing

issues

38 cols · no RLS · line 23161View in 3D
  • Nullable foreign key author_idissues.author_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key sprint_idissues.sprint_id may be NULL, so the relationship to sprints is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idissues.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key milestone_idissues.milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key duplicated_to_idissues.duplicated_to_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key moved_to_idissues.moved_to_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key closed_by_idissues.closed_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idissues.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key promoted_to_epic_idissues.promoted_to_epic_id may be NULL, so the relationship to epics is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key updated_by_idissues.updated_by_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK author_id, sprint_id, project_id, milestone_id, duplicated_to_id, moved_to_id, closed_by_id, namespace_id, promoted_to_epic_id, updated_by_idissues has several nullable FKs (author_id, sprint_id, project_id, milestone_id, duplicated_to_id, moved_to_id, closed_by_id, namespace_id, promoted_to_epic_id, updated_by_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone last_edited_atlast_edited_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Foreign-key cycle — issues → epics → work_item_parent_links → issues. Rows must be inserted with a deferred constraint or a NULL-then-update dance; backups/restores and truncation have no valid order; ON DELETE CASCADE can loop.
  • Foreign-key cycle — issues → epics → issues. Rows must be inserted with a deferred constraint or a NULL-then-update dance; backups/restores and truncation have no valid order; ON DELETE CASCADE can loop.
  • Wide table (38 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
title varcharnull
author_id bigintnullusers.id 1:N · SET NULL
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestampnull
updated_at timestampnull
description textnull
milestone_id bigintnullmilestones.id 1:N · SET NULL
iid integernull
updated_by_id bigintnullusers.id 1:N · SET NULL
weight integernull
confidential booleanNOT NULLFALSE
due_date datenull
moved_to_id bigintnullissues.id 1:N · SET NULL
lock_version integernull0CHECK lock_version IS NOT NULL
title_html textnull
description_html textnull
time_estimate integernull0
relative_position integernull
service_desk_reply_to varcharnull
cached_markdown_version integernull
last_edited_at timestampnull
last_edited_by_id bigintnull
discussion_locked booleannull
closed_at timestamptznull
closed_by_id bigintnullusers.id 1:N · SET NULL
state_id smallintNOT NULL1
duplicated_to_id bigintnullissues.id 1:N · SET NULL
promoted_to_epic_id bigintnullepics.id 1:N · SET NULL
health_status smallintnull
sprint_id bigintnullsprints.id 1:N · SET NULL
blocking_issues_count integerNOT NULL0
upvotes_count integerNOT NULL0
work_item_type_id bigintnullCHECK work_item_type_id IS NOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL
start_date datenull
imported_from smallintNOT NULL0
namespace_traversal_ids bigint[]nullCAST('{}' AS bigint[])

Indexes

  • (project_id, created_at, id, state_id) idx_issues_on_project_id_and_created_at_and_id_and_state_id
  • (project_id, due_date, id, state_id) WHERE due_date IS NOT NULL idx_issues_on_project_id_and_due_date_and_id_and_state_id
  • (project_id, relative_position, id, state_id) idx_issues_on_project_id_and_rel_position_and_id_and_state_id
  • (project_id, updated_at, id, state_id) idx_issues_on_project_id_and_updated_at_and_id_and_state_id
  • (project_id, work_item_type_id, closed_at) WHERE state_id = 2 idx_issues_on_project_work_item_type_closed_at_where_closed
  • ((namespace_traversal_ids)[1], created_at) idx_issues_root_namespace_created_at
  • ((namespace_traversal_ids)[1], updated_at) idx_issues_root_namespace_updated_at
  • (state_id, namespace_traversal_ids) idx_issues_state_id_namespace_traversal_ids
  • (project_id, confidential, author_id, id) WHERE state_id = 1 idx_open_issues_on_project_and_confidential_and_author_and_id
  • (namespace_id, closed_at) WHERE state_id = 2 AND work_item_type_id = 2 index_closed_incidents_on_namespace_id_closed_at
  • (project_id, state_id, blocking_issues_count) index_issue_on_project_id_state_id_and_blocking_issues_count
  • (author_id) index_issues_on_author_id
  • (closed_by_id) index_issues_on_closed_by_id
  • (description) WHERE CAST(title AS text) !~ similar_escape(CAST('[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]*' AS text), CAST(NULL AS text)) OR description !~ similar_escape(CAST('[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]*' AS text), CAST(NULL AS text)) index_issues_on_description_trigram_non_latin
  • (duplicated_to_id) WHERE duplicated_to_id IS NOT NULL index_issues_on_duplicated_to_id
  • (id, weight) index_issues_on_id_and_weight
  • (last_edited_by_id) index_issues_on_last_edited_by_id
  • (milestone_id, id) index_issues_on_milestone_id_and_id
  • (moved_to_id) WHERE moved_to_id IS NOT NULL index_issues_on_moved_to_id
  • (namespace_id, created_at, id, state_id) index_issues_on_namespace_id_created_at_id_state_id
  • UNIQUE (namespace_id, iid) index_issues_on_namespace_id_iid_unique
  • (namespace_id, relative_position, id, state_id) index_issues_on_namespace_id_relative_position_id_state_id
  • (namespace_id, updated_at, id, state_id) index_issues_on_namespace_id_updated_at_id_state_id
  • UNIQUE (project_id, iid) index_issues_on_project_id_and_iid
  • (project_id, upvotes_count) index_issues_on_project_id_and_upvotes_count
  • (project_id, closed_at, state_id, id) index_issues_on_project_id_closed_at_desc_state_id_and_id
  • (promoted_to_epic_id) WHERE promoted_to_epic_id IS NOT NULL index_issues_on_promoted_to_epic_id
  • (sprint_id) index_issues_on_sprint_id
  • (title) WHERE CAST(title AS text) !~ similar_escape(CAST('[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]*' AS text), CAST(NULL AS text)) OR description !~ similar_escape(CAST('[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]*' AS text), CAST(NULL AS text)) index_issues_on_title_trigram_non_latin
  • (updated_at) index_issues_on_updated_at
  • (updated_by_id) WHERE updated_by_id IS NOT NULL index_issues_on_updated_by_id
  • (work_item_type_id, namespace_id, created_at, state_id) index_issues_on_work_item_type_id_namespace_id_created_at_state
  • (work_item_type_id, project_id, created_at, state_id) index_issues_on_work_item_type_id_project_id_created_at_state
  • (namespace_id, confidential, author_id, id) WHERE state_id = 1 index_open_issues_on_namespace_id_confidential_author_id_id

Referenced by

Table checks: work_item_type_id IS NOT NULL; namespace_id IS NOT NULL; lock_version IS NOT NULL

iterations_cadences

13 cols · no RLS · line 23214View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
group_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
start_date datenull
duration_in_weeks integernull
iterations_in_advance integernull
active booleanNOT NULLTRUE
automatic booleanNOT NULLTRUE
title textNOT NULLCHECK char_length(title) <= 255
roll_over booleanNOT NULLFALSE
description textnullCHECK char_length(description) <= 5000
next_run_date datenull

Indexes

  • (group_id) index_iterations_cadences_on_group_id

Referenced by

  • boards (iteration_cadence_id, 1:N)
  • sprints (iterations_cadence_id, 1:N)

Table checks: char_length(description) <= 5000; char_length(title) <= 255

job_environments

8 cols · no RLS · line 23369View in 3D
  • Nullable foreign key deployment_idjob_environments.deployment_id may be NULL, so the relationship to deployments is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
environment_id bigintNOT NULLenvironments.id 1:N · CASCADE
ci_pipeline_id bigintNOT NULL
ci_job_id bigintNOT NULL
deployment_id bigintnulldeployments.id 1:N · CASCADE
expanded_environment_name textNOT NULLCHECK char_length(expanded_environment_name) <= 255
options jsonbNOT NULLCAST('{}' AS jsonb)

Indexes

  • UNIQUE (ci_job_id, environment_id) index_job_environments_on_ci_job_id_and_environment_id
  • (ci_pipeline_id) index_job_environments_on_ci_pipeline_id
  • (deployment_id) index_job_environments_on_deployment_id
  • (environment_id) index_job_environments_on_environment_id
  • (project_id) index_job_environments_on_project_id

Referenced by

  • nothing

Table checks: char_length(expanded_environment_name) <= 255

keys

16 cols · no RLS · line 23390View in 3D
  • Nullable foreign key organization_idkeys.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK typetype is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone last_used_atlast_used_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintnull
created_at timestampnull
updated_at timestampnull
key textnull
title varcharnull
type varcharnull
fingerprint varcharnull
public booleanNOT NULLFALSE
last_used_at timestampnull
fingerprint_sha256 byteanull
expires_at timestamptznull
expiry_notification_delivered_at timestamptznull
before_expiry_notification_delivered_at timestamptznull
usage_type smallintNOT NULL0
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • (date(timezone(CAST('UTC' AS text), expires_at)), before_expiry_notification_delivered_at) WHERE before_expiry_notification_delivered_at IS NULL idx_keys_expires_at_and_before_expiry_notification_undelivered
  • (date(timezone(CAST('UTC' AS text), expires_at)), id) WHERE expiry_notification_delivered_at IS NULL index_keys_on_expires_at_and_id
  • (fingerprint) index_keys_on_fingerprint
  • UNIQUE (fingerprint_sha256) index_keys_on_fingerprint_sha256_unique
  • (id) WHERE CAST(type AS text) = CAST('LDAPKey' AS text) index_keys_on_id_and_ldap_key_type
  • (last_used_at) index_keys_on_last_used_at
  • (organization_id) index_keys_on_organization_id
  • (user_id) index_keys_on_user_id
  • UNIQUE (id, type) WHERE public = TRUE index_on_deploy_keys_id_and_type_and_public

Referenced by

Table checks: organization_id IS NOT NULL

knowledge_graph_enabled_namespaces

4 cols · no RLS · line 23419View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
root_namespace_id bigintNOT NULLnamespaces.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • UNIQUE (root_namespace_id) index_knowledge_graph_enabled_namespaces_on_root_namespace_id

Referenced by

  • nothing

labels

15 cols · no RLS · line 23473View in 3D
  • Nullable foreign key project_idlabels.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idlabels.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idlabels.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK typetype is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
title varcharnull
color varcharnull
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestampnull
updated_at timestampnull
template booleannullFALSE
description varcharnull
description_html textnull
type varcharnull
group_id bigintnullnamespaces.id 1:N · CASCADE
cached_markdown_version integernull
lock_on_merge booleanNOT NULLFALSE
archived booleanNOT NULLFALSE
organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (group_id) index_labels_on_group_id
  • UNIQUE (group_id, title) WHERE project_id IS NULL index_labels_on_group_id_and_title_varchar_unique
  • (organization_id) index_labels_on_organization_id
  • UNIQUE (organization_id, title) WHERE organization_id IS NOT NULL index_labels_on_organization_id_and_title_varchar_unique
  • (project_id) index_labels_on_project_id
  • UNIQUE (project_id, title) WHERE group_id IS NULL index_labels_on_project_id_and_title_varchar_unique
  • (template) WHERE template index_labels_on_template
  • (title) index_labels_on_title_varchar
  • (type, project_id, id) index_labels_on_type_project_id_and_id

Referenced by

Table checks: num_nonnulls(group_id, organization_id, project_id) = 1

licenses

6 cols · no RLS · line 23630View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tablelicenses references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
data textNOT NULL
created_at timestampnull
updated_at timestampnull
cloud booleannullFALSE
last_synced_at timestamptznull

Indexes

  • none

Referenced by

  • nothing

list_user_preferences

6 cols · no RLS · line 23648View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
list_id bigintNOT NULLlists.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
collapsed booleannull

Indexes

  • (list_id) index_list_user_preferences_on_list_id
  • (user_id) index_list_user_preferences_on_user_id
  • UNIQUE (user_id, list_id) index_list_user_preferences_on_user_id_and_list_id

Referenced by

  • nothing

lists

17 cols · no RLS · line 23666View in 3D
  • Nullable foreign key custom_status_idlists.custom_status_id may be NULL, so the relationship to work_item_custom_statuses is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key iteration_idlists.iteration_id may be NULL, so the relationship to sprints is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idlists.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key label_idlists.label_id may be NULL, so the relationship to labels is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idlists.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idlists.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key milestone_idlists.milestone_id may be NULL, so the relationship to milestones is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK custom_status_id, iteration_id, project_id, label_id, user_id, group_id, milestone_idlists has several nullable FKs (custom_status_id, iteration_id, project_id, label_id, user_id, group_id, milestone_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
board_id bigintNOT NULLboards.id 1:N · CASCADE
label_id bigintnulllabels.id 1:N · CASCADE
list_type integerNOT NULL1
position integernull
created_at timestampNOT NULL
updated_at timestampNOT NULL
user_id bigintnullusers.id 1:N · CASCADE
milestone_id bigintnullmilestones.id 1:N · CASCADE
max_issue_count integerNOT NULL0
max_issue_weight integerNOT NULL0
limit_metric varchar(20)null
iteration_id bigintnullsprints.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
custom_status_id bigintnullwork_item_custom_statuses.id 1:N · CASCADE
system_defined_status_identifier smallintnull

Indexes

  • UNIQUE (board_id, custom_status_id) index_lists_on_board_id_and_custom_status_id
  • UNIQUE (board_id, label_id) index_lists_on_board_id_and_label_id
  • UNIQUE (board_id, system_defined_status_identifier) index_lists_on_board_id_and_system_defined_status_identifier
  • (custom_status_id) index_lists_on_custom_status_id
  • (group_id) index_lists_on_group_id
  • (iteration_id) index_lists_on_iteration_id
  • (label_id) index_lists_on_label_id
  • (list_type) index_lists_on_list_type
  • (milestone_id) index_lists_on_milestone_id
  • (project_id) index_lists_on_project_id
  • (user_id) index_lists_on_user_id

Referenced by

Table checks: list_type <> 6 OR num_nonnulls(system_defined_status_identifier, custom_status_id) = 1; num_nonnulls(group_id, project_id) = 1

milestone_releases

3 cols · no RLS · line 24450View in 3D
  • Nullable foreign key project_idmilestone_releases.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
milestone_id PKbigintNOT NULLmilestones.id 1:N · CASCADE
release_id PKbigintNOT NULLreleases.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (project_id) index_milestone_releases_on_project_id
  • (release_id) index_milestone_releases_on_release_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

milestones

15 cols · no RLS · line 24457View in 3D
  • Nullable foreign key group_idmilestones.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idmilestones.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK statestate is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
title varcharNOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
description textnull
due_date datenull
created_at timestampnull
updated_at timestampnull
state varcharnull
iid integernull
title_html textnull
description_html textnull
start_date datenull
cached_markdown_version integernull
group_id bigintnullnamespaces.id 1:N · CASCADE
lock_version integerNOT NULL0

Indexes

  • (description) index_milestones_on_description_trigram
  • (due_date) index_milestones_on_due_date
  • (group_id) index_milestones_on_group_id
  • UNIQUE (project_id, iid) index_milestones_on_project_id_and_iid
  • (title) index_milestones_on_title
  • (title) index_milestones_on_title_trigram

Referenced by

Table checks: num_nonnulls(group_id, project_id) = 1

mobile_device_push_subscriptions

13 cols · no RLS · line 24726View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
last_seen_at timestamptzNOT NULLnow()
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
platform smallintNOT NULL0
apns_environment smallintNOT NULL0
payload_mode smallintNOT NULL0
device_token jsonbNOT NULL
bundle_identifier textnullCHECK char_length(bundle_identifier) <= 255
device_name textnullCHECK char_length(device_name) <= 255
app_version textnullCHECK char_length(app_version) <= 64
locale textnullCHECK char_length(locale) <= 32

Indexes

  • UNIQUE (device_token, apns_environment) idx_mobile_push_subscriptions_on_token_and_environment
  • (last_seen_at) index_mobile_device_push_subscriptions_on_last_seen_at
  • (user_id) index_mobile_device_push_subscriptions_on_user_id

Referenced by

  • nothing

Table checks: char_length(locale) <= 32; char_length(app_version) <= 64; char_length(bundle_identifier) <= 255; char_length(device_name) <= 255

non_sql_service_pings

7 cols · no RLS · line 25239View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
recorded_at timestamptzNOT NULL
payload jsonbNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
metadata jsonbnull

Indexes

  • UNIQUE (organization_id, recorded_at) index_non_sql_service_pings_on_org_id_recorded_at

Referenced by

  • nothing

notes

30 cols · no RLS · line 25318View in 3D
  • Nullable foreign key review_idnotes.review_id may be NULL, so the relationship to reviews is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key namespace_idnotes.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idnotes.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idnotes.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK typetype is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity noteable_type, noteable_idnoteable_id points at different tables depending on noteable_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • Either/or foreign keys without a CHECK review_id, namespace_id, project_id, organization_idnotes has several nullable FKs (review_id, namespace_id, project_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone resolved_atresolved_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Wide table (30 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
note textnull
noteable_type varcharnullCHECK noteable_type IS NOT NULL
author_id bigintnull
created_at timestampnull
updated_at timestampnull
project_id bigintnullprojects.id 1:N · CASCADE
line_code varcharnull
commit_id varcharnull
noteable_id bigintnull
system booleanNOT NULLFALSE
st_diff textnull
updated_by_id bigintnull
type varcharnull
position textnull
original_position textnull
resolved_at timestampnull
resolved_by_id bigintnull
discussion_id varcharnull
note_html textnull
cached_markdown_version integernull
change_position textnull
resolved_by_push booleannull
review_id bigintnullreviews.id 1:N · SET NULL
confidential booleannull
last_edited_at timestamptznull
internal booleanNOT NULLFALSE
id PKbigintNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADE
imported_from smallintNOT NULL0
organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (project_id, commit_id) WHERE CAST(noteable_type AS text) = CAST('MergeRequest' AS text) index_notes_for_cherry_picked_merge_requests
  • (author_id, created_at, id) index_notes_on_author_id_and_created_at_and_id
  • (commit_id) index_notes_on_commit_id
  • (created_at) index_notes_on_created_at
  • (discussion_id) index_notes_on_discussion_id
  • (id) WHERE internal = TRUE index_notes_on_id_where_internal
  • (line_code) index_notes_on_line_code
  • (namespace_id) index_notes_on_namespace_id
  • (noteable_id, noteable_type, system) index_notes_on_noteable_id_and_noteable_type_system_author_id
  • (noteable_id, noteable_type, id) index_notes_on_noteable_id_noteable_type_and_id
  • (organization_id) index_notes_on_organization_id
  • (project_id, id) WHERE NOT system index_notes_on_project_id_and_id_and_system_false
  • (project_id, noteable_type) index_notes_on_project_id_and_noteable_type
  • (review_id) index_notes_on_review_id
  • (noteable_id, noteable_type) WHERE system = TRUE AND note ~~ CAST('%@%' AS text) index_notes_on_system_notes_with_mentions
  • (id) WHERE namespace_id IS NOT NULL AND project_id IS NOT NULL tmp_index_notes_on_id_with_namespace_and_project

Referenced by

Table checks: noteable_type IS NOT NULL; num_nonnulls(namespace_id, organization_id, project_id) >= 1

notification_settings

32 cols · no RLS · line 25362View in 3D
  • Enum-like column with no CHECK source_typesource_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity source_type, source_idsource_id points at different tables depending on source_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • Isolated tablenotification_settings references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
  • Wide table (32 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULL
source_id bigintnull
source_type varcharnull
level integerNOT NULL0
created_at timestampNOT NULL
updated_at timestampNOT NULL
new_note booleannull
new_issue booleannull
reopen_issue booleannull
close_issue booleannull
reassign_issue booleannull
new_merge_request booleannull
reopen_merge_request booleannull
close_merge_request booleannull
reassign_merge_request booleannull
merge_merge_request booleannull
failed_pipeline booleannull
success_pipeline booleannull
push_to_merge_request booleannull
issue_due booleannull
new_epic booleannull
notification_email varcharnull
fixed_pipeline booleannull
new_release booleannull
moved_project booleanNOT NULLTRUE
change_reviewer_merge_request booleannull
merge_when_pipeline_succeeds booleanNOT NULLFALSE
approver booleanNOT NULLFALSE
service_account_failed_pipeline booleanNOT NULLFALSE
service_account_success_pipeline booleanNOT NULLFALSE
service_account_fixed_pipeline booleanNOT NULLFALSE

Indexes

  • (source_id, source_type, level, user_id) index_notification_settings_on_source_and_level_and_user
  • UNIQUE (user_id, source_id, source_type) index_notifications_on_user_id_and_source_id_and_source_type
  • (user_id, notification_email, id) WHERE notification_email IS NOT NULL index_user_id_and_notification_email_to_notification_settings

Referenced by

  • nothing

onboarding_progresses

17 cols · no RLS · line 25642View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
merge_request_created_at timestamptznull
pipeline_created_at timestamptznull
user_added_at timestamptznull
trial_started_at timestamptznull
required_mr_approvals_enabled_at timestamptznull
code_owners_enabled_at timestamptznull
issue_created_at timestamptznull
secure_dependency_scanning_run_at timestamptznull
secure_dast_run_at timestamptznull
license_scanning_run_at timestamptznull
code_added_at timestamptznull
ended_at timestamptznull
duo_seat_assigned_at timestamptznull

Indexes

  • UNIQUE (namespace_id) index_onboarding_progresses_on_namespace_id

Referenced by

  • nothing

organizations

8 cols · no RLS · line 25989View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
name textNOT NULLCAST('' AS text)CHECK char_length(name) <= 255
path textNOT NULLCHECK char_length(path) <= 255
visibility_level smallintNOT NULL0
state smallintNOT NULL0
uuid uuidNOT NULLgen_random_uuid_v7()

Indexes

  • (name) index_organizations_on_name_trigram
  • (path) index_organizations_on_path_trigram
  • (state) index_organizations_on_state
  • UNIQUE (uuid) index_organizations_on_uuid
  • UNIQUE (lower(path)) unique_organizations_on_path_case_insensitive

Referenced by

Table checks: char_length(path) <= 255; char_length(name) <= 255

path_locks

6 cols · no RLS · line 27323View in 3D
  • Nullable foreign key project_idpath_locks.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key user_idpath_locks.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, user_idpath_locks has several nullable FKs (project_id, user_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
path varcharNOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
user_id bigintnullusers.id 1:N · CASCADE
created_at timestampNOT NULL
updated_at timestampNOT NULL

Indexes

  • (path) index_path_locks_on_path
  • (project_id) index_path_locks_on_project_id
  • (user_id) index_path_locks_on_user_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL

snippets

21 cols · no RLS · line 27453View in 3D
  • Nullable foreign key project_idsnippets.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK typetype is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
title varcharnull
content textnull
author_id bigintNOT NULL
project_id bigintnullprojects.id 1:N · CASCADE
created_at timestampnull
updated_at timestampnull
file_name varcharnull
type varcharnull
visibility_level integerNOT NULL0
title_html textnull
content_html textnull
cached_markdown_version integernull
description textnull
description_html textnull
encrypted_secret_token varchar(255)null
encrypted_secret_token_iv varchar(255)null
secret booleanNOT NULLFALSE
repository_read_only booleanNOT NULLFALSE
imported_from smallintNOT NULL0
organization_id bigintnull

Indexes

  • (id, project_id) index_snippet_on_id_and_project_id
  • (author_id) index_snippets_on_author_id
  • (content) index_snippets_on_content_trigram
  • (created_at) index_snippets_on_created_at
  • (description) index_snippets_on_description_trigram
  • (file_name) index_snippets_on_file_name_trigram
  • (id, created_at) index_snippets_on_id_and_created_at
  • (id, type) index_snippets_on_id_and_type
  • (organization_id) index_snippets_on_organization_id
  • (project_id, title) index_snippets_on_project_id_and_title
  • (project_id, visibility_level) index_snippets_on_project_id_and_visibility_level
  • (title) index_snippets_on_title_trigram
  • (updated_at) index_snippets_on_updated_at
  • (visibility_level, secret) index_snippets_on_visibility_level_and_secret

Referenced by

Table checks: num_nonnulls(organization_id, project_id) = 1

pipl_users

6 cols · no RLS · line 27486View in 3D
ColumnTypeNullDefaultReferencesNotes
user_id PKbigintNOT NULLusers.id 1:1 · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
initial_email_sent_at timestamptznull
last_access_from_pipl_country_at timestamptzNOT NULL
state smallintNOT NULL0

Indexes

  • (initial_email_sent_at) index_pipl_users_on_initial_email_sent_at

Referenced by

  • nothing

plan_limits

103 cols · no RLS · line 27495View in 3D
  • Wide table (103 columns) — Tables this wide usually hide several entities (or a JSON column that wants to be one). Every row update rewrites the whole tuple; TOAST kicks in; indexes bloat.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
plan_id bigintNOT NULLplans.id 1:1 · CASCADE
ci_pipeline_size integerNOT NULL0
ci_active_jobs integerNOT NULL0
project_hooks integerNOT NULL100
group_hooks integerNOT NULL50
ci_project_subscriptions integerNOT NULL2
ci_pipeline_schedules integerNOT NULL10
offset_pagination_limit integerNOT NULL50000
ci_instance_level_variables integerNOT NULL25
storage_size_limit integerNOT NULL0
ci_max_artifact_size_lsif integerNOT NULL200
ci_max_artifact_size_archive integerNOT NULL0
ci_max_artifact_size_metadata integerNOT NULL0
ci_max_artifact_size_trace integerNOT NULL0
ci_max_artifact_size_junit integerNOT NULL0
ci_max_artifact_size_sast integerNOT NULL0
ci_max_artifact_size_dependency_scanning integerNOT NULL350
ci_max_artifact_size_container_scanning integerNOT NULL150
ci_max_artifact_size_dast integerNOT NULL0
ci_max_artifact_size_codequality integerNOT NULL0
ci_max_artifact_size_license_management integerNOT NULL0
ci_max_artifact_size_license_scanning integerNOT NULL100
ci_max_artifact_size_performance integerNOT NULL0
ci_max_artifact_size_metrics integerNOT NULL0
ci_max_artifact_size_metrics_referee integerNOT NULL0
ci_max_artifact_size_network_referee integerNOT NULL0
ci_max_artifact_size_dotenv integerNOT NULL0
ci_max_artifact_size_cobertura integerNOT NULL0
ci_max_artifact_size_terraform integerNOT NULL5
ci_max_artifact_size_accessibility integerNOT NULL0
ci_max_artifact_size_cluster_applications integerNOT NULL0
ci_max_artifact_size_secret_detection integerNOT NULL0
ci_max_artifact_size_requirements integerNOT NULL0
ci_max_artifact_size_coverage_fuzzing integerNOT NULL0
ci_max_artifact_size_browser_performance integerNOT NULL0
ci_max_artifact_size_load_performance integerNOT NULL0
ci_needs_size_limit integerNOT NULL50
conan_max_file_size bigintNOT NULLCAST('3221225472' AS bigint)
maven_max_file_size bigintNOT NULLCAST('3221225472' AS bigint)
npm_max_file_size bigintNOT NULL524288000
nuget_max_file_size bigintNOT NULL524288000
pypi_max_file_size bigintNOT NULLCAST('3221225472' AS bigint)
generic_packages_max_file_size bigintNOT NULLCAST('5368709120' AS bigint)
golang_max_file_size bigintNOT NULL104857600
debian_max_file_size bigintNOT NULLCAST('3221225472' AS bigint)
project_feature_flags integerNOT NULL200
ci_max_artifact_size_api_fuzzing integerNOT NULL0
ci_pipeline_deployments integerNOT NULL500
pull_mirror_interval_seconds integerNOT NULL300
daily_invites integerNOT NULL0
rubygems_max_file_size bigintNOT NULLCAST('3221225472' AS bigint)
terraform_module_max_file_size bigintNOT NULL1073741824
helm_max_file_size bigintNOT NULL5242880
ci_registered_group_runners integerNOT NULL1000
ci_registered_project_runners integerNOT NULL1000
ci_daily_pipeline_schedule_triggers integerNOT NULL0
ci_max_artifact_size_running_container_scanning integerNOT NULL0
ci_max_artifact_size_cluster_image_scanning integerNOT NULL0
ci_jobs_trace_size_limit integerNOT NULL100
pages_file_entries integerNOT NULL200000
dast_profile_schedules integerNOT NULL1
external_audit_event_destinations integerNOT NULL5
dotenv_variables integerNOT NULL20
dotenv_size integerNOT NULL5120
pipeline_triggers integerNOT NULL25000
project_ci_secure_files integerNOT NULL100
repository_size bigintnull
security_policy_scan_execution_schedules integerNOT NULL0
web_hook_calls_mid integerNOT NULL0
web_hook_calls_low integerNOT NULL0
project_ci_variables integerNOT NULL8000
group_ci_variables integerNOT NULL30000
ci_max_artifact_size_cyclonedx integerNOT NULL1
rpm_max_file_size bigintNOT NULLCAST('5368709120' AS bigint)
ci_max_artifact_size_requirements_v2 integerNOT NULL0
pipeline_hierarchy_size integerNOT NULL1000
enforcement_limit integerNOT NULL0
notification_limit integerNOT NULL0
dashboard_limit_enabled_at timestamptznull
web_hook_calls integerNOT NULL0
project_access_token_limit integerNOT NULL0
google_cloud_logging_configurations integerNOT NULL5
ml_model_max_file_size bigintNOT NULLCAST('10737418240' AS bigint)
limits_history jsonbNOT NULLCAST('{}' AS jsonb)
updated_at timestamptzNOT NULLnow()
ci_max_artifact_size_annotations integerNOT NULL0
ci_job_annotations_size integerNOT NULL81920
ci_job_annotations_num integerNOT NULL20
file_size_limit_mb double precisionNOT NULL100.0
audit_events_amazon_s3_configurations integerNOT NULL5
ci_max_artifact_size_repository_xray bigintNOT NULL1073741824
active_versioned_pages_deployments_limit_by_namespace integerNOT NULL1000
ci_max_artifact_size_jacoco bigintNOT NULL0
import_placeholder_user_limit_tier_1 integerNOT NULL0
import_placeholder_user_limit_tier_2 integerNOT NULL0
import_placeholder_user_limit_tier_3 integerNOT NULL0
import_placeholder_user_limit_tier_4 integerNOT NULL0
ci_max_artifact_size_slsa_provenance_statement bigintNOT NULL0
cargo_max_file_size bigintNOT NULLCAST('5368709120' AS bigint)
plan_name_uid smallintnull
ci_max_artifact_size_sarif integerNOT NULL10
max_pipelines_per_merge_train smallintNOT NULL20

Indexes

  • UNIQUE (plan_id) index_plan_limits_on_plan_id
  • (plan_name_uid) index_plan_limits_on_plan_name_uid

Referenced by

  • nothing

plans

6 cols · no RLS · line 27610View in 3D
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestampNOT NULL
updated_at timestampNOT NULL
name varcharnull
title varcharnull
plan_name_uid smallintnullCHECK plan_name_uid IS NOT NULL

Indexes

  • UNIQUE (name) index_plans_on_name
  • UNIQUE (plan_name_uid) index_plans_on_plan_name_uid

Referenced by

Table checks: plan_name_uid IS NOT NULL

pool_repositories

6 cols · no RLS · line 27849View in 3D
  • Nullable foreign key organization_idpool_repositories.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK statestate is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
shard_id bigintNOT NULLshards.id 1:N · RESTRICT
disk_path varcharnull
state varcharnull
source_project_id bigintnull
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • (organization_id) index_pool_repositories_on_organization_id
  • (shard_id) index_pool_repositories_on_shard_id
  • UNIQUE (source_project_id, shard_id) index_pool_repositories_on_source_project_id_and_shard_id
  • UNIQUE (disk_path, shard_id) unique_pool_repositories_on_disk_path_and_shard_id

Referenced by

  • nothing

Table checks: organization_id IS NOT NULL

programming_languages

5 cols · no RLS · line 28247View in 3D
  • Isolated tableprogramming_languages references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name varcharNOT NULL
color varcharNOT NULL
created_at timestamptzNOT NULL
language_id bigintnull

Indexes

  • UNIQUE (language_id) index_programming_languages_on_language_id
  • UNIQUE (name) index_programming_languages_on_name

Referenced by

  • nothing

queries_service_pings

6 cols · no RLS · line 29762View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
recorded_at timestamptzNOT NULL
payload jsonbNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE

Indexes

  • UNIQUE (organization_id, recorded_at) index_queries_service_pings_on_org_id_recorded_at

Referenced by

  • nothing

raw_usage_data

8 cols · no RLS · line 29780View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
recorded_at timestamptzNOT NULL
sent_at timestamptznull
payload jsonbNOT NULL
version_usage_data_id_value bigintnull
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE

Indexes

  • UNIQUE (organization_id, recorded_at) index_raw_usage_data_on_organization_id_recorded_at

Referenced by

  • nothing

redirect_routes

7 cols · no RLS · line 29800View in 3D
  • Nullable foreign key namespace_idredirect_routes.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK source_typesource_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity source_type, source_idsource_id points at different tables depending on source_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
source_id bigintNOT NULL
source_type varcharNOT NULL
path varcharNOT NULL
created_at timestampNOT NULL
updated_at timestampNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (namespace_id) index_redirect_routes_on_namespace_id
  • UNIQUE (path) index_redirect_routes_on_path
  • UNIQUE (lower(CAST(path AS text))) index_redirect_routes_on_path_unique_text_pattern_ops
  • (source_type, source_id) index_redirect_routes_on_source_type_and_source_id
  • (source_type, id) WHERE namespace_id IS NULL tmp_idx_redirect_routes_on_source_type_id_where_namespace_null

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

relation_import_trackers

6 cols · no RLS · line 29841View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
relation smallintNOT NULL
status smallintNOT NULL0

Indexes

  • (project_id) index_relation_import_trackers_on_project_id

Referenced by

  • nothing

releases

13 cols · no RLS · line 29881View in 3D
  • Nullable foreign key project_idreleases.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key author_idreleases.author_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, author_idreleases has several nullable FKs (project_id, author_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
tag varcharnullCHECK tag IS NOT NULL
description textnull
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
created_at timestampNOT NULL
updated_at timestampNOT NULL
description_html textnull
cached_markdown_version integernull
author_id bigintnullusers.id 1:N · SET NULL
name varcharnull
sha varcharnull
released_at timestamptzNOT NULL
release_published_at timestamptznull

Indexes

  • (author_id, id, created_at) index_releases_on_author_id_id_created_at
  • (project_id, released_at, id) index_releases_on_project_id_and_released_at_and_id
  • (project_id, updated_at, released_at) index_releases_on_project_id_and_updated_at_and_released_at
  • (project_id, id) index_releases_on_project_id_id
  • UNIQUE (project_id, tag) index_releases_on_project_tag_unique
  • (released_at) index_releases_on_released_at
  • (release_published_at) releases_published_at_index

Referenced by

Table checks: project_id IS NOT NULL; tag IS NOT NULL

remote_mirrors

19 cols · no RLS · line 29907View in 3D
  • Nullable foreign key project_idremote_mirrors.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK update_statusupdate_status is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • TIMESTAMP without time zone last_update_atlast_update_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone last_successful_update_atlast_successful_update_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone last_update_started_atlast_update_started_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL
url varcharnull
enabled booleannullFALSE
update_status varcharnull
last_update_at timestampnull
last_successful_update_at timestampnull
last_error varcharnull
encrypted_credentials textnull
encrypted_credentials_iv varcharnull
encrypted_credentials_salt varcharnull
created_at timestampNOT NULL
updated_at timestampNOT NULL
last_update_started_at timestampnull
only_protected_branches booleanNOT NULLFALSE
remote_name varcharnull
error_notification_sent booleannull
keep_divergent_refs booleannull
mirror_branch_regex textnullCHECK char_length(mirror_branch_regex) <= 255

Indexes

  • (last_successful_update_at) index_remote_mirrors_on_last_successful_update_at
  • (project_id) index_remote_mirrors_on_project_id

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(mirror_branch_regex) <= 255

repository_languages

4 cols · no RLS · line 29940View in 3D
ColumnTypeNullDefaultReferencesNotes
project_id PKbigintNOT NULLprojects.id 1:N · CASCADE
programming_language_id PKbigintNOT NULL
share double precisionNOT NULL
language_id bigintnull

Indexes

  • UNIQUE (project_id, language_id) index_repository_languages_on_project_id_and_language_id
  • (programming_language_id) tmp_idx_repository_languages_on_programming_language_id

Referenced by

  • nothing

required_code_owners_sections

5 cols · no RLS · line 29947View in 3D
  • Nullable foreign key protected_branch_project_idrequired_code_owners_sections.protected_branch_project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key protected_branch_namespace_idrequired_code_owners_sections.protected_branch_namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
protected_branch_id bigintNOT NULLprotected_branches.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 1024
protected_branch_project_id bigintnullprojects.id 1:N · CASCADE
protected_branch_namespace_id bigintnullnamespaces.id 1:N · CASCADE

Indexes

  • (protected_branch_id) index_required_code_owners_sections_on_protected_branch_id
  • (protected_branch_namespace_id) index_required_code_owners_sections_on_protected_branch_namespa
  • (protected_branch_project_id) index_required_code_owners_sections_on_protected_branch_project

Referenced by

  • nothing

Table checks: char_length(name) <= 1024; num_nonnulls(protected_branch_namespace_id, protected_branch_project_id) = 1

reviews

5 cols · no RLS · line 30142View in 3D
  • Nullable foreign key author_idreviews.author_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
author_id bigintnullusers.id 1:N · SET NULL
merge_request_id bigintNOT NULLmerge_requests.id 1:N · CASCADE
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL

Indexes

  • (author_id) index_reviews_on_author_id
  • (merge_request_id) index_reviews_on_merge_request_id
  • (project_id) index_reviews_on_project_id

Referenced by

schema_migrations

2 cols · no RLS · line 30597View in 3D
  • Isolated tableschema_migrations references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
version PKvarcharNOT NULL
finished_at timestamptznullnow()

Indexes

  • none

Referenced by

  • nothing

sentry_issues

4 cols · no RLS · line 31280View in 3D
  • Nullable foreign key namespace_idsentry_issues.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
issue_id bigintNOT NULLissues.id 1:1 · CASCADE
sentry_issue_identifier bigintNOT NULL
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • UNIQUE (issue_id) index_sentry_issues_on_issue_id
  • (namespace_id) index_sentry_issues_on_namespace_id
  • (sentry_issue_identifier) index_sentry_issues_on_sentry_issue_identifier

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

slsa_attestations

15 cols · no RLS · line 31441View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
build_id bigintnull
status smallintNOT NULL0
expire_at timestamptznull
predicate_kind smallintNOT NULL0
predicate_type textNOT NULLCHECK char_length(predicate_type) <= 255
subject_digest textNOT NULLCHECK char_length(subject_digest) <= 255
file textnullCHECK char_length(file) <= 255
file_store smallintnull1
iid integernull
predicate_file textnullCHECK char_length(predicate_file) <= 1024
predicate_file_store smallintNOT NULL1

Indexes

  • (build_id) index_slsa_attestations_on_build_id
  • UNIQUE (subject_digest, project_id, predicate_kind) index_slsa_attestations_on_digest_project_predicate_uniq
  • UNIQUE (project_id, iid) index_slsa_attestations_on_project_id_iid

Referenced by

  • nothing

Table checks: char_length(file) <= 255; char_length(subject_digest) <= 255; char_length(predicate_type) <= 255; char_length(predicate_file) <= 1024

smartcard_identities

4 cols · no RLS · line 31472View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
subject varcharNOT NULL
issuer varcharNOT NULL

Indexes

  • UNIQUE (subject, issuer) index_smartcard_identities_on_subject_and_issuer
  • (user_id) index_smartcard_identities_on_user_id

Referenced by

  • nothing

software_license_policies

9 cols · no RLS · line 31601View in 3D
  • Nullable foreign key custom_software_license_idsoftware_license_policies.custom_software_license_id may be NULL, so the relationship to custom_software_licenses is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key approval_policy_rule_idsoftware_license_policies.approval_policy_rule_id may be NULL, so the relationship to approval_policy_rules is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key scan_result_policy_idsoftware_license_policies.scan_result_policy_id may be NULL, so the relationship to scan_result_policies is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK custom_software_license_id, approval_policy_rule_id, scan_result_policy_idsoftware_license_policies has several nullable FKs (custom_software_license_id, approval_policy_rule_id, scan_result_policy_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
classification integerNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
scan_result_policy_id bigintnullscan_result_policies.id 1:N · CASCADE
custom_software_license_id bigintnullcustom_software_licenses.id 1:N · CASCADE
approval_policy_rule_id bigintnullapproval_policy_rules.id 1:N · CASCADE
software_license_spdx_identifier textnullCHECK char_length(software_license_spdx_identifier) <= 255

Indexes

  • (custom_software_license_id) i_software_license_policies_on_custom_software_license_id
  • UNIQUE (project_id, custom_software_license_id, scan_result_policy_id) idx_software_license_policies_unique_on_custom_license_project
  • (approval_policy_rule_id) index_software_license_policies_on_approval_policy_rule_id
  • (scan_result_policy_id) index_software_license_policies_on_scan_result_policy_id

Referenced by

  • nothing

Table checks: num_nonnulls(custom_software_license_id, software_license_spdx_identifier) = 1; char_length(software_license_spdx_identifier) <= 255

spam_logs

14 cols · no RLS · line 31624View in 3D
  • Nullable foreign key user_idspam_logs.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idspam_logs.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK noteable_typenoteable_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Either/or foreign keys without a CHECK user_id, organization_idspam_logs has several nullable FKs (user_id, organization_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintnullusers.id 1:N · CASCADECHECK user_id IS NOT NULL
source_ip varcharnull
user_agent varcharnull
via_api booleannull
noteable_type varcharnull
title varcharnull
description textnull
created_at timestampNOT NULL
updated_at timestampNOT NULL
submitted_as_ham booleanNOT NULLFALSE
recaptcha_verified booleanNOT NULLFALSE
target_id bigintnull
organization_id bigintnullorganizations.id 1:N · CASCADECHECK organization_id IS NOT NULL

Indexes

  • (organization_id) index_spam_logs_on_organization_id
  • (user_id) index_spam_logs_on_user_id

Referenced by

  • nothing

Table checks: organization_id IS NOT NULL; user_id IS NOT NULL

sprints

15 cols · no RLS · line 31652View in 3D
  • Nullable foreign key iterations_cadence_idsprints.iterations_cadence_id may be NULL, so the relationship to iterations_cadences is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idsprints.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK iterations_cadence_id, group_idsprints has several nullable FKs (iterations_cadence_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
start_date datenullCHECK start_date IS NOT NULL
due_date datenullCHECK due_date IS NOT NULL
group_id bigintnullnamespaces.id 1:N · CASCADECHECK group_id IS NOT NULL
iid integerNOT NULL
cached_markdown_version integernull
title textnullCHECK char_length(title) <= 255
title_html textnull
description textnull
description_html textnull
state_enum smallintNOT NULL1
iterations_cadence_id bigintnulliterations_cadences.id 1:N · CASCADE
sequence integernull

Indexes

  • (iterations_cadence_id) index_sprints_iterations_cadence_id
  • (description) index_sprints_on_description_trigram
  • (due_date) index_sprints_on_due_date
  • (group_id) index_sprints_on_group_id
  • (title) index_sprints_on_title
  • (title) index_sprints_on_title_trigram

Referenced by

Table checks: group_id IS NOT NULL; char_length(title) <= 255; start_date IS NOT NULL; due_date IS NOT NULL

ssh_signatures

10 cols · no RLS · line 31681View in 3D
  • Nullable foreign key user_idssh_signatures.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key key_idssh_signatures.key_id may be NULL, so the relationship to keys is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK user_id, key_idssh_signatures has several nullable FKs (user_id, key_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
key_id bigintnullkeys.id 1:N · SET NULL
verification_status smallintNOT NULL0
commit_sha byteaNOT NULL
user_id bigintnullusers.id 1:N · SET NULL
key_fingerprint_sha256 byteanull
committer_email textnullCHECK char_length(committer_email) <= 255

Indexes

  • UNIQUE (commit_sha, project_id) index_ssh_signatures_on_commit_sha_project_id
  • (key_id) index_ssh_signatures_on_key_id
  • UNIQUE (project_id, commit_sha) index_ssh_signatures_on_project_id_and_commit_sha
  • (user_id) index_ssh_signatures_on_user_id

Referenced by

  • nothing

Table checks: char_length(committer_email) <= 255

subscriptions

8 cols · no RLS · line 31881View in 3D
  • Nullable foreign key user_idsubscriptions.user_id may be NULL, so the relationship to users is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key project_idsubscriptions.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK subscribable_typesubscribable_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity subscribable_type, subscribable_idsubscribable_id points at different tables depending on subscribable_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • Either/or foreign keys without a CHECK user_id, project_idsubscriptions has several nullable FKs (user_id, project_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintnullusers.id 1:N · CASCADECHECK user_id IS NOT NULL
subscribable_id bigintnull
subscribable_type varcharnull
subscribed booleannull
created_at timestampnull
updated_at timestampnull
project_id bigintnullprojects.id 1:N · CASCADE

Indexes

  • (project_id) index_subscriptions_on_project_id
  • UNIQUE (subscribable_id, subscribable_type, user_id, project_id) index_subscriptions_on_subscribable_and_user_id_and_project_id
  • (subscribable_id, subscribable_type, id) index_subscriptions_on_subscribable_type_subscribable_id_and_id
  • (user_id) index_subscriptions_on_user

Referenced by

  • nothing

Table checks: user_id IS NOT NULL

suggestions

11 cols · no RLS · line 31902View in 3D
  • Nullable foreign key namespace_idsuggestions.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
relative_order smallintNOT NULL
applied booleanNOT NULLFALSE
commit_id varcharnull
from_content textNOT NULL
to_content textNOT NULL
lines_above integerNOT NULL0
lines_below integerNOT NULL0
outdated booleanNOT NULLFALSE
note_id bigintNOT NULLnotes.id 1:N · CASCADE
namespace_id bigintnullnamespaces.id 1:N · CASCADECHECK namespace_id IS NOT NULL

Indexes

  • (namespace_id) index_suggestions_on_namespace_id
  • UNIQUE (note_id, relative_order) index_suggestions_on_note_id_and_relative_order

Referenced by

  • nothing

Table checks: namespace_id IS NOT NULL

supply_chain_attestation_states

10 cols · no RLS · line 31926View in 3D
  • Nullable foreign key project_idsupply_chain_attestation_states.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
supply_chain_attestation_id bigintNOT NULL
verification_state smallintNOT NULL0
verification_retry_count smallintNOT NULL0
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255
project_id bigintnullprojects.id 1:N · CASCADECHECK project_id IS NOT NULL

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_supply_chain_attestation_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_supply_chain_attestation_states_needs_verification
  • UNIQUE (supply_chain_attestation_id) index_supply_chain_attestation_states_on_attestation_id
  • (project_id) index_supply_chain_attestation_states_on_project_id
  • (verification_state) index_supply_chain_attestation_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_supply_chain_attestation_states_pending_verification

Referenced by

  • nothing

Table checks: project_id IS NOT NULL; char_length(verification_failure) <= 255

tags

3 cols · no RLS · line 32128View in 3D
  • Isolated tabletags references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name varcharnull
taggings_count integernull0

Indexes

  • UNIQUE (name) index_tags_on_name
  • (name) index_tags_on_name_trigram

Referenced by

  • nothing

target_branch_rules

6 cols · no RLS · line 32143View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
name textNOT NULLCHECK char_length(name) <= 255
target_branch textNOT NULL

Indexes

  • (project_id) index_target_branch_rules_on_project_id

Referenced by

  • nothing

Table checks: char_length(name) <= 255

term_agreements

6 cols · no RLS · line 32217View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
term_id bigintNOT NULLapplication_setting_terms.id 1:N
user_id bigintNOT NULLusers.id 1:N · CASCADE
accepted booleanNOT NULLFALSE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL

Indexes

  • (term_id) index_term_agreements_on_term_id
  • (user_id) index_term_agreements_on_user_id
  • UNIQUE (user_id, term_id) term_agreements_unique_index

Referenced by

  • nothing

timelog_categories

9 cols · no RLS · line 32337View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
billing_rate numeric(18, 4)null0.0
billable booleanNOT NULLFALSE
name textNOT NULLCHECK char_length(name) <= 255
description textnullCHECK char_length(description) <= 1024
color textNOT NULLCAST('#6699cc' AS text)CHECK char_length(color) <= 7

Indexes

  • UNIQUE (namespace_id, lower(name)) index_timelog_categories_on_unique_name_per_namespace

Referenced by

Table checks: char_length(name) <= 255; char_length(color) <= 7; char_length(description) <= 1024

timelogs

13 cols · no RLS · line 32361View in 3D
  • Nullable foreign key project_idtimelogs.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key timelog_category_idtimelogs.timelog_category_id may be NULL, so the relationship to timelog_categories is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key issue_idtimelogs.issue_id may be NULL, so the relationship to issues is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key merge_request_idtimelogs.merge_request_id may be NULL, so the relationship to merge_requests is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key note_idtimelogs.note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Either/or foreign keys without a CHECK project_id, timelog_category_id, issue_id, merge_request_id, note_idtimelogs has several nullable FKs (project_id, timelog_category_id, issue_id, merge_request_id, note_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone spent_atspent_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
time_spent integerNOT NULL
user_id bigintnull
created_at timestampNOT NULL
updated_at timestampNOT NULL
issue_id bigintnullissues.id 1:N · CASCADE
merge_request_id bigintnullmerge_requests.id 1:N · CASCADE
spent_at timestampnullnow()
project_id bigintnullprojects.id 1:N · CASCADE
summary textnullCHECK char_length(summary) <= 255
note_id bigintnullnotes.id 1:N · SET NULL
timelog_category_id bigintnulltimelog_categories.id 1:N · SET NULL
namespace_id bigintNOT NULLnamespaces.id 1:N · CASCADE

Indexes

  • (issue_id) index_timelogs_on_issue_id
  • (merge_request_id) index_timelogs_on_merge_request_id
  • (namespace_id) index_timelogs_on_namespace_id
  • (note_id) index_timelogs_on_note_id
  • (project_id, spent_at) index_timelogs_on_project_id_and_spent_at
  • (spent_at) WHERE spent_at IS NOT NULL index_timelogs_on_spent_at
  • (timelog_category_id) index_timelogs_on_timelog_category_id
  • (user_id) index_timelogs_on_user_id

Referenced by

  • nothing

Table checks: char_length(summary) <= 255; num_nonnulls(issue_id, merge_request_id) = 1

todos

16 cols · no RLS · line 32388View in 3D
  • Nullable foreign key project_idtodos.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idtodos.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key note_idtodos.note_id may be NULL, so the relationship to notes is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idtodos.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Enum-like column with no CHECK target_typetarget_type is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Enum-like column with no CHECK statestate is a short string that clearly takes a fixed set of values, but the database accepts anything. Typos become new states, and nobody can list the legal values without reading application code.
  • Polymorphic reference without referential integrity target_type, target_idtarget_id points at different tables depending on target_type. No FK can express that, so orphans accumulate silently and every join needs a CASE. Acceptable for append-only audit data; painful anywhere the target must still exist.
  • Either/or foreign keys without a CHECK project_id, organization_id, note_id, group_idtodos has several nullable FKs (project_id, organization_id, note_id, group_id) that look like an exclusive arc — a row should point at exactly one of them. Nothing stops zero or both.
  • TIMESTAMP without time zone created_atcreated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
  • TIMESTAMP without time zone updated_atupdated_at stores wall-clock time with no zone. It reads back differently depending on the session's TimeZone, and DST transitions produce ambiguous values.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
project_id bigintnullprojects.id 1:N · CASCADE
target_id bigintnull
target_type varcharNOT NULL
author_id bigintNOT NULLusers.id 1:N · CASCADE
action integerNOT NULL
state varcharNOT NULL
created_at timestampnull
updated_at timestampnull
commit_id varcharnull
group_id bigintnullnamespaces.id 1:N · CASCADE
resolved_by_action smallintnull
note_id bigintnullnotes.id 1:N · CASCADE
snoozed_until timestamptznull
organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (user_id, project_id, target_type, target_id, id) WHERE CAST(state AS text) = CAST('pending' AS text) index_on_todos_user_project_target_and_state
  • (project_id, user_id, id, target_type) index_requirements_project_id_user_id_id_and_target_type
  • (user_id, target_type) index_requirements_user_id_and_target_type
  • (user_id, state, timestamp_coalesce(snoozed_until, created_at)) index_todos_coalesced_snoozed_until_created_at
  • (author_id, created_at) index_todos_on_author_id_and_created_at
  • (commit_id) index_todos_on_commit_id
  • (group_id) index_todos_on_group_id
  • (note_id) index_todos_on_note_id
  • (organization_id) index_todos_on_organization_id
  • (project_id, id) index_todos_on_project_id_and_id
  • (target_type, target_id) index_todos_on_target_type_and_target_id
  • (user_id, id) WHERE CAST(state AS text) = CAST('done' AS text) index_todos_on_user_id_and_id_done
  • (user_id, id) WHERE CAST(state AS text) = CAST('pending' AS text) index_todos_on_user_id_and_id_pending

Referenced by

  • nothing

Table checks: num_nonnulls(group_id, organization_id, project_id) = 1

topics

13 cols · no RLS · line 32417View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
name textNOT NULLCHECK char_length(name) <= 255
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
avatar textnullCHECK char_length(avatar) <= 255
description textnullCHECK char_length(description) <= 1024
total_projects_count bigintNOT NULL0
non_private_projects_count bigintNOT NULL0
title textnullCHECK char_length(title) <= 255
slug textnullCHECK char_length(slug) <= 255
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE
cached_markdown_version integerNOT NULL0
description_html textnullCHECK char_length(description_html) <= 50000

Indexes

  • (non_private_projects_count, id) index_topics_non_private_projects_count
  • (name) index_topics_on_name
  • (name) index_topics_on_name_trigram
  • (organization_id, lower(name), total_projects_count) index_topics_on_org_id_and_lower_name_and_projects_count
  • UNIQUE (organization_id, name) index_topics_on_organization_id_and_name
  • (organization_id, non_private_projects_count) index_topics_on_organization_id_and_non_private_projects_count
  • UNIQUE (organization_id, slug) WHERE slug IS NOT NULL index_topics_on_organization_id_slug_and
  • (total_projects_count, id) index_topics_total_projects_count

Referenced by

Table checks: char_length(slug) <= 255; char_length(title) <= 255; char_length(avatar) <= 255; char_length(description) <= 1024; char_length(name) <= 255; char_length(description_html) <= 50000

upcoming_reconciliations

7 cols · no RLS · line 32448View in 3D
  • Nullable foreign key namespace_idupcoming_reconciliations.namespace_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
namespace_id bigintnullnamespaces.id 1:1 · CASCADE
next_reconciliation_date dateNOT NULL
display_alert_from dateNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
organization_id bigintNOT NULLorganizations.id 1:N · CASCADE

Indexes

  • UNIQUE (namespace_id) index_upcoming_reconciliations_on_namespace_id
  • (organization_id) index_upcoming_reconciliations_on_organization_id

Referenced by

  • nothing

upload_states

8 cols · no RLS · line 32467View in 3D
  • Isolated tableupload_states references nothing and nothing references it. Either it is a staging/log table (fine, say so), or it is dead, or it is the seed of a second data model growing beside the first.
ColumnTypeNullDefaultReferencesNotes
verification_started_at timestamptznull
verification_retry_at timestamptznull
verified_at timestamptznull
upload_id PKbigintNOT NULL
verification_state smallintNOT NULL0
verification_retry_count smallintnull
verification_checksum byteanull
verification_failure textnullCHECK char_length(verification_failure) <= 255

Indexes

  • (verification_retry_at) WHERE verification_state = 3 index_upload_states_failed_verification
  • (verification_state) WHERE verification_state = 0 OR verification_state = 3 index_upload_states_needs_verification
  • (upload_id) index_upload_states_on_upload_id
  • (verification_state) index_upload_states_on_verification_state
  • (verified_at) WHERE verification_state = 0 index_upload_states_pending_verification

Referenced by

  • nothing

Table checks: char_length(verification_failure) <= 255

vs_code_settings

9 cols · no RLS · line 33474View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
setting_type textNOT NULLCHECK char_length(setting_type) <= 256
content textNOT NULLCHECK char_length(content) <= 524288
uuid uuidnullCHECK uuid IS NOT NULL
version integernull0CHECK version IS NOT NULL
settings_context_hash textnullCHECK char_length(settings_context_hash) <= 255

Indexes

  • UNIQUE (user_id, setting_type, settings_context_hash) unique_user_id_setting_type_and_settings_context_hash

Referenced by

  • nothing

Table checks: version IS NOT NULL; uuid IS NOT NULL; char_length(content) <= 524288; char_length(settings_context_hash) <= 255; char_length(setting_type) <= 256; (setting_type = CAST('extensions' AS text) AND settings_context_hash IS NOT NULL) OR (setting_type <> CAST('extensions' AS text) AND settings_context_hash IS NULL)

vulnerabilities

29 cols · no RLS · line 33501View in 3D
  • Nullable foreign key finding_idvulnerabilities.finding_id may be NULL, so the relationship to vulnerability_occurrences is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Foreign-key cycle — vulnerabilities → vulnerability_occurrences → vulnerabilities. Rows must be inserted with a deferred constraint or a NULL-then-update dance; backups/restores and truncation have no valid order; ON DELETE CASCADE can loop.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULL
author_id bigintNOT NULL
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
title varchar(255)NOT NULL
title_html textnull
description textnull
description_html textnull
state smallintNOT NULL1
severity smallintNOT NULL
severity_overridden booleannullFALSE
resolved_by_id bigintnull
resolved_at timestamptznull
report_type smallintNOT NULL
cached_markdown_version integernull
confirmed_by_id bigintnull
confirmed_at timestamptznull
dismissed_at timestamptznull
dismissed_by_id bigintnull
resolved_on_default_branch booleanNOT NULLFALSE
present_on_default_branch booleanNOT NULLTRUE
detected_at timestamptznullnow()
finding_id bigintnullvulnerability_occurrences.id 1:N · CASCADECHECK finding_id IS NOT NULL
cvss jsonbnullCAST('[]' AS jsonb)
auto_resolved booleanNOT NULLFALSE
uuid uuidnull
solution textnullCHECK char_length(solution) <= 7000
partition_id bigintnull1

Indexes

  • (project_id, id) WHERE report_type = 7 AND state = ANY(ARRAY[1, 4]) AND …(present_on_default_branch) idx_vulnerabilities_on_project_id_and_id_active_cis_dft_branch
  • (project_id, created_at, present_on_default_branch) WHERE state <> 1 idx_vulnerabilities_partial_devops_adoption_and_default_branch
  • (project_id, state, report_type, present_on_default_branch, severity, id) index_vulnerabilities_common_finder_query_on_default_branch
  • (author_id) index_vulnerabilities_on_author_id
  • (confirmed_by_id) index_vulnerabilities_on_confirmed_by_id
  • (dismissed_by_id) index_vulnerabilities_on_dismissed_by_id
  • (finding_id) index_vulnerabilities_on_finding_id
  • (project_id, id) index_vulnerabilities_on_project_id_and_id
  • (resolved_by_id) index_vulnerabilities_on_resolved_by_id
  • (project_id, id) WHERE …(present_on_default_branch) index_vulnerabilities_project_id_and_id_on_default_branch
  • (project_id, state, severity, present_on_default_branch) index_vulnerabilities_project_id_state_severity_default_branch
  • (state, id) WHERE resolved_at IS NOT NULL OR dismissed_at IS NOT NULL tmp_idx_vulnerabilities_state_id

Referenced by

Table checks: finding_id IS NOT NULL; char_length(solution) <= 7000

webauthn_registrations

11 cols · no RLS · line 34555View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
user_id bigintNOT NULLusers.id 1:N · CASCADE
counter bigintNOT NULL0
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
credential_xid textNOT NULLCHECK char_length(credential_xid) <= 1364
name textNOT NULLCHECK char_length(name) <= 255
public_key textNOT NULL
authentication_mode smallintNOT NULL2
passkey_eligible booleanNOT NULLFALSE
last_used_at timestamptznull

Indexes

  • UNIQUE (credential_xid) index_webauthn_registrations_on_credential_xid
  • (user_id) index_webauthn_registrations_on_user_id
  • (authentication_mode) WHERE authentication_mode = 1 index_webauthn_registrations_where_authn_mode_is_one

Referenced by

  • nothing

Table checks: char_length(name) <= 255; char_length(credential_xid) <= 1364

xray_reports

6 cols · no RLS · line 35336View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
lang textNOT NULLCHECK char_length(lang) <= 255
payload jsonbNOT NULL

Indexes

  • UNIQUE (project_id, lang) index_xray_reports_on_project_id_and_lang

Referenced by

  • nothing

Table checks: char_length(lang) <= 255

zentao_tracker_data

15 cols · no RLS · line 35355View in 3D
  • Nullable foreign key project_idzentao_tracker_data.project_id may be NULL, so the relationship to projects is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key group_idzentao_tracker_data.group_id may be NULL, so the relationship to namespaces is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
  • Nullable foreign key organization_idzentao_tracker_data.organization_id may be NULL, so the relationship to organizations is optional. That is legitimate (e.g. approved_by before approval) but often a modelling shrug: a row with no owner, or two nullable FKs that are secretly an either/or.
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
integration_id bigintNOT NULLintegrations.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
encrypted_url byteanull
encrypted_url_iv byteanull
encrypted_api_url byteanull
encrypted_api_url_iv byteanull
encrypted_zentao_product_xid byteanull
encrypted_zentao_product_xid_iv byteanull
encrypted_api_token byteanull
encrypted_api_token_iv byteanull
project_id bigintnullprojects.id 1:N · CASCADE
group_id bigintnullnamespaces.id 1:N · CASCADE
organization_id bigintnullorganizations.id 1:N · CASCADE

Indexes

  • (group_id) index_zentao_tracker_data_on_group_id
  • (integration_id) index_zentao_tracker_data_on_integration_id
  • (organization_id) index_zentao_tracker_data_on_organization_id
  • (project_id) index_zentao_tracker_data_on_project_id

Referenced by

  • nothing

Table checks: num_nonnulls(group_id, organization_id, project_id) = 1

zoom_meetings

7 cols · no RLS · line 35511View in 3D
ColumnTypeNullDefaultReferencesNotes
id PKbigintNOT NULL
project_id bigintNOT NULLprojects.id 1:N · CASCADE
issue_id bigintNOT NULLissues.id 1:N · CASCADE
created_at timestamptzNOT NULL
updated_at timestamptzNOT NULL
issue_status smallintNOT NULL1
url varchar(255)null

Indexes

  • (issue_id) index_zoom_meetings_on_issue_id
  • UNIQUE (issue_id, issue_status) WHERE issue_status = 1 index_zoom_meetings_on_issue_id_and_issue_status
  • (issue_status) index_zoom_meetings_on_issue_status
  • (project_id) index_zoom_meetings_on_project_id

Referenced by

  • nothing