Geo - Create new verification state table for SnippetRepository
What does this MR do and why?
Geo functionality requires us to track the state of replicated data types - done with separate state tables which include the verification data, like upload_states for our uploads and wiki_repository_states for our wiki_repositories tables for example.
Some models - Ci::PipelineArtifact, Packages::PackageFile, SnippetRepository and Terraform::StateVersion never had the verification attributes split out into separate state tables, so contain verification data in the parent model themselves.
This MR is the first iteration to address this issue by creating the new verification tables and models.
This MR is not intended to change any existing functionality and the tables should remain unused until following MRs where we will backfill these new tables.
Summary of changes -
- For
SnippetRepositoryStatewe've created the following:-- migration to create the new table, including indexes copying existing state table indexes
- model
- db/docs/*.yml entry
- model spec
- factory
Relates to #516947 (closed)
Changelog: changed
EE: true
References
- TODO - MRs introducing previously created state tables
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Check the existence of the new tables by going into the DB console with
bundle exec rails dbconsole - Check the definition of each table using:
\d snippet_repository_states
Related to #516947 (closed)