summaryrefslogtreecommitdiff
path: root/db
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '31207-clean-locked-merge-requests' into 'master'Stan Hu2017-08-083-2/+20
|\ | | | | | | | | | | | | Resolve "Store MergeWorker JID on merge request, and clean up stuck merges" Closes #31207 See merge request !13207
| * Re-add column locked_at on migration rollback31207-clean-locked-merge-requestsOswaldo Ferreira2017-08-071-1/+1
| |
| * Move locked_at removal to post-deployment migrationOswaldo Ferreira2017-08-072-2/+2
| |
| * Store MergeWorker JID on merge request, and clean up stuck mergesOswaldo Ferreira2017-08-073-1/+19
| |
* | Store & use ConvDev percentages returned by Version app35761-convdev-percJarka Kadlecova2017-08-073-0/+72
|/
* Merge branch 'reorganise-issues-indexes-for-sorting' into 'master'Sean McGivern2017-08-032-3/+47
|\ | | | | | | | | Re-organise "issues" indexes for faster ordering See merge request !13278
| * Re-organise "issues" indexes for faster orderingreorganise-issues-indexes-for-sortingYorick Peterse2017-08-032-3/+47
| | | | | | | | | | | | | | By adding various composite indexes we can reduce the time spent retrieving issue lists. Because of the way these indexes are built column wise we can also remove some standalone indexes, keeping the total number of indexes in check.
* | Migrate MR commits and diffs to new tablesmerge-request-commits-background-migrationSean McGivern2017-08-031-0/+33
|/ | | | | | | | | | | | Previously, we stored these as serialised fields - `st_{commits,diffs}` - on the `merge_request_diffs` table. These now have their own tables - `merge_request_diff_{commits,diffs}` - with a column for each attribute of the serialised data. Add a background migration to go through the existing MR diffs and migrate them to the new format. Ignore any contents that cannot be displayed. Assuming that we have 5 million rows to migrate, and each batch of 2,500 rows can be completed in 5 minutes, this will take about 7 days to migrate everything.
* Change project FK migration to skip existing FKsproject-foreign-keys-without-errorsYorick Peterse2017-08-021-8/+26
| | | | | | This changes the migration ProjectForeignKeysWithCascadingDeletes so that it does not add already existing foreign keys and indexes, making it easier to re-run the migration.
* Merge branch '33620-remove-events-from-notification_settings' into 'master'Douwe Maan2017-08-012-2/+10
|\ | | | | | | | | | | | | Resolve "Remove `events` from `notification_settings`" Closes #33620 See merge request !13152
| * Remove events column from notification settings33620-remove-events-from-notification_settingsSean McGivern2017-07-312-2/+10
| | | | | | | | | | This was migrated to separate columns in 9.4, and now just needs to be removed for real.
* | Rename many path_with_namespace -> full_pathGabriel Mazetto2017-08-011-0/+1
| |
* | fixfix/sm/schema-fix-group-pipeline-schedule-variablesShinya Maeda2017-07-291-10/+10
|/
* Merge branch 'merge-issuable-reopened-into-opened-state' into 'master'Sean McGivern2017-07-281-0/+32
|\ | | | | | | | | Merge issuable "reopened" state into "opened" See merge request !12972
| * Merge issuable "reopened" state into "opened"merge-issuable-reopened-into-opened-stateYorick Peterse2017-07-281-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having two states that essentially mean the same thing is very much like having a boolean "true" and boolean "mostly-true": it's rather silly. This commit merges the "reopened" state into the "opened" state while taking care of system notes still showing messages along the lines of "Alice reopened this issue". A big benefit from having only two states (opened and closed) is that indexing and querying becomes simpler and more performant. For example, to get all the opened queries we no longer have to query both states: SELECT * FROM issues WHERE project_id = 2 AND state IN ('opened', 'reopened'); Instead we can query a single state directly, which can be much faster: SELECT * FROM issues WHERE project_id = 2 AND state = 'opened'; Further, only having two states makes indexing easier as we will only ever filter (and thus scan an index) using a single value. Partial indexes could help but aren't supported on MySQL, complicating the development process and not being helpful for MySQL.
* | initShinya Maeda2017-07-283-0/+47
|/
* Merge branch 'backport-ee-2456' into 'master'Robert Speicher2017-07-272-0/+16
|\ | | | | | | | | Skip OAuth authorization for trusted applications See merge request !13061
| * Backport gitlab-ee!2456Oswaldo Ferreira2017-07-272-0/+16
| |
* | add unique index for gpg_signatures#commit_shaAlexis Reigel2017-07-272-2/+2
| |
* | add unique indexes to gpg_keysAlexis Reigel2017-07-272-2/+4
| |
* | no more more :length due to mysql set_index hackAlexis Reigel2017-07-271-13/+0
| |
* | length constrain on the index, not on the columnAlexis Reigel2017-07-273-11/+20
| | | | | | | | | | we actually don't need a limit on the column itself for MySQL to work. we need to set a length on the index.
* | use db's on_delete instead of has_many :dependentAlexis Reigel2017-07-273-6/+6
| |
* | use text instead of string for db columnsAlexis Reigel2017-07-272-4/+4
| |
* | use ShaAttribute for gpg table columnsAlexis Reigel2017-07-274-8/+13
| |
* | merge migrations to 1 single create per tableAlexis Reigel2017-07-275-55/+25
| | | | | | | | | | | | | | | | also: * reorder table columns * no need for `add_concurrent_index` * no need for explicit index removal on `#down`
* | store gpg user name and email on the signatureAlexis Reigel2017-07-272-0/+13
| |
* | gpg signature model for gpg verification cachingAlexis Reigel2017-07-272-0/+46
| |
* | add primary keyid attribute to gpg keysAlexis Reigel2017-07-272-0/+19
| |
* | add gpg key modelAlexis Reigel2017-07-272-0/+24
|/
* Fix saving diffs that are not valid UTF-835539-can-t-create-a-merge-request-containing-a-binary-file-with-non-utf-8-charactersSean McGivern2017-07-262-1/+11
| | | | | | | | | | Previously, we used Psych, which would: 1. Check if a string was encoded as binary, and not ASCII-compatible. 2. Add the !binary tag in that case. 3. Convert to base64. We need to do the same thing, using a new column in place of the tag.
* Merge branch '29289-project-destroy-clean-up-after-failure' into 'master'Sean McGivern2017-07-262-0/+8
|\ | | | | | | | | | | | | Handle errors while a project is being deleted asynchronously. Closes #29289 See merge request !11088
| * Add specs for ProjectDestroyWorkerTiago Botelho2017-07-201-24/+0
| |
| * Handle errors while a project is being deleted asynchronously.Timothy Andrew2017-07-202-0/+32
| | | | | | | | | | | | | | | | | | | | 1. Rescue all errors that `Projects::DestroyService` might throw, to prevent the worker from leaving things in an inconsistent state 2. Unmark the project as `pending_delete` 3. Add a `delete_error` text column to `projects`, and save the error message in there, to be shown to the project masters/owners.
* | Add lower path index to redirect_routesmk-add-lower-path-index-to-redirect-routesMichael Kozono2017-07-252-1/+35
| |
* | Merge branch 'backstage/gb/build-stage-id-ref-bg-migration-cleanup' into ↵Yorick Peterse2017-07-201-0/+18
|\ \ | |/ |/| | | | | | | | | | | | | 'master' Implement build stage_id reference migration clean up Closes #34893 See merge request !12785
| * Merge branch 'master' into backstage/gb/build-stage-id-ref-bg-migration-cleanupbackstage/gb/build-stage-id-ref-bg-migration-cleanupGrzegorz Bizon2017-07-195-1/+167
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (59 commits) Resolve "Clarify k8s service keys" Add Portuguese Brazil translations of Commits Page & Pipeline Charts Add Japanese Translation to i18n Update Prometheus gem to version that explicitly calls `munmap` Simplify width for dropdown-menu on mobile Update CHANGELOG.md for 9.3.7 Remove developer documentation about not describing symbols Incorporate Gitaly's Commits#between RPC Adapt to new Gitaly commit message format Remove transitions on nav link hover Provide option to trigger build only for official CE and EE repos in .com Fix queries duration sorting in Performance Bar Rename Project nav items Add structured logging for Rails processes Disable Rails logging in CI test environments Fix download artifacts button alignment Update avatar border to be opaque for better stacking Fixed typos Fix typos Fix external issue trackers redirect ... Conflicts: db/schema.rb
| * | Fix database schema version numberGrzegorz Bizon2017-07-181-1/+1
| | |
| * | Remove migration dependency from stage_id migrationGrzegorz Bizon2017-07-181-4/+1
| | |
| * | Rename stage_id reference clean up migrationGrzegorz Bizon2017-07-181-1/+1
| | |
| * | Implement build stage_id reference migration clean upGrzegorz Bizon2017-07-182-1/+22
| | |
* | | Merge branch '33359-pers-snippet-files-location' into 'security-9-3'Sean McGivern2017-07-191-0/+91
| | | | | | | | | | | | | | | Use uploads/system directory for personal snippets See merge request !2123
* | | Merge branch 'bvl-remove-appearance-symlink' into 'security-9-3'Douwe Maan2017-07-192-1/+53
| |/ |/| | | | | | | | | Remove the `appearance` symlink that was previously missed See merge request !2124
* | Add a background migration to rename `uploads` in the uploads tableBob Van Landuyt2017-07-182-1/+21
| |
* | Move the `uploads/system` folder to `uploads/-/system`Bob Van Landuyt2017-07-183-1/+101
| | | | | | | | Without downtime, so we need the symlinks
* | Use batching to clear orphans in head_pipeline migrationbackstage/gb/add-index-and-foreign-key-to-merge-requestsGrzegorz Bizon2017-07-181-3/+12
| |
* | Nullify orphaned head_pipeline_ids in merge_requestsGrzegorz Bizon2017-07-181-0/+8
| |
* | Add a foreign key to `merge_requests.head_pipeline_id`Grzegorz Bizon2017-07-182-1/+30
|/
* Merge branch 'fixes-for-internal-auth-disabled' into 'master'Sean McGivern2017-07-143-1/+31
|\ | | | | | | | | Fixes needed when GitLab sign-in is not enabled See merge request !12491
| * Fixes needed when GitLab sign-in is not enabledRobin Bobbitt2017-07-133-1/+31
| | | | | | | | | | | | | | | | | | When sign-in is disabled: - skip password expiration checks - prevent password reset requests - don’t show Password tab in User Settings - don’t allow login with username/password for Git over HTTP requests - render 404 on requests to Profiles::PasswordsController