Skip to content

Add epic_id to resource_state_events

Patrick Derichs requested to merge add-epic-id-to-resource-state-event-pd into master

What does this MR do?

As a follow up to !30982 (comment 338163080) this MR adds epic_id to resource_state_events in preparation of state tracking for epics.

Migrations

Up

> bundle exec rails db:migrate:up VERSION=20200511092246
bundle exec rails db:migrate:up VERSION=20200511092505

== 20200511092246 AddEpicIdToResourceStateEvents: migrating ===================
-- add_column(:resource_state_events, :epic_id, :integer)
   -> 0.0008s
-- add_index(:resource_state_events, :epic_id, {:name=>"index_resource_state_events_on_epic_id"})
   -> 0.0121s
== 20200511092246 AddEpicIdToResourceStateEvents: migrated (0.0130s) ==========

== 20200511092505 AddForeignKeyToEpicIdOnResourceStateEvents: migrating =======
-- add_foreign_key(:resource_state_events, :epics, {:column=>:epic_id, :on_delete=>:cascade})
   -> 0.0080s
== 20200511092505 AddForeignKeyToEpicIdOnResourceStateEvents: migrated (0.0107s) 

Down

> bundle exec rails db:migrate:down VERSION=20200511092505
bundle exec rails db:migrate:down VERSION=20200511092246

== 20200511092505 AddForeignKeyToEpicIdOnResourceStateEvents: reverting =======
-- remove_foreign_key(:resource_state_events, {:column=>:epic_id})
   -> 0.0037s
== 20200511092505 AddForeignKeyToEpicIdOnResourceStateEvents: reverted (0.0065s) 

== 20200511092246 AddEpicIdToResourceStateEvents: reverting ===================
-- remove_index(:resource_state_events, {:name=>"index_resource_state_events_on_epic_id"})
   -> 0.0007s
-- remove_column(:resource_state_events, :epic_id, :integer)
   -> 0.0003s
== 20200511092246 AddEpicIdToResourceStateEvents: reverted (0.0011s) ==========

Screenshots

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 🤖 GitLab Bot 🤖

Merge request reports