Set default cadences automatic to false
What does this MR do?
We are creating a default iteration cadence behind the scenes, which is currently wrongly set to automatic. This MR fixes the automatic to false and also migrations any of the existing automatic=true records to automatic=false
We still want to keep the automatic=true
as default column value, which will be useful when we reveal the cadences to the user, and the user would be able to turn it off.
Database
Affected records: ~700
explain select id from iterations_cadences where automatic=true
Seq Scan on public.iterations_cadences (cost=0.00..135.43 rows=669 width=8) (actual time=0.010..0.777 rows=696 loops=1)
Filter: iterations_cadences.automatic
Rows Removed by Filter: 1274
Buffers: shared hit=29
UP
== 20210317104032 SetIterationCadenceAutomaticToFalse: migrating ==============
== 20210317104032 SetIterationCadenceAutomaticToFalse: migrated (0.0719s) =====
DOWN
== 20210317104032 SetIterationCadenceAutomaticToFalse: reverting ==============
== 20210317104032 SetIterationCadenceAutomaticToFalse: reverted (0.0000s) =====
Update statement
Running update statement on database-lab
exec UPDATE "iterations_cadences" SET "automatic" = FALSE WHERE "iterations_cadences"."automatic" = TRUE
Session: 2779
The query has been executed. Duration: 0.000 s (edited)
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
-
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 Alexandru Croitor