Skip to content

Added post_migration to update plan titles

Etienne Baqué requested to merge 300546-rename-persisted-plans into master

What does this MR do?

This MR updates the title of a couple of Plan records:

  • Silver -> Premium (Formerly Silver)
  • Gold -> Ultimate (Formerly Gold)

Up / Down migrations

etienne@dell ~/src/gdk/gitlab(300546-rename-persisted-plans ✔) rails db:migrate:up VERSION=20210201114748
== 20210201114748 RenamePlanTitles: migrating =================================
-- execute("UPDATE plans SET title='Premium (Formerly Silver)' WHERE name='silver'")
   -> 0.0006s
-- execute("UPDATE plans SET title='Ultimate (Formerly Gold)' WHERE name='gold'")
   -> 0.0279s
== 20210201114748 RenamePlanTitles: migrated (0.0286s) ========================

etienne@dell ~/src/gdk/gitlab(300546-rename-persisted-plans ✗) rails db:migrate:down VERSION=20210201114748
== 20210201114748 RenamePlanTitles: reverting =================================
-- execute("UPDATE plans SET title='Silver' WHERE name='silver'")
   -> 0.0005s
-- execute("UPDATE plans SET title='Gold' WHERE name='gold'")
   -> 0.0001s
== 20210201114748 RenamePlanTitles: reverted (0.0007s) ========================

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

Related to #300546 (closed)

Edited by Etienne Baqué

Merge request reports