summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/database_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42GitLab Bot2021-08-191-394/+22
|
* Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42GitLab Bot2021-07-201-0/+90
|
* Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42GitLab Bot2021-06-161-6/+28
|
* Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42GitLab Bot2021-05-191-5/+25
|
* Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43GitLab Bot2021-04-201-2/+2
|
* Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40GitLab Bot2021-03-161-0/+108
|
* Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42GitLab Bot2020-10-211-81/+20
|
* Add latest changes from gitlab-org/gitlab@13-3-stable-eeGitLab Bot2020-08-281-40/+0
|
* Add latest changes from gitlab-org/gitlab@13-2-stable-eeGitLab Bot2020-07-231-0/+20
|
* Add latest changes from gitlab-org/gitlab@13-2-stable-eeGitLab Bot2020-07-201-38/+75
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-181-0/+6
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-101-0/+14
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-12-171-0/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-12-101-0/+26
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-111-14/+0
|
* CE port: allow SRV records in DB service discoverydb_load_balancing_service_discovery_srvTiger2019-08-231-0/+11
|
* Further remove code branches by database typeAndreas Brandl2019-07-291-60/+18
| | | | | | | | We dropped MySQL support and a lot of mysql specific code has been removed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29608. This comes in from the other direction and removes any `if postgresql?` branches.
* Add frozen_string_literal to spec/lib (part 1)Thong Kuah2019-07-261-0/+2
| | | | | Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
* Remove dead MySQL codeNick Thomas2019-07-231-106/+29
| | | | None of this code can be reached any more, so it can all be removed
* Add helper method to return a human-friendly name for database adapterDouglas Barbosa Alexandre2019-03-211-0/+14
|
* Rename pg_stat_wal_receiver_supported? DB helperAsh McKenzie2019-03-141-0/+38
| | | | | | | From pg_stat_wal_receiver_supported? to postgresql_minimum_supported_version? Also add test coverage
* Remove rails4 specific codeJasper Maes2018-12-161-7/+2
|
* Remove rails 4 support in CI, Gemfiles, bin/ and config/Jasper Maes2018-12-141-4/+2
|
* CE port of 'Move EE specific code from Gitbab::Database into ee'Douglas Barbosa Alexandre2018-11-261-1/+21
|
* Backport various EE changes to Gitlab::Databasebackport-gitlab-databaseYorick Peterse2018-07-241-0/+86
| | | | | | These changes are useful for CE as well. For example, the MR https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20720 can make use of some of the backported methods.
* Ability to check if underlying database is read onlyBrett Walker2018-07-061-0/+29
|
* Use data_source_exists? instead of table_exists?rails5-databaseJarka Kadlecová2018-06-141-2/+7
| | | | Use data_source_exists? where possible instead of table_exists? in order to be Rails5 compatible
* Memoize Gitlab::Database.versionmemoize-database-versionYorick Peterse2018-05-171-0/+14
| | | | | This removes the need for running a database query every time we want to check the database version.
* Cache table_exists?('application_settings') to reduce repeated schema reloadssh-cache-table-existsStan Hu2018-03-151-0/+12
| | | | Closes #43355
* Cache column_exists? for application settingssh-cache-column-existsStan Hu2018-03-151-0/+11
| | | | | | | This is most a backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4987/diffs but includes other columns that use column_exists? in a way that may cause unnecessary schema loads.
* Merge branch 'mk-add-old-attachments-to-uploads-table' into 'master'Stan Hu2017-12-071-0/+16
|\ | | | | | | | | Add old files to uploads table See merge request gitlab-org/gitlab-ce!15270
| * Add tests for disable_quote optionMichael Kozono2017-12-011-0/+16
| |
* | add Gitlab::Database.replication_slots_supported?Brett Walker2017-12-051-0/+22
|/
* Add returning IDs to Gitlab::Database.bulk_insertYorick Peterse2017-11-071-0/+20
| | | | | | | This adds the keyword argument "return_ids" to Gitlab::Database.bulk_insert. When set to `true` (and PostgreSQL is used) this method will return an Array of the IDs of the inserted rows, otherwise it will return an empty Array.
* Handle large values on `MergeRequestDiffCommit` dates39561-seed_fu-fails-to-load-gitlab-testAlejandro Rodríguez2017-10-301-0/+22
|
* Use a specialized class for querying eventsYorick Peterse2017-08-101-0/+22
| | | | | | | | | | | | | | | This changes various controllers to use the new EventCollection class for retrieving events. This class uses a JOIN LATERAL query on PostgreSQL to retrieve queries in a more efficient way, while falling back to a simpler / less efficient query for MySQL. The EventCollection class also includes a limit on the number of events to display to prevent malicious users from cycling through all events, as doing so could put a lot of pressure on the database. JOIN LATERAL is only supported on PostgreSQL starting with version 9.3.0 and as such this optimisation is only used when using PostgreSQL 9.3 or newer.
* 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>
* Fix Gitlab::Database.bulk_insert for non-UTF-8 data34324-gitlab-db-seed-is-brokenSean McGivern2017-06-261-0/+4
|
* Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-211-4/+4
|
* Add table for files in merge request diffsSean McGivern2017-06-161-0/+49
| | | | | | | | | | | | | | | | This adds an ID-less table containing one row per file, per merge request diff. It has a column for each attribute on Gitlab::Git::Diff that is serialised currently, with the advantage that we can easily query the attributes of this new table. It does not migrate existing data, so we have fallback code when the legacy st_diffs column is present instead. For a merge request diff to be valid, it should have at most one of: * Rows in this new table, with the correct merge_request_diff_id. * A non-NULL st_diffs column. It may have neither, if the diff is empty.
* Correct RSpec/SingleLineHook cop offensesRobert Speicher2017-06-141-4/+12
|
* removes redundant code from database.rb29056-backport-ee-cleanup-database-fileTiago Botelho2017-04-111-4/+4
|
* Added Gitlab::Database.configYorick Peterse2017-03-171-4/+10
| | | | | | | | This returns the ActiveRecord configuration for the current environment. While CE doesn't use this very often, EE will use it in a few places for the database load balancing code. I'm adding this to CE so we don't end up with merge conflicts in this file.
* Allow setting of a custom connection pool hostYorick Peterse2017-02-221-3/+18
| | | | | | | This allows you to set a custom host when calling Gitlab::Database.create_connection_pool. This is necessary for load balancing as in this case we want to inherit all settings except for the hostname.
* Merge branch 'create-connection-pool' into 'master' Yorick Peterse2017-02-141-0/+48
|\ | | | | | | | | Introduce Gitlab::Database.with_connection_pool See merge request !9192
| * Have some simple way to create connection poolLin Jen-Shin2017-02-141-0/+48
| |
* | Don't connect in Gitlab::Database.adapter_namefix-ar-connection-leaksYorick Peterse2017-02-131-0/+6
|/ | | | | | We don't need to connect when requesting the name of the database adapter. This in turn should prevent us from requesting/leaking connections just by asking whether we're using PostgreSQL or MySQL.
* Improve performance of finding last deployed environmentDouwe Maan2017-02-061-0/+16
|
* Improve Issuable.order_labels_priorityRémy Coutable2016-06-061-0/+16
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix undefined method `postgresql?` during migrationrs-gitlab-database-moduleRobert Speicher2016-02-151-0/+32
|