summaryrefslogtreecommitdiff
path: root/db/migrate
Commit message (Collapse)AuthorAgeFilesLines
* Add captcha if there are multiple failed login attemptsMałgorzata Ksionek2019-08-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add method to store session ids by ip Add new specs for storing session ids Add cleaning up records after login Add retrieving anonymous sessions Add login recaptcha setting Add new setting to sessions controller Add conditions for showing captcha Add sessions controller specs Add admin settings specs for login protection Add new settings to api Add stub to devise spec Add new translation key Add cr remarks Rename class call Add cr remarks Change if-clause for consistency Add cr remarks Add code review remarks Refactor AnonymousSession class Add changelog entry Move AnonymousSession class to lib Move store unauthenticated sessions to sessions controller Move link to recaptcha info Regenerate text file Improve copy on the spam page Change action filter for storing anonymous sessions Fix rubocop offences Add code review remarks Fix schema Update schema version
* Merge branch 'security-12-1-enable-image-proxy' into '12-1-stable'GitLab Release Tools Bot2019-08-261-0/+16
|\ | | | | | | | | Use image proxy to mitigate stealing ip addresses See merge request gitlab/gitlabhq!3231
| * Add support for using a Camo proxy serverBrett Walker2019-08-151-0/+16
| | | | | | | | | | | | User images and videos will get proxied through the Camo server in order to keep malicious sites from collecting the IP address of users.
* | Add active_jobs_limit to plans tableFabio Pitino2019-08-201-0/+17
|/ | | | | | | This is a port from EE changes where we introduce a new limit for Plan model. https://dev.gitlab.org/gitlab/gitlab-ee/merge_requests/1182
* Add rule_type to approval_project_rulesLucas Charles2019-07-172-0/+34
| | | | | Adds migration to introduce non-regular rule_types to approval_project_rules
* Migrate null values for users.private_profileAdam Hegyi2019-07-151-0/+33
| | | | | - Background migration for changing null values to false - Set false as default value for private_profile DB column
* Rename Gitlab::Importers moduleRyan Cobb2019-07-094-4/+4
| | | | | In order to avoid confusion between Gitlab::Importers module and other like named modules, this renamed it to Gitlab::DatabaseImporters.
* Remove CommonMetricsImporter patchRyan Cobb2019-07-094-12/+4
| | | | | | Remove CommonMetricsImporter patch and change all references to CommonMetrics::Importer. Move specs into their appropriate folders. Also cleans up some common_metric importer namespacing.
* Merge branch 'ce-10283-notifications-for-ci-minutes-quota-limit-approaching' ↵James Lopez2019-07-051-0/+9
|\ | | | | | | | | | | | | into 'master' Backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14328 See merge request gitlab-org/gitlab-ce!30003
| * Backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14328ce-10283-notifications-for-ci-minutes-quota-limit-approachingRubén Dávila2019-07-051-0/+9
| |
* | Merge branch 'zj-remove-stale-feature-flag-keys' into 'master'Andreas Brandl2019-07-051-0/+48
|\ \ | |/ |/| | | | | Remove unused Gitaly feature flags See merge request gitlab-org/gitlab-ce!30302
| * Remove unused Gitaly feature flagsZeger-Jan van de Weg2019-07-041-0/+48
| | | | | | | | | | | | | | When GitLab was migrating to Gitaly, feature flags were used. These are now out of use, and essentially a no-op. But they do make the output of chatops ugly and the feature table is selected in full by the application.
* | Allow asynchronous rebase operations to be monitoredNick Thomas2019-07-041-0/+9
| | | | | | | | | | | | | | | | | | This MR introduces tracking of the `rebase_jid` for merge requests. As with `merge_ongoing?`, `rebase_in_progress?` will now return true if a rebase is proceeding in sidekiq. After one release, we should remove the Gitaly-based lookup of rebases. It is much better to track this kind of thing via the database.
* | Add Grafana to Admin > Monitoring menu when enabledManeschi Romain2019-07-032-0/+36
|/
* Show upcoming status for releasesJason Goodman2019-07-032-0/+29
| | | | | | Add released_at field to releases API Add released_at column to releases table Return releases to the API sorted by released_at
* Add username to deploy tokensKrasimir Angelov2019-07-021-0/+9
| | | | | | | | | This new attribute is optional and used when set instead of the default format `gitlab+deploy-token-#{id}`. Empty usernames will be saved as null in the database. Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/50228.
* Merge branch '63690-issue-trackers-title' into 'master'Dmitriy Zaporozhets2019-07-021-0/+14
|\ | | | | | | | | | | | | Use title and description fields for issue trackers Closes #63690 See merge request gitlab-org/gitlab-ce!30096
| * Use title and description fields for issue trackers63690-issue-trackers-titleJarka Košanová2019-07-021-0/+14
| | | | | | | | | | - instead of using properties - backward compatibility has to be kept for now
* | Bring the InitSchema migration up to standardNick Thomas2019-07-021-1/+11
| |
* | Squash old migrationsNick Thomas2019-07-02710-14193/+1844
| | | | | | | | Use the `squasher` gem to squash migrations older than the start of 2018
* | Add Migration for Strategies Column on operations_feature_flag_scopesJason Goodman2019-07-011-0/+17
|/
* Merge branch 'add-clusters-to-deployment' into 'master'Lin Jen-Shin2019-07-012-0/+30
|\ | | | | | | | | Add clusters association to deployment See merge request gitlab-org/gitlab-ce!29960
| * Add cluster_id to deployments table as an FKThong Kuah2019-06-272-0/+30
| | | | | | | | | | | | | | | | | | | | We nullify when cluster is deleted as we want to keep the deployment record around. Add cluster as an optional association We will have only cluster for deployments where the build deploys to a kubernetes cluster
* | Merge branch '3264-project-aliases-ce' into 'master'Bob Van Landuyt2019-06-281-0/+16
|\ \ | |/ |/| | | | | CE port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14108 See merge request gitlab-org/gitlab-ce!29604
| * Create project_aliases tablePatrick Bajao2019-06-261-0/+16
| |
* | Add two new ActiveRecord models62214-migrations-and-modelsMayra Cabrera2019-06-252-0/+36
|/ | | | | | | | - Namespace::Storagestatistics will persist root namespace statistics - Namespace::AggregationSchedule will save information when a new update to the namespace statistics needs to be scheduled Both tables use 'namespace_id' as primary key
* Revert "Revert to `id: :integer`"Peter Leitzen2019-06-251-0/+19
| | | | This reverts commit 51340f9b47e8339cdabce11d0a17ac724278bff0.
* Merge branch 'sh-recover-ee-schema-backport-migration-failure' into 'master'Rémy Coutable2019-06-251-0/+48
|\ | | | | | | | | | | | | Prevent EE backport migrations from running if CE is not migrated Closes #63612 See merge request gitlab-org/gitlab-ce!30002
| * Prevent EE backport migrations from running if CE is not migratedsh-recover-ee-schema-backport-migration-failureStan Hu2019-06-251-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a user upgraded to any GitLab 11.x EE version but switched back to CE, it's possible the state of the EE tables are not in the right state for the EE backport migration to work properly. In particular, there were three tables that had trouble: * epics * geo_event_log * vulnerability_feedback The EE backport migration would fail while trying to add foreign key constraints because a key didn't exist in the table. This happens because any EE migration that add or removed columns between v11.0.0 and v11.11.3 are not guaranteed to be applied in an CE installation. The EE backport schema does not individually backport these migrations. We now check if certain columns are present to determine whether the backport migration is in the proper state. CE users are required to upgrade to v11.11.3 EE if they ever installed EE previously before they can go back to v12.x CE. Tested via: ``` git checkout -f v11.0.0-ee bundle exec rake db:reset git checkout .; git checkout -f v11.11.3 bundle exec rake db:migrate git checkout .; git checkout -f v12.0.0 bundle exec rake db:migrate <failure happens> ```
* | Rename to time_tracking_limit_to_hours30355-use-hours-only-for-time-trackingHeinrich Lee Yu2019-06-251-3/+3
| | | | | | | | Changes migration and all other places the attribute is used
* | Limit time tracking values to hoursJon Kolb2019-06-251-0/+21
|/ | | | | Adds an instance setting to limit display of time tracking values to hours only
* Renew Let's Encrypt certificatesVladimir Shushlin2019-06-241-0/+25
| | | | | | | | Add index for pages domain ssl auto renewal Add PagesDomain.needs_ssl_renewal scope Add cron worker for ssl renewal Add worker for ssl renewal Add pages ssl renewal worker queues settings
* Don't show private keys for letsencrypt certsVladimir Shushlin2019-06-211-0/+21
| | | | | | | | | | | | | | | | | | | | Adds enum certificate_source to pages_domains table with default manually_uploaded Mark certificates as 'gitlab_provided' if the were obtained through Let's Encrypt Mark certificates as 'user_provided' if they were uploaded through controller or api Only show private key in domain edit form if it is 'user_provided' Only show LetsEncrypt option if is enabled by application settings (and feature flag) Refactor and fix some specs to match new logic Don't show Let's Encrypt certificates as well
* Backport of 12014-incremental-es-wiki-updatesce-12014-incremental-es-wiki-updatesMario de la Ossa2019-06-181-0/+12
| | | | Bringing in the DB migration and some light changes for CE classes
* Merge branch 'backport-report_approver-migration-to-ce' into 'master'Yorick Peterse2019-06-181-0/+13
|\ | | | | | | | | Backport approval MR rules report_type migration to CE See merge request gitlab-org/gitlab-ce!29766
| * Backport approval MR rules report_type migration to CEbackport-report_approver-migration-to-ceLucas Charles2019-06-171-0/+13
| |
* | Merge branch '57918-encrypt-feature-flags-tokens' into 'master'Kamil Trzciński2019-06-183-0/+40
|\ \ | | | | | | | | | | | | Add migrations needed to encrypt feature flags client tokens See merge request gitlab-org/gitlab-ce!29320
| * | Add migrations needed to encrypt feature flags client tokens57918-encrypt-feature-flags-tokensKrasimir Angelov2019-06-183-0/+40
| | | | | | | | | | | | | | | | | | | | | Make plaintext token column not null, add new token_encrypted column and index on project_id & token_encrypted. Post deployment migration to encrypt existing tokens.
* | | Merge branch 'mc/feature/required-template-inclusion-single-commit-ce' into ↵Grzegorz Bizon2019-06-181-0/+15
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'master' Enforce template inclusion in pipelines - CE See merge request gitlab-org/gitlab-ce!29296
| * | | Backport CE changesmc/feature/required-template-inclusion-single-commit-ceMatija Čupić2019-06-171-0/+15
| | | | | | | | | | | | | | | | | | | | Backports CE changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14011/
* | | | Merge branch 'issue-62685-new' into 'master'Andreas Brandl2019-06-171-0/+21
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | Add index on invite-email to members See merge request gitlab-org/gitlab-ce!29768
| * | | Add index on invite-email to membersyguo2019-06-171-0/+21
| | |/ | |/|
* | | Hashed Storage is enabled by default on new installationshashed-storage-enabled-defaultGabriel Mazetto2019-06-171-0/+15
|/ / | | | | | | updated documentation for Geo
* | Merge branch 'backport-schema-changes' into 'master'Robert Speicher2019-06-1723-185/+2485
|\ \ | | | | | | | | | | | | | | | | | | Backport the EE schema to CE Closes gitlab-ee#9686 See merge request gitlab-org/gitlab-ce!26940
| * | Backport the EE schema and migrations to CEYorick Peterse2019-06-1723-185/+2485
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This backports all EE schema changes to CE, including EE migrations, ensuring both use the same schema. == Updated tests A spec related to ghost and support bot users had to be modified to make it pass. The spec in question assumes that the "support_bot" column exists when defining the spec. In the single codebase setup this is not the case, as the column is backported in a later migration. Any attempt to use a different schema version or use of "around" blocks to conditionally disable specs won't help, as reverting the backport migration would also drop the "support_bot" column. Removing the "support_bot" tests entirely appears to be the only solution. We also need to update some foreign key tests now that we have backported the EE columns. Fortunately, these changes are very minor. == Backporting migrations This commit moves EE specific migrations (except those for the Geo tracking database) and related files to CE, and also removes any traces of the ee/db directory. Some migrations had to be modified or removed, as they no longer work with the schema being backported. These migrations were all quite old, so we opted for removing them where modifying them would take too much time and effort. Some old migrations were modified in EE, while also existing in CE. In these cases we took the EE code, and in one case removed them entirely. It's not worth spending time trying to merge these changes somehow as we plan to remove old migrations around the release of 12.0, see https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
* | | CE port of IP address restriction for groupsImre Farkas2019-06-171-0/+20
|/ /
* | Merge branch '58886-issue-tracker-fields' into 'master'Sean McGivern2019-06-172-0/+49
|\ \ | | | | | | | | | | | | Create models for issue trackers data See merge request gitlab-org/gitlab-ce!28598
| * | Create models for issue trackers data58886-issue-tracker-fieldsJarka Košanová2019-06-132-0/+49
| | | | | | | | | | | | | | | - create tables for storing issue trackers properties - add model and basic logic & spec
* | | CE backport for changes in EE MR 138949490-record-repository_type-on-lfs_objects_projects-ceLuke Duncalfe2019-06-172-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This backports to CE changes that allow the recording of the repository_type in the table lfs_objects_projects. This is in order to allow future pruning of unreferenced LFS objects, as we will need to know which repository to look in for the LFS pointer file. The EE MR that contains the original code and a full explanation of the changes is https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894 EE Issue https://gitlab.com/gitlab-org/gitlab-ee/issues/9490 Note that there was a lot of CE code changed in the EE MR because we want to allow the wiki repository to also use LFS. See https://gitlab.com/gitlab-org/gitlab-ce/issues/43721. As the wiki is an unlicensed feature, a full backport is required to enable this.
* | | Merge branch '4354-lock-memberships-to-ldap-sync-part-1' into 'master'Stan Hu2019-06-141-0/+20
|\ \ \ | | | | | | | | | | | | | | | | EE migration port: add app-wide LDAP membership lock field See merge request gitlab-org/gitlab-ce!29302