Skip to content

Revert project has external wiki MR

Adam Hegyi requested to merge revert-project-has_external_wiki into master

What does this MR do?

This MR reverts !50916 (merged)

The two migrations ensure that local dev envs and staging are in a consistent state.

I tested the migrations in two scenarios:

  1. When the reverted migrations were not executed (missing). Same case what we have for production ATM.
  2. When the reverted migrations were already executed. STG environment.

Migrations:

Up:

== 20210203092540 RemoveHasExternalWikiConstraint: migrating ==================
-- execute("ALTER TABLE projects\nDROP CONSTRAINT IF EXISTS check_421d399b70\n")
   -> 0.0007s
== 20210203092540 RemoveHasExternalWikiConstraint: migrated (0.0037s) =========

== 20210203092549 RestoreHasExternalWikiDefaultValue: migrating ===============
== 20210203092549 RestoreHasExternalWikiDefaultValue: migrated (0.0038s) ======

Down:

== 20210203092549 RestoreHasExternalWikiDefaultValue: reverting ===============
-- change_column_default(:projects, :has_external_wiki, {:from=>nil, :to=>false})
   -> 0.0033s
== 20210203092549 RestoreHasExternalWikiDefaultValue: reverted (0.0075s) ======


== 20210203092540 RemoveHasExternalWikiConstraint: reverting ==================
-- current_schema()
   -> 0.0002s
-- transaction_open?()
   -> 0.0000s
-- current_schema()
   -> 0.0002s
-- execute("ALTER TABLE projects\nADD CONSTRAINT check_421d399b70\nCHECK ( has_external_wiki IS NOT NULL )\nNOT VALID;\n")
   -> 0.0006s
== 20210203092540 RemoveHasExternalWikiConstraint: reverted (0.0114s) =========

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Yannis Roussos

Merge request reports