Create Operations User Lists Table
What does this MR do?
Add a migration to create the operations_user_lists
table. This is the table for #205409 (closed), which is the CRUD API for user lists for use with feature flags.
Issue: #205409 (closed)
Migration Output
$ bin/rails db:migrate
== 20200401211005 CreateOperationsUserLists: migrating ========================
-- create_table(:operations_user_lists)
-> 0.0110s
== 20200401211005 CreateOperationsUserLists: migrated (0.0110s) ===============
$ bin/rails dbconsole
psql (10.12)
Type "help" for help.
gitlabhq_development=# \d operations_user_lists
Table "public.operations_user_lists"
Column | Type | Collation | Nullable | Default
------------+--------------------------+-----------+----------+---------------------------------------------------
id | bigint | | not null | nextval('operations_user_lists_id_seq'::regclass)
project_id | bigint | | not null |
created_at | timestamp with time zone | | not null |
updated_at | timestamp with time zone | | not null |
iid | integer | | not null |
name | character varying(255) | | not null |
user_ids | text | | not null | ''::text
Indexes:
"operations_user_lists_pkey" PRIMARY KEY, btree (id)
"index_operations_user_lists_on_project_id_and_iid" UNIQUE, btree (project_id, iid)
"index_operations_user_lists_on_project_id_and_name" UNIQUE, btree (project_id, name)
Foreign-key constraints:
"fk_rails_0c716e079b" FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE
gitlabhq_development=# \q
$ bin/rails db:rollback
== 20200401211005 CreateOperationsUserLists: reverting ========================
-- drop_table(:operations_user_lists)
-> 0.0018s
== 20200401211005 CreateOperationsUserLists: reverted (0.0028s) ===============
$
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 Jason Goodman