Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-09-18Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-09-13Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-08-24Adds cop to enforce string limits on migrationsMayra Cabrera
This cop will analyze migrations that add columns with string, and report an offense if the string has no limit enforced Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/64505
2019-03-28Properly handle `ee` migration specsHeinrich Lee Yu
2018-11-27Make add_reference cop accept a hash for :indexToon Claes
It might happen you want to make the reference column have a unique value, or you want to create partial indexes. So instead of only accepting a `true` value, also accept a hash of options.
2018-08-09Add rubocop check for add_reference to require index.Andreas Brandl
2018-06-22Add more large tables to copSean McGivern
These are all over 20 GB on GitLab.com. merge_request_diff_commits is several hundred gigabytes in size.
2018-06-19Disallow methods that copy data on large tablesSean McGivern
{change_column_type,rename_column}_concurrently both copy data from one column to another during a migration, which should not be done on GitLab.com. Instead, we should use background migrations.
2018-04-18Resolve "Make a Rubocop that forbids returning from a block"🙈 jacopo beschi 🙉
2018-01-31Enable RuboCop Style/RegexpLiteralTakuya Noguchi
2017-12-22Use gitlab-stylesRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-12-11Add cop for use of remove_columnSean McGivern
remove_column should only be used in the up (or change) step of a migration if it's a post-deployment migration. Otherwise there will be downtime due to the ActiveRecord column cache, which we can avoid by using the IgnorableColumn concern in combination with a post-deployment migration.
2017-11-17Prevent update_column_in_batches on large tablesSean McGivern
add_column_with_default is implemented in terms of update_column_in_batches, but update_column_in_batches can be used independently. Neither of these should be used on the specified large tables, because they will cause issues on large instances like GitLab.com. This also ignores the cop for all existing migrations, renaming AddColumnWithDefaultToLargeTable where appropriate.
2017-10-10Also warn on timestamp in datetime migration copSean McGivern
The types `timestamp` and `datetime` are aliases: https://github.com/rails/rails/blob/v4.2.10/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb#L362-L364
2017-08-14Add SaferBooleanColumn copMichael Kozono
2017-08-01iniShinya Maeda
2017-07-26Update the large table list in AddColumnWithDefaultToLargeTable copRobert Speicher
- ci_builds -- 33 million rows, 55 GB - merge_request_diff_files -- 5 million rows, 9 GB (and growing rapidly) - merge_request_diffs -- 5 million rows, 190 GB
2017-07-14Added cop to blacklist the use of hash indexesYorick Peterse
These indexes are not recorded in the WAL (at least until PostgreSQL 10) and this isn't worth the minor performance improvement over btree indexes.
2017-06-13Add database helpers 'add_timestamps_with_timezone' and ↵blackst0ne
'timestamps_with_timezone'
2017-05-29New Migration/UpdateColumnInBatches copRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-28Add AddColumnWithDefaultToLargeTable copRobert Speicher
2017-04-28Rename AddColumnWithDefault to ReversibleAddColumnWithDefaultRobert Speicher
We're going to add another cop that deals with another aspect of `add_column_with_default`, so we need to separate them.
2017-04-28Refactor the AddColumnWithDefault cop to use node matchersRobert Speicher
2017-04-06Add remove_concurrent_index to database helperblackst0ne
2017-03-07Add cop to ensure reversibility of add_concurrent_indexDouwe Maan
2017-02-23Enable Style/MutableConstantDouwe Maan
2017-02-10Enforce use of add_concurrent_foreign_keyYorick Peterse
This adds a Rubocop rule to enforce the use of add_concurrent_foreign_key instead of the regular add_foreign_key method. This cop has been disabled for existing migrations so we don't need to change those.
2017-02-09Explicitly require rubocop migration_helpersDouwe Maan
2017-02-09Add cop that checks if add_column_with_default is used with up/down methodsDouwe Maan
2016-06-29Added RuboCop cops for checking DB migrationsYorick Peterse
There are currently two cops for this: * Migration/AddIndex: checks if indexes are added concurrently * Migration/ColumnWithDefault: checks if columns with default values are added in a concurrent manner Both cops are fairly simple and make no attempt at correcting the code as this is quite hard to do (e.g. modifications may need to be applied in various places in the same file). They however should provide enough to catch people ignoring the comments in generated migrations telling them to use add_concurrent_index or add_column_with_default.