#30526 (A) [BE] Wiki Events (models)
What does this MR do?
This MR is the modelling sections of the work required for #30526 (closed)
This adds two new models (WikePageMeta
and WikiPageSlug
) which are used to record the metadata for wiki pages when we create events. These records are updated when slugs change (through our API) so that we maintain referential integrity, and can look up wiki pages even when their ID is now different.
Future work will require us maintaining these records for pages created through the git-access API
Migration Output
Console output for rollback:
$ rails db:rollback
== 20200302152516 AddWikiSlug: reverting ======================================
-- drop_table(:wiki_page_slugs, {:id=>:serial})
-> 0.0816s
-- drop_table(:wiki_page_meta, {:id=>:serial})
-> 0.0036s
== 20200302152516 AddWikiSlug: reverted (0.0912s) =============================
Console output for migrate:
$ rails db:migrate
== 20200302152516 AddWikiSlug: migrating ======================================
-- create_table(:wiki_page_meta, {:id=>:serial})
-> 0.0701s
-- create_table(:wiki_page_slugs, {:id=>:serial})
-> 0.0354s
== 20200302152516 AddWikiSlug: migrated (0.1058s) =============================
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
This just adds the new record types. No records are created in this MR (see the next in the series). This does not impose any new complexity on queries or change performance.
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
See #30526 (closed)
Edited by 🤖 GitLab Bot 🤖