Skip to content

Backend: Create catalog_resource_components table

Context

We need a table to store metadata about versioned CI components. This metadata will be used to provide auto-generated documentation on the CI Catalog resource details page.

Proposed solution

Introduce a new table catalog_resource_components to the main database.

catalog_resource_components(
  name # component name
  inputs # specs of the inputs. JSON serialized
  catalog_version_id FK to catalog_resource_versions.id
  resource_type integer (enum { template: 1 })
  catalog_resource_id FK to catalog_resources.id
  project_id FK to projects.id
  created_at
)