summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/database/migration_helpers_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42GitLab Bot2021-10-201-0/+9
|
* Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42GitLab Bot2021-09-201-17/+88
|
* Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42GitLab Bot2021-08-191-31/+77
|
* Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42GitLab Bot2021-07-201-14/+97
|
* Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42GitLab Bot2021-06-161-0/+35
|
* Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42GitLab Bot2021-05-191-51/+181
|
* Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43GitLab Bot2021-04-201-68/+173
|
* Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40GitLab Bot2021-03-161-1/+27
|
* Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42GitLab Bot2021-02-181-253/+0
|
* Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42Robert Speicher2021-01-201-0/+190
|
* Add latest changes from gitlab-org/gitlab@13-7-stable-eeGitLab Bot2021-01-081-4/+7
|
* Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42GitLab Bot2020-11-191-1/+1
|
* Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42GitLab Bot2020-10-211-8/+335
|
* Add latest changes from gitlab-org/gitlab@13-4-stable-eeGitLab Bot2020-09-191-2/+9
|
* Add latest changes from gitlab-org/gitlab@13-3-stable-eeGitLab Bot2020-09-141-0/+52
|
* Add latest changes from gitlab-org/gitlab@13-3-stable-eeGitLab Bot2020-08-201-1/+1
|
* Add latest changes from gitlab-org/gitlab@13-2-stable-eeGitLab Bot2020-07-201-239/+49
|
* Add latest changes from gitlab-org/gitlab@13-1-stable-eeGitLab Bot2020-06-181-57/+94
|
* Add latest changes from gitlab-org/gitlab@13-0-stable-eeGitLab Bot2020-05-201-145/+246
|
* Add latest changes from gitlab-org/gitlab@12-10-stable-eeGitLab Bot2020-04-201-0/+6
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-04-131-0/+329
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-261-0/+24
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-241-3/+41
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-021-33/+59
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-211-0/+9
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-191-0/+56
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-051-3/+3
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-291-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-281-0/+362
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-231-0/+13
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-151-1/+5
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-081-0/+42
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-061-0/+19
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-12-171-0/+13
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-12-021-37/+149
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-11-051-1/+0
|
* Use stub_rails_env for Rails.env stubbing66966-convert-rails-env-stub-usages-to-use-railshelpers-stub_rails_env-insteadAsh McKenzie2019-09-051-17/+3
| | | | | RailsHelpers.stub_rails_env takes care of stubbing Rails.env
* Add helper to exactly undo cleanup_concurrent_column_renameReuben Pereira2019-08-251-0/+106
| | | | - Also add helper to undo rename_column_concurrently.
* Drop existing trigger before creating new oneReuben Pereira2019-08-241-0/+8
| | | | | | | | | | | | | | - When renaming a column concurrently, drop any existing trigger before attempting to create a new one. When running migration specs multiple times (as it happens during local development), the down method of previous migrations are called. If any of the called methods contains a call to rename_column_concurrently, a trigger will be created and not removed. So, the next time a migration spec is run, if the same down method is executed again, it will cause an error when attempting to create the trigger (since it already exists). Dropping the trigger if it already exists will prevent this problem.
* Add frozen_string_literal to spec/lib (part 1)Thong Kuah2019-07-261-0/+2
| | | | | Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
* Remove dead MySQL codeNick Thomas2019-07-231-398/+144
| | | | None of this code can be reached any more, so it can all be removed
* Improves add_timestamps_with_timezone helperAlex Kalderimis2019-07-181-3/+74
| | | | | | | | | This improves the `add_timestamps_with_timezone` helper by allowing the column names to be configured. This has the advantage that unnecessary columns can be avoided, saving space. A helper for removing the columns is also provided, to be used in the `down` method of migrations.
* Support jsonb Default Value in add_column_with_default Migration HelperJason Goodman2019-06-281-0/+18
|
* Remove import columns from projects tablesh-remove-import-columns-from-projectsStan Hu2019-06-191-2/+2
| | | | | | | | | | | | | | | | | | In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21497, we migrated all project import data into a separate table, `project_import_data`. In addition, we also added: ``` ignore_column :import_status, :import_jid, :import_error ``` In https://gitlab.com/gitlab-com/gl-infra/production/issues/908, we observed some of these `import_error` columns consumed megabytes of error backtraces and caused slow loading of projects whenever a `SELECT * from projects` query loaded the row into memory. Since we have long migrated away from these columns, we can now drop these columns entirely.
* Allow custom names for concurrent foreign keysYorick Peterse2019-06-171-0/+27
| | | | | This is necessary for backporting the EE schema to ensure backported foreign keys use the same key names.
* Remove rails 4 support in CI, Gemfiles, bin/ and config/Jasper Maes2018-12-141-6/+1
|
* Address specs failing in rails 4Jan Provaznik2018-11-141-1/+6
| | | | | | | | | | | We want to run CI with rails 4 for a short-term (until we are sure that we will ship with rails 5). The problem is that rails 4 can not handle rails 5 schema.rb properly - specifically `t.index` directive can not handle multiple indexes on the same column. Because combination of rails 4 + rails 5 schema will be used only in CI for a short-term, we can just ignore these incompatibility failures. This patch adds `rails5` helper for specs.
* disable_statement_timeout doesn't require any argument anymoreGabriel Mazetto2018-08-111-43/+32
| | | | | | | | | it will decide the method for disable statement_timeout upon per transaction or per session, based on how it's called. When calling with a block, block will be executed and it will use session based statement_timeout, otherwise will default to existing behavior.
* Fix migration_helpers_specGabriel Mazetto2018-08-101-1/+2
|
* MigrationHelper `disable_statement_timeout` accepts `transaction: false`Gabriel Mazetto2018-08-101-13/+93
| | | | | | | | | By default statement_timeout will only be enabled during transaction lifetime, therefore not leaking outside of it. With `transaction: false` it will set for entire session, but requires a block to passed. It yields control and cleans up session after block finishes, also preventing leaking outside of it.