Create operations_feature_flags_issues Table
What does this MR do?
Create the operations_feature_flags_issues
table.
See the ff-issues-widget
branch compared against master
for further work implementing the issue that uses this table.
Issue: #26456 (closed).
Migration Output
$ bin/rails db:migrate
== 20200526164946 CreateOperationsFeatureFlagsIssues: migrating ===============
-- create_table(:operations_feature_flags_issues)
-> 0.0080s
== 20200526164946 CreateOperationsFeatureFlagsIssues: migrated (0.0081s) ======
== 20200526164947 AddForeignKeyToOpsFeatureFlagsIssues: migrating =============
-- add_foreign_key(:operations_feature_flags_issues, :issues, {:column=>:issue_id, :on_delete=>:cascade})
-> 0.0026s
== 20200526164947 AddForeignKeyToOpsFeatureFlagsIssues: migrated (0.0058s) ====
$ bin/rails dbconsole
psql (11.7)
Type "help" for help.
gitlabhq_development=# \d operations_feature_flags_issues
Table "public.operations_feature_flags_issues"
Column | Type | Collation | Nullable | Default
-----------------+--------+-----------+----------+-------------------------------------------------------------
id | bigint | | not null | nextval('operations_feature_flags_issues_id_seq'::regclass)
feature_flag_id | bigint | | not null |
issue_id | bigint | | not null |
Indexes:
"operations_feature_flags_issues_pkey" PRIMARY KEY, btree (id)
"index_ops_feature_flags_issues_on_feature_flag_id_and_issue_id" UNIQUE, btree (feature_flag_id, issue_id)
"index_operations_feature_flags_issues_on_issue_id" btree (issue_id)
Foreign-key constraints:
"fk_rails_6a8856ca4f" FOREIGN KEY (feature_flag_id) REFERENCES operations_feature_flags(id) ON DELETE CASCADE
"fk_rails_fb4d2a7cb1" FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE
gitlabhq_development=# \q
$ STEP=2 bin/rails db:rollback
== 20200526164947 AddForeignKeyToOpsFeatureFlagsIssues: reverting =============
-- remove_foreign_key(:operations_feature_flags_issues, {:column=>:issue_id})
-> 0.0046s
== 20200526164947 AddForeignKeyToOpsFeatureFlagsIssues: reverted (0.0083s) ====
== 20200526164946 CreateOperationsFeatureFlagsIssues: reverting ===============
-- drop_table(:operations_feature_flags_issues)
-> 0.0012s
== 20200526164946 CreateOperationsFeatureFlagsIssues: reverted (0.0027s) ======
$ bin/rails dbconsole
psql (11.7)
Type "help" for help.
gitlabhq_development=# \d operations_feature_flags_issues
Did not find any relation named "operations_feature_flags_issues".
gitlabhq_development=# \q
$
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 Yorick Peterse