Skip to content

Draft: Jihu annotations in migrations

Andreas Brandl requested to merge ab/jihu-meta-yml into master

What does this MR do and why?

This is very much a draft for gitlab-org/database-team/team-tasks#192 (comment 683988570).

I turned around on the idea of PG comments (again) as we also have plans to add more metadata (think: owner, description, ...) and we've already discussed that PG comments are not the best place for that (a change would require a database migration).

So instead of PG comments, we're capturing this metadata in YAML files.

The idea is to have JH use Gitlab::Database::Migration[1.0, type: :jihu], so we can provide some extra behavior for their migrations. For example, add_column, create_table etc would additionally write out some yaml files (that should get checked in) for those annotations.

Missing:

  • Sanity check
  • Specs
  • Structuring code better

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

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 Andreas Brandl

Merge request reports

Loading