Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-12-16Remove rails4 specific codeJasper Maes
2018-12-14Remove rails 4 support in CI, Gemfiles, bin/ and config/Jasper Maes
2018-11-26CE port of 'Move EE specific code from Gitbab::Database into ee'Douglas Barbosa Alexandre
2018-07-24Backport various EE changes to Gitlab::DatabaseYorick Peterse
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.
2018-07-06Ability to check if underlying database is read onlyBrett Walker
2018-06-14Use data_source_exists? instead of table_exists?Jarka Kadlecová
Use data_source_exists? where possible instead of table_exists? in order to be Rails5 compatible
2018-05-17Memoize Gitlab::Database.versionYorick Peterse
This removes the need for running a database query every time we want to check the database version.
2018-03-15Cache table_exists?('application_settings') to reduce repeated schema reloadsStan Hu
Closes #43355
2018-03-15Cache column_exists? for application settingsStan Hu
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.
2017-12-07Merge branch 'mk-add-old-attachments-to-uploads-table' into 'master'Stan Hu
Add old files to uploads table See merge request gitlab-org/gitlab-ce!15270
2017-12-05add Gitlab::Database.replication_slots_supported?Brett Walker
2017-12-02Add tests for disable_quote optionMichael Kozono
2017-11-08Add returning IDs to Gitlab::Database.bulk_insertYorick Peterse
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.
2017-10-31Handle large values on `MergeRequestDiffCommit` datesAlejandro Rodríguez
2017-08-10Use a specialized class for querying eventsYorick Peterse
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.
2017-07-27Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable
services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-26Fix Gitlab::Database.bulk_insert for non-UTF-8 dataSean McGivern
2017-06-21Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon
2017-06-16Add table for files in merge request diffsSean McGivern
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.
2017-06-14Correct RSpec/SingleLineHook cop offensesRobert Speicher
2017-04-11removes redundant code from database.rbTiago Botelho
2017-03-17Added Gitlab::Database.configYorick Peterse
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.
2017-02-22Allow setting of a custom connection pool hostYorick Peterse
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.
2017-02-14Merge branch 'create-connection-pool' into 'master' Yorick Peterse
Introduce Gitlab::Database.with_connection_pool See merge request !9192
2017-02-13Have some simple way to create connection poolLin Jen-Shin
2017-02-13Don't connect in Gitlab::Database.adapter_nameYorick Peterse
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.
2017-02-07Improve performance of finding last deployed environmentDouwe Maan
2016-06-06Improve Issuable.order_labels_priorityRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-02-15Fix undefined method `postgresql?` during migrationRobert Speicher
2016-02-03Display database type and version in Administration dashboardRobert Speicher
Closes #12900
2015-12-09Tag lib specsDouwe Maan
2015-10-08Added methods for detecting MySQL/PostgreSQLYorick Peterse
These two methods remove the need for manually going into ActiveRecord::Base.connection all over the place.