summaryrefslogtreecommitdiff
path: root/db
Commit message (Collapse)AuthorAgeFilesLines
* Remove root user 100 project limit to rely on default 100,00043271-remove-seeded-root-user-project-limitEric Eastwood2018-02-141-1/+0
| | | | See https://gitlab.com/gitlab-org/gitlab-ce/issues/43271
* Merge branch 'expired-ci-artifacts' into 'master'Grzegorz Bizon2018-02-142-0/+25
|\ | | | | | | | | Change SQL for expired artifacts to use new ci_job_artifacts.expire_at See merge request gitlab-org/gitlab-ce!16578
| * Add indexes and change SQL for expired artifacts to deal with artifacts ↵Greg Stark2018-02-082-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | migration efficiently Artifacts are in the middle of being migrated from ci_builds to ci_job_artifacts. The expiration date is currently visible in both of these tables and the test for whether an expired artifact is present for a job is complex as it requires checking both the of the tables. Add two new indexes, one on ci_builds.artifacts_expire_at and one on ci_job_artifacts.expire_at to enable finding expired artifacts efficiently. And until the migration is finished, replace the SQL for finding expired and non-expired artifacts with a hand-crafted UNION ALL based query instead of using OR. This overcomes a database optimizer limitation that prevents it from using these indexes. When the migration is finished the next version should remove this query and replace it with a much simpler query on just ci_job_artifacts. See https://gitlab.com/gitlab-org/gitlab-ce/issues/42561 for followup.
* | Merge branch 'mk-fix-no-untracked-upload-files-error' into 'master'Douwe Maan2018-02-132-1/+48
|\ \ | | | | | | | | | | | | | | | | | | Resolve "PrepareUntrackedUploads PostgreSQL syntax error" Closes #42881 See merge request gitlab-org/gitlab-ce!17019
| * | Schedule PopulateUntrackedUploads if neededMichael Kozono2018-02-122-1/+48
| | | | | | | | | | | | | | | | | | To finish migrating untracked files to uploads for installations that were affected by https://gitlab.com/gitlab-org/gitlab-ce/issues/42881 Or just to delete the temp table if it is empty and left behind.
* | | Fix a transient failure in ↵sh-no-cache-populate-migrationRémy Coutable2018-02-121-1/+1
|/ / | | | | | | | | | | db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb where symlink already exists Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Early migrations populating fork-networks: no-opBob Van Landuyt2018-02-082-30/+2
|/ | | | | | | | | | | | | | | | | | | Since populating the fork networks was scheduled multiple times because of bugs that needed to be fixed: - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15595/ Creating fork networks for projects that were missing the root of the fork network. - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15709 The API allowed creating forked_project_links without fork_network_members. Scheduling this migration multiple times would case it to run concurrently. Which in turn would try to insert the same data into `fork_network_members` causing duplicate key errors. This avoids running the migration multiple times.
* Backport of LFS File Locking APIrd-35856-backport-lfs-file-locking-apiRubén Dávila2018-02-072-0/+42
|
* Merge branch 'fix/gb/fix-redundant-pipeline-stages' into 'master'Kamil Trzciński2018-02-072-1/+67
|\ | | | | | | | | | | | | Remove redundant pipeline stages from the database Closes #41769 See merge request gitlab-org/gitlab-ce!16580
| * Disable statement timeout when removing redundant stagesGrzegorz Bizon2018-02-071-0/+2
| |
| * Merge commit '4457cf9d178dc9912fd9c16427ad81b389179d00' into ↵fix/gb/fix-redundant-pipeline-stagesGrzegorz Bizon2018-02-072-1/+36
| |\ | | | | | | | | | | | | | | | | | | | | | | | | fix/gb/fix-redundant-pipeline-stages * commit '4457cf9d178dc9912fd9c16427ad81b389179d00': (76 commits) Conflicts: spec/services/ci/retry_build_service_spec.rb
| * | Remove old index after executing a query in stages migrationGrzegorz Bizon2018-02-071-1/+1
| | | | | | | | | | | | | | | This makes it possible to heavily optimize this migration, because we need an outdated index to remove redundant stages faster.
| * | Improve exceptions messages in code creating stagesGrzegorz Bizon2018-02-061-1/+4
| | |
| * | Add more specs for unique stages index migrationGrzegorz Bizon2018-02-061-1/+4
| | |
| * | Merge branch 'master' into fix/gb/fix-redundant-pipeline-stagesGrzegorz Bizon2018-02-0611-4/+262
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | * master: (441 commits) Conflicts: db/schema.rb
| * | | Fix database schema version to match latest migrationGrzegorz Bizon2018-02-061-1/+1
| | | |
| * | | Retry migration removing stages in case of duplicatesGrzegorz Bizon2018-02-051-4/+17
| | | |
| * | | Revert create job service because of load balancingGrzegorz Bizon2018-02-052-21/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we still need to run EnsureStageService within a transaction, because when it runs within in a transaction we are going to stick to the primary database when using database load balancing. Extracting this out of the transaction makes it possible to hit into problems with replication lag in pipeline commit status API, which can cause a lot of trouble.
| * | | Remove unique index not added in a migration from schemaGrzegorz Bizon2018-01-251-1/+0
| | | |
| * | | Fix indentation in migration removing duplicated stagesGrzegorz Bizon2018-01-251-1/+1
| | | |
| * | | Fix migration removing duplicate stages on MySQL againGrzegorz Bizon2018-01-251-0/+1
| | | |
| * | | Add an unique index on pipeline stage nameGrzegorz Bizon2018-01-252-2/+20
| | | |
| * | | Fix removing redundant pipeline stages on MySQLGrzegorz Bizon2018-01-251-4/+11
| | | |
| * | | Optimize SQL query that removes duplicated stagesGrzegorz Bizon2018-01-241-4/+4
| | | |
| * | | Remove redundant pipeline stages from the databaseGrzegorz Bizon2018-01-242-1/+27
| | | |
* | | | Merge branch '38175-add-domain-field-to-auto-devops-application-setting' ↵Kamil Trzciński2018-02-072-0/+14
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | into 'master' Resolve "Add domain field to Auto DevOps application setting" Closes #38175 See merge request gitlab-org/gitlab-ce!16604
| * | | Merge branch 'master' into ↵Matija Čupić2018-02-025-3/+103
| |\ \ \ | | | | | | | | | | | | | | | 38175-add-domain-field-to-auto-devops-application-setting
| * \ \ \ Merge branch 'master' into ↵Matija Čupić2018-01-282-0/+16
| |\ \ \ \ | | | | | | | | | | | | | | | | | | 38175-add-domain-field-to-auto-devops-application-setting
| * | | | | Add auto_devops_domain to ApplicationSettings modelMatija Čupić2018-01-222-1/+15
| | |_|/ / | |/| | |
* | | | | Reset `events` table primary key sequence to make sure it’s correctdm-reset-event-pk-sequenceDouwe Maan2018-02-062-1/+36
| |_|_|/ |/| | |
* | | | Merge branch 'better-issues-closed-at-cleanup' into 'master'Stan Hu2018-02-051-3/+16
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle EE edge cases in issues.closed_at migration Closes gitlab-ee#4803 See merge request gitlab-org/gitlab-ce!16926
| * | | | Handle EE edge cases in issues.closed_at migrationbetter-issues-closed-at-cleanupYorick Peterse2018-02-051-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EE seems to have had an outdated schema at some point, leading to some environments not having the right columns in place. This adjusts the migration for `issues.closed_at` so it takes care of those cases, ensuring data can be migrated properly. Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/4803
* | | | | Merge branch '32282-add-foreign-keys-to-todos' into 'master'Yorick Peterse2018-02-053-2/+69
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing foreign key and NOT NULL constraints to todos table. Closes #32282 See merge request gitlab-org/gitlab-ce!16849
| * | | | | Set todos#author_id to NOT NULL.32282-add-foreign-keys-to-todosAndreas Brandl2018-02-052-2/+28
| | | | | |
| * | | | | Add foreign keys to todos table.Andreas Brandl2018-02-052-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #32282.
* | | | | | Merge branch '42547-upload-store-mount-point' into 'master'Sean McGivern2018-02-052-0/+16
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store uploader context in uploads Closes #42547 See merge request gitlab-org/gitlab-ce!16779
| * | | | | fix the schema.rbMicaël Bergeron2018-02-021-0/+2
| | | | | |
| * | | | | add the uploader context to the upload modelMicaël Bergeron2018-02-021-0/+14
| | | | | |
* | | | | | Merge branch 'persistent-callouts' into 'master'Kamil Trzciński2018-02-052-0/+25
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | Add backend for persistently dismissible callouts See merge request gitlab-org/gitlab-ce!16735
| * | | | | Change UserCallout feautre_name to enumMatija Čupić2018-02-032-2/+2
| | | | | |
| * | | | | Merge branch 'master' into persistent-calloutsMatija Čupić2018-02-025-3/+103
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| * | | | | Rename Callout to UserCalloutMatija Čupić2018-02-022-14/+12
| | | | | |
| * | | | | Remove timestamps from CalloutsMatija Čupić2018-02-021-2/+0
| | | | | |
| * | | | | Remove dismissed_state from Callout modelMatija Čupić2018-02-022-4/+2
| | | | | |
| * | | | | Update database schemaMatija Čupić2018-01-261-1/+13
| | | | | |
| * | | | | Add Callout modelMatija Čupić2018-01-261-0/+19
| | |_|_|/ | |/| | |
* | | | | fix rubocopfix-migration-timestampJames Lopez2018-02-031-0/+2
| | | | |
* | | | | add migration before 20171207150343James Lopez2018-02-031-0/+19
| |/ / / |/| | |
* | | | Merge branch '32283-trending-projects-unique-constraint2' into 'master'Yorick Peterse2018-02-022-1/+20
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Add unique constraint to trending_projects#project_id. See merge request gitlab-org/gitlab-ce!16846
| * | | | Add unique constraint to trending_projects#project_id.Andreas Brandl2018-02-022-1/+20
| | |/ / | |/| |