Skip to content

Add PostgresSequence view

Max Orefice requested to merge morefice/add-postgres-sequences-view into master

Ref: #373887 (closed)

What does this MR do and why?

This MR adds a new posgres view which is used to identify the sequence name of a given table.

Gitlab::Database::PostgresSequence.by_table_name('ci_job_artifacts')
=> [#<Gitlab::Database::PostgresSequence:0x00000001614bc690 seq_name: "ci_job_artifacts_id_seq", table_name: "ci_job_artifacts", col_name: "id", object_kind: "S">]

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Max Orefice

Merge request reports

Loading