summaryrefslogtreecommitdiff
path: root/lib/gitlab/database
Commit message (Collapse)AuthorAgeFilesLines
...
* Clear the cache for projects one-by-oneBob Van Landuyt2017-06-261-14/+16
|
* Add punctuation to log messagesBob Van Landuyt2017-06-263-4/+6
|
* Keep failed renames in redisBob Van Landuyt2017-06-261-1/+13
|
* 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-5/+7
|
* More logging so we know we have the rename in redisBob Van Landuyt2017-06-261-1/+5
|
* Revert renames from a migrationBob Van Landuyt2017-06-261-0/+5
|
* Revert namespace renamesBob Van Landuyt2017-06-262-1/+23
|
* Add methods to revert project renamesBob Van Landuyt2017-06-262-6/+49
|
* Track all renames in redisBob Van Landuyt2017-06-263-0/+9
|
* Merge branch 'master' into fix/gb/improve-updating-column-in-batches-helperGrzegorz Bizon2017-06-224-35/+35
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-35/+35
| |
* | Raise if updating columns in batches within a transactionGrzegorz Bizon2017-06-211-0/+6
|/
* Put an upper limit on update batchesupdate-column-in-batches-batch-sizeYorick Peterse2017-06-191-0/+6
| | | | | | | When using update_column_in_batches the upper limit on the batch size is now 1000. This ensures that for very large tables we don't lock tens of thousands of rows during the update. This in turn should reduce the likelyhood of running into deadlocks.
* Add database helpers 'add_timestamps_with_timezone' and ↵32054-rails-should-use-timestamptz-database-type-for-postgresqlblackst0ne2017-06-131-0/+33
| | | | 'timestamps_with_timezone'
* Only use DROP INDEX CONCURRENTLY on postgreql 9.2+Nick Thomas2017-05-251-1/+34
|
* Fixes for the rename reserved paths helpersBob Van Landuyt2017-05-183-1/+16
|
* Disallow NULL on renamed column after default has been setDouwe Maan2017-05-151-1/+2
|
* Merge branch 'rename-column-concurrently-defaults' into 'master' Rémy Coutable2017-05-151-1/+5
|\ | | | | | | | | Fix adding defaults for concurrent column renames See merge request !11335
| * Fix adding defaults for concurrent column renamesrename-column-concurrently-defaultsYorick Peterse2017-05-121-1/+5
| | | | | | | | | | | | 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.
* | Update rename_base.rbJames Lopez2017-05-121-1/+1
| |
* | Only rename namespaces and projects with an invalid pathBob Van Landuyt2017-05-121-1/+1
|/ | | | For exact matches, not namespaces that end with an invalid path
* Add a new column before creating rename triggersBob Van Landuyt2017-05-111-10/+10
| | | | | | | | | | | | | | | MySQL doesn't allow us to create a trigger for a column that doesn't exist yet. Failing with this error: ``` Mysql2::Error: Unknown column 'build_events' in 'NEW': CREATE TRIGGER trigger_6a80c097c862_insert BEFORE INSERT ON `services` FOR EACH ROW SET NEW.`build_events` = NEW.`job_events` ``` Creating the new column before creating the trigger avoids this.
* Update commentsBob Van Landuyt2017-05-021-0/+8
|
* Rename child namespaces in migrationhelpersBob Van Landuyt2017-05-012-2/+7
|
* Clear html cache for a projects milestonesBob Van Landuyt2017-05-011-0/+4
|
* Remove dependecy on `User`Bob Van Landuyt2017-05-011-20/+0
|
* Move ReservedPathsMigration into V1 namespaceBob Van Landuyt2017-05-0110-352/+362
|
* Minor style adjustmentsBob Van Landuyt2017-05-011-3/+4
|
* Clear cached markdown after renaming projectsBob Van Landuyt2017-05-013-3/+24
|
* Rename Projects & Namespaces based on entire pathsBob Van Landuyt2017-05-013-8/+13
|
* Use objects for renaming namespaces and projectsBob Van Landuyt2017-05-015-100/+119
|
* Rename projects in a migrationhelperBob Van Landuyt2017-05-013-23/+74
|
* Make renaming records in the database reusableBob Van Landuyt2017-05-013-48/+71
| | | | So we can use it for projects
* Rename namespace-paths in a migration helperBob Van Landuyt2017-05-013-0/+232
|
* Move `replace_sql` into `Database::MigrationHelpers`Bob Van Landuyt2017-05-011-0/+23
|
* Merge branch 'zero-downtime-migrations' into 'master' Douwe Maan2017-04-122-1/+293
|\ | | | | | | | | Prepare for zero downtime migrations See merge request !9976
| * Prepare for zero downtime migrationszero-downtime-migrationsYorick Peterse2017-04-122-1/+293
| | | | | | | | | | | | | | Starting with GitLab 9.1.0 we will no longer allow downtime migrations unless absolutely necessary. This commit updates the various developer guides and adds code that is necessary to make zero downtime migrations less painful.
* | removes redundant code from database.rb29056-backport-ee-cleanup-database-fileTiago Botelho2017-04-111-0/+8
|/
* Add remove_concurrent_index to database helperblackst0ne2017-04-061-0/+24
|
* Revert "Prefer leading style for Style/DotPosition"Douwe Maan2017-02-232-20/+20
| | | | This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
* Revert "Enable Style/BarePercentLiterals"Douwe Maan2017-02-231-2/+2
| | | | This reverts commit 96bef54154e669f9a3e92c3a4bc76c0be3a52e48.
* Enable Style/EmptyLineBetweenDefsDouwe Maan2017-02-231-0/+1
|
* Prefer leading style for Style/DotPositionDouwe Maan2017-02-232-20/+20
|
* Enable Style/BarePercentLiteralsDouwe Maan2017-02-231-2/+2
|
* Hash concurrent foreign key names similar to Railshash-concurrent-foreign-key-namesYorick Peterse2017-02-211-1/+10
| | | | | | | | | | | | | | | | | This was initially not implemented simply because I forgot about the size limit of constraint names in PostgreSQL (63 bytes). Using the old technique we can't add foreign keys for certain tables. For example, adding a foreign key on protected_branch_merge_access_levels.protected_branch_id would lead to the following key name: fk_protected_branch_merge_access_levels_protected_branches_protected_branch_id This key is 78 bytes long, thus violating the PostgreSQL size requirements. The hashing strategy is copied from Rails' foreign_key_name() method, which unfortunately is private and subject to change without notice.
* Add method for creating foreign keys concurrentlyYorick Peterse2017-02-101-1/+49
| | | | | | | | | | | | | | | | | This method allows one to create foreign keys without blocking access to the source table, but only on PostgreSQL. When creating a regular foreign key the "ALTER TABLE" statement used for this won't return until all data has been validated. This statement in turn will acquire a lock on the source table. As a result this lock can be held for quite a long amount of time, depending on the number of rows and system load. By breaking up the foreign key creation process in two steps (creation, and validation) we can reduce the amount of locking to a minimum. Locking is still necessary for the "ALTER TABLE" statement that adds the constraint, but this is a fast process and so will only block access for a few milliseconds.
* refactor fetcher and fixed specsJames Lopez2017-01-171-0/+5
|
* fixing spec failuresJames Lopez2016-11-171-1/+1
|
* Added code events spec and logic. Also fixed SQL issues and refactored the ↵James Lopez2016-11-171-2/+2
| | | | code a bit.