Skip to content

Adds model for model_experiments_access_level

What does this MR do and why?

Adds model for model_experiments_access_level

Adds database migration and model definitions necessary to add visibility toggle for Model experiments

This is the first commit on the task to add the visilibility to Model experiments. To check the change in this MR in the full, context, refer to !121396 (closed)

How to set up and validate locally

  1. Run migrations
  2. on rails console, run the command below. It should return 20
    Project.first.model_experiments_access_level

Database

Up
main: == [advisory_lock_connection] object_id: 275680, pg_backend_pid: 14849
main: == 20230522132239 AddModelExperimentsAccessLevelToProjectFeature: migrating ===
main: -- add_column(:project_features, :model_experiments_access_level, :integer, {:null=>false, :default=>20})
main:    -> 0.0061s
main: == 20230522132239 AddModelExperimentsAccessLevelToProjectFeature: migrated (0.0104s)

main: == [advisory_lock_connection] object_id: 275680, pg_backend_pid: 14849
ci: == [advisory_lock_connection] object_id: 275960, pg_backend_pid: 14852
ci: == 20230522132239 AddModelExperimentsAccessLevelToProjectFeature: migrating ===
ci: -- add_column(:project_features, :model_experiments_access_level, :integer, {:null=>false, :default=>20})
ci:    -> 0.0076s
ci: == 20230522132239 AddModelExperimentsAccessLevelToProjectFeature: migrated (0.0211s)

ci: == [advisory_lock_connection] object_id: 275960, pg_backend_pid: 14852
Down
main: == [advisory_lock_connection] object_id: 275460, pg_backend_pid: 18303
main: == 20230522132239 AddModelExperimentsAccessLevelToProjectFeature: reverting ===
main: -- remove_column(:project_features, :model_experiments_access_level, :integer, {:null=>false, :default=>20})
main:    -> 0.0025s
main: == 20230522132239 AddModelExperimentsAccessLevelToProjectFeature: reverted (0.0090s)

main: == [advisory_lock_connection] object_id: 275460, pg_backend_pid: 18303

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #412384 (closed)

Edited by Eduardo Bonet

Merge request reports

Loading