summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/database
Commit message (Collapse)AuthorAgeFilesLines
* Consistently schedule Sidekiq jobsdm-application-workerDouwe Maan2017-12-051-4/+4
|
* Don't move project repository/attachments when using hashed storageBob Van Landuyt2017-11-201-0/+16
| | | | | | | | When a project is using hashed storage, the repositories and attachments wouldn't be saved on disk using the `full_path`. So the migration would not do anything. However: best to just skip moving when hashed storage is enabled.
* Fix TRIGGER checks for MySQLfix-mysql-grant-checkYorick Peterse2017-11-061-17/+5
| | | | | | | | | This ensures we can check if the user has TRIGGER permissions without querying restricted tables. Thanks to Steve Norman (https://gitlab.com/stevenorman) for helping out with this merge request. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/38372
* Replaces `tag: true` into `:tag` in the specsJacopo2017-10-073-4/+4
| | | | | | 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.
* Spread out the work a littleMichael Kozono2017-09-141-6/+66
|
* Extract helper for queuing background jobsMichael Kozono2017-09-141-0/+62
|
* Improve migrations using triggerscheck-trigger-permissions-mysqlYorick Peterse2017-08-292-4/+58
| | | | | | | | | | | | | | | | This adds a bunch of checks to migrations that may create or drop triggers. Dropping triggers/functions is done using "IF EXISTS" so we don't throw an error if the object in question has already been dropped. We now also raise a custom error (message) when the user does not have TRIGGER privileges. This should prevent the schema from entering an inconsistent state while also providing the user with enough information on how to solve the problem. The recommendation of using SUPERUSER permissions is a bit extreme but we require this anyway (Omnibus also configures users with this permission). Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36633
* Fix indentation in migration helpersGrzegorz Bizon2017-08-221-9/+9
|
* Add Sidekiq migration helpers for migrating queuesGrzegorz Bizon2017-08-221-3/+48
|
* Change all `:empty_project` to `:project`rs-empty_project-defaultRobert Speicher2017-08-024-10/+10
|
* Ensure all project factories use `:repository` trait or `:empty_project`rs-empty_project-cleanupRobert Speicher2017-08-013-10/+10
|
* Use described_class when possibleRémy Coutable2017-07-271-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable2017-07-271-1/+1
| | | | | | services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
* Add a foreign key to `merge_requests.head_pipeline_id`Grzegorz Bizon2017-07-181-1/+11
|
* Support multiple Redis instances based on queue typePaul Charlton2017-07-111-2/+2
|
* Added code for defining SHA attributesYorick Peterse2017-06-291-0/+33
| | | | | | These attributes are stored in binary in the database, but exposed as strings. This allows one to query/create data using plain SHA1 hashes as Strings, while storing them more efficiently as binary.
* Adjust for new static-analysis failuresbvl-rename-all-reserved-paths-mysqlBob Van Landuyt2017-06-271-6/+6
|
* Keep failed renames in redisBob Van Landuyt2017-06-261-0/+19
|
* Use the migration name as a key in redisBob Van Landuyt2017-06-261-1/+1
|
* Don't break rolling back when a namespace or project was renamedBob Van Landuyt2017-06-262-0/+14
|
* Revert renames from a migrationBob Van Landuyt2017-06-261-0/+22
|
* Revert namespace renamesBob Van Landuyt2017-06-263-16/+65
|
* Add methods to revert project renamesBob Van Landuyt2017-06-262-16/+97
|
* Track all renames in redisBob Van Landuyt2017-06-263-0/+31
|
* Fix Rubocop offense in migration helpers specsfix/gb/improve-updating-column-in-batches-helperGrzegorz Bizon2017-06-221-1/+1
|
* Merge branch 'master' into fix/gb/improve-updating-column-in-batches-helperGrzegorz Bizon2017-06-224-151/+151
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (56 commits) File view buttons Don't reset the session when the example failed, because we need capybara-screenshot to have access to it Resolve "MR comment + system note highlight don't have the same width" Add feature spec for dashboard state filter tabs Wording of Mysql support. a new feature checklist and more elaborate documentation requirements Filter archived project in API v3 only if param present Revert to using links instead of buttons in Issuable Index tabs. Do not run the codeclimate job on docs-only changes Only show gray footer space if environment actions exist Migrate Gitlab::Git::Blob.find to Gitaly Backport filtered search lazy token consistent state fix Add a comment explaining how the branch clean up happens Fix Github::Representation::PullRequest#source_branch_exists? Add CHANGELOG Fix GitHub importer performance on branch existence check Rebuild the dynamic path before validating it Rename stage ref migration specs to match a class name Enable Style/DotPosition Rubocop :cop: Revert "Merge branch 'winh-merge-request-related-issues' into 'master'" ... Conflicts: db/post_migrate/20170526185921_migrate_build_stage_reference.rb
| * Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-214-151/+151
| |
* | Disable transaction in specs for some migrationsGrzegorz Bizon2017-06-221-1/+1
| |
* | Fix specs for database migration helpers with transactionsGrzegorz Bizon2017-06-221-2/+8
| |
* | Fix migration specs that can not run within transactionGrzegorz Bizon2017-06-213-3/+3
| |
* | Raise if updating columns in batches within a transactionGrzegorz Bizon2017-06-211-21/+35
|/
* Add database helpers 'add_timestamps_with_timezone' and ↵32054-rails-should-use-timestamptz-database-type-for-postgresqlblackst0ne2017-06-131-1/+36
| | | | 'timestamps_with_timezone'
* Merge branch '32851-fix-postgres-9-1' into 'master'Douwe Maan2017-05-251-2/+9
|\ | | | | | | | | Resolve "GitLab 9.0 to 9.2 is incompatible with PostgreSQL 9.1" See merge request !11709
| * Only use DROP INDEX CONCURRENTLY on postgreql 9.2+Nick Thomas2017-05-251-2/+9
| |
* | Revert "Remove changes that are not absolutely necessary"Douwe Maan2017-05-241-26/+26
|/ | | This reverts commit b0498c176fa134761d899c9b369be12f1ca789c5
* Make sure that Arel.sql would work for update_column_in_batchestest-update_column_in_batches-with-sql-mysqlLin Jen-Shin2017-05-231-0/+8
|
* Fixes for the rename reserved paths helpersBob Van Landuyt2017-05-182-1/+35
|
* Disallow NULL on renamed column after default has been setDouwe Maan2017-05-151-2/+4
|
* Merge branch 'rename-column-concurrently-defaults' into 'master' Rémy Coutable2017-05-151-2/+6
|\ | | | | | | | | Fix adding defaults for concurrent column renames See merge request !11335
| * Fix adding defaults for concurrent column renamesrename-column-concurrently-defaultsYorick Peterse2017-05-121-2/+6
| | | | | | | | | | | | By adding the default value _after_ adding the column we avoid updating all rows in a table, saving a lot of time and unnecessary work in the process.
* | Only rename namespaces and projects with an invalid pathBob Van Landuyt2017-05-121-0/+31
|/ | | | For exact matches, not namespaces that end with an invalid path
* Rename child namespaces in migrationhelpersBob Van Landuyt2017-05-012-14/+22
|
* Clear html cache for a projects milestonesBob Van Landuyt2017-05-011-0/+10
|
* Move ReservedPathsMigration into V1 namespaceBob Van Landuyt2017-05-014-14/+14
|
* Clear cached markdown after renaming projectsBob Van Landuyt2017-05-013-3/+64
|
* Rename Projects & Namespaces based on entire pathsBob Van Landuyt2017-05-012-0/+23
|
* Use objects for renaming namespaces and projectsBob Van Landuyt2017-05-014-148/+184
|
* Add a WIP spec for clearing the cacheBob Van Landuyt2017-05-012-0/+4
|
* Rename projects in a migrationhelperBob Van Landuyt2017-05-013-39/+127
|
* Make renaming records in the database reusableBob Van Landuyt2017-05-012-46/+103
| | | | So we can use it for projects