Revert project has external wiki MR
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:
- When the reverted migrations were not executed (missing). Same case what we have for production ATM.
- 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
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
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
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