summaryrefslogtreecommitdiff
path: root/spec/migrations
Commit message (Collapse)AuthorAgeFilesLines
* Fix user membership destroy relationFrancisco Javier López2018-01-021-0/+78
|
* Fix PostgreSQL implementation of migrationsh-fix-mysql-migration-10-3Stan Hu2017-12-271-1/+1
|
* Fix migration for removing orphaned issues.moved_to_id values in MySQLStan Hu2017-12-261-0/+25
| | | | | | | | | | | | | | | According to https://dev.mysql.com/doc/refman/5.7/en/update.html, "You cannot update a table and select from the same table in a subquery." Attempting to do so results in the error: ``` Mysql2::Error: Table 'issues' is specified twice, both as a target for 'UPDATE' and as a separate source for data ``` Instead, we can use a LEFT JOIN on the same table to make MySQL do the right thing. Closes #41498
* Create models directly in migration specsbvl-backport-migration-spec-changes-to-ceBob Van Landuyt2017-12-121-6/+5
| | | | | | Instead of using the factories. Since the factories might be using columns that aren't available in the schema at version the particular spec is running in.
* Add spec for removing issues.assignee_idSean McGivern2017-12-111-0/+37
| | | | | This migration also needs to be a post-deployment migration, as it removes a column.
* Merge branch 'mk-add-old-attachments-to-uploads-table' into 'master'Stan Hu2017-12-071-0/+27
|\ | | | | | | | | Add old files to uploads table See merge request gitlab-org/gitlab-ce!15270
| * Fix specs after rebaseMichael Kozono2017-12-061-74/+0
| | | | | | | | | | | | | | | | Later migrations added fields to the EE DB which were used by factories which were used in these specs. And in CE on MySQL, a single appearance row is enforced. The migration and migration specs should not depend on the codebase staying the same.
| * Make sure empty uploads doesn’t break anythingMichael Kozono2017-12-041-1/+9
| |
| * Don’t recreate deleted uploadsMichael Kozono2017-12-011-0/+9
| |
| * Use bulk insertsMichael Kozono2017-12-011-4/+4
| |
| * Move temp table creation into the prepare jobMichael Kozono2017-12-011-31/+3
| | | | | | | | | | * Hopefully fixes spec failures in which the table doesn’t exist * Decouples the background migration from the post-deploy migration, e.g. we could easily run it again even though the table is dropped when finished.
| * Fix Rubocop offensesMichael Kozono2017-12-011-1/+1
| |
| * Drop temporary tracking table when finishedMichael Kozono2017-12-011-42/+42
| |
| * Refactor specsMichael Kozono2017-12-011-64/+34
| |
| * Store paths relative to CarrierWave.rootMichael Kozono2017-12-011-4/+2
| | | | | | | | | | | | So the path on source installs cannot be too long for our column. And fix the column length test since Route.path is limited to 255 chars, it doesn’t matter how many nested groups there are.
| * Rename table to untracked_files_for_uploadsMichael Kozono2017-12-011-8/+8
| |
| * Refactor, no change in behaviorMichael Kozono2017-12-011-12/+14
| |
| * Make regexes more readableMichael Kozono2017-12-011-2/+2
| |
| * Fix Rubocop offensesMichael Kozono2017-12-011-2/+2
| |
| * Calculate checksumsMichael Kozono2017-12-011-25/+39
| | | | | | | | | | | | by copy-pasting in the whole `Upload` class. Also, fix `Namespace` `model_type` (it should not be `Group`).
| * Add untracked files to uploadsMichael Kozono2017-12-011-23/+38
| |
| * Add TrackUntrackedUploads post-deploy migrationMichael Kozono2017-12-011-0/+113
| | | | | | | | To create the table, and schedule the background migration that begins the work.
* | Merge remote-tracking branch 'origin/master' into list-multiple-clustersMatija Čupić2017-12-051-9/+30
|\ \
| * | Fix specs failures, and use factory with `:ci_job_artifact, :archive`Kamil Trzcinski2017-12-031-1/+1
| | |
| * | Fix legacy migration testZeger-Jan van de Weg2017-12-031-8/+29
| |/
* | Remove references of project.cluster from specsMatija Čupić2017-12-041-2/+2
|/
* Merge branch 'bvl-delete-empty-fork-networks' into 'master'Douwe Maan2017-11-171-0/+24
|\ | | | | | | | | Delete empty fork networks See merge request gitlab-org/gitlab-ce!15373
| * Delete orphaned fork networks in a migrationbvl-delete-empty-fork-networksBob Van Landuyt2017-11-171-0/+24
| |
* | Merge branch 'sh-background-migration-move-mr-diff-id' into 'master'Sean McGivern2017-11-172-61/+64
|\ \ | | | | | | | | | | | | Convert migration to populate latest merge request ID into a background migration See merge request gitlab-org/gitlab-ce!15440
| * | Convert migration to populate latest merge request ID into a background ↵Stan Hu2017-11-172-61/+64
| |/ | | | | | | | | | | | | migration This is to smear updates over a few hours to avoid causing excessive replication lag as seen in https://gitlab.com/gitlab-com/infrastructure/issues/3235.
* | De-duplicate background migration matchers defined in ↵sh-deduplicate-background-migration-specsStan Hu2017-11-162-32/+6
|/ | | | spec/support/migrations_helpers.rb
* Move migration file to post-migration. Use EachBatch. batch_size 1Shinya Maeda2017-11-041-13/+3
|
* Fix MigrateGcpClustersToNewClustersArchitectures. Improve specShinya Maeda2017-11-031-76/+164
|
* Fix spec failure. MySQL does not bite trueShinya Maeda2017-11-031-2/+2
|
* Merge branch 'master' into refactor-clustersShinya Maeda2017-11-032-0/+86
|\
| * Merge branch '37631-add-a-merge_request_diff_id-column-to-merge_requests' ↵Yorick Peterse2017-11-021-0/+61
| |\ | | | | | | | | | | | | | | | | | | into 'master' Resolve "Add a `merge_request_diff_id` column to `merge_requests`" See merge request gitlab-org/gitlab-ce!15035
| | * Add a column linking an MR to its diffSean McGivern2017-11-021-0/+61
| | | | | | | | | | | | | | | | | | We already had this the other way around (merge_request_diffs.merge_request_id), but this is needed to gather only the most recent diffs for a set of merge requests.
| * | Migrate user private tokens to personal access tokensDouwe Maan2017-11-021-0/+25
| |/
* | Improve migration file. Add migration spec. Reorder columns of the table.Shinya Maeda2017-11-011-0/+88
|/
* Add readme only option as project viewAnnabel Dunstone Gray2017-10-161-6/+1
|
* Merge branch '37552-replace-js-true-with-js' into 'master'Rémy Coutable2017-10-091-2/+2
|\ | | | | | | | | | | | | Replaces `tag: true` into `:tag` in the specs Closes #37552 See merge request gitlab-org/gitlab-ce!14653
| * Replaces `tag: true` into `:tag` in the specsJacopo2017-10-071-2/+2
| | | | | | | | | | | | Replaces all the explicit include metadata syntax in the specs (tag: true) into the implicit one (:tag). Added a cop to prevent future errors and handle autocorrection.
* | Add migration specsMichael Kozono2017-10-071-0/+56
|/
* Add a project forks spec helperBob Van Landuyt2017-10-071-2/+3
| | | | | The helper creates a fork of a project with all provided attributes, but skipping the creation of the repository on disk.
* Add more specs.36829-gpg-commit-not-verified-if-signed-with-a-subkeyRubén Dávila2017-10-051-0/+43
|
* Merge branch ↵Rémy Coutable2017-09-291-0/+59
|\ | | | | | | | | | | | | | | | | '36631-activerecord-statementinvalid-pg-querycanceled-error-canceling-statement-due-to-statement-timeout' into 'master' Insert at most 1,000 rows at once in MR diff background migration Closes #36631 et #37505 See merge request gitlab-org/gitlab-ce!13661
| * Reschedule merge request diff background migration36631-activerecord-statementinvalid-pg-querycanceled-error-canceling-statement-due-to-statement-timeoutSean McGivern2017-09-291-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | The first attempt didn't migrate all rows on GitLab.com, due to a couple of issues: 1. Some rows in merge_request_diffs had truly huge numbers of commits and diffs serialised - one in particular had 26,000 commits! 2. The jobs were sometimes on Sidekiq hosts with frequent OOM errors, leading to the job being lost. The previous commit adds more logging, and a more robust insertion method. This commit reschedules the jobs, with a generous pause between each.
* | Fix notes type created from importLin Jen-Shin (godfat)2017-09-292-0/+44
|/
* Make sure all stages are migrated after a cleanupbackstage/gb/steal-stages-statuses-migrationGrzegorz Bizon2017-09-181-0/+16
|
* Steal stages statuses migrationGrzegorz Bizon2017-09-181-0/+35
|