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
2019-12-11Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-12-02Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-12-01Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-11-18Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-11-12Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-11-05Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-10-09Add latest changes from gitlab-org/gitlab@masterGitLab Bot
2019-09-11Add rake task `db:obsolete_ignored_columns`Peter Leitzen
Show a list of obsolete `ignored_columns`
2019-09-05Refactor new undo_* methodsReuben Pereira
- Move code for creating a new column from old into a function so that it can be reused. - Also add comments above the methods.
2019-09-04Avoid calling freeze on already frozen strings in lib/gitlabdineshpanda
2019-08-25Add helper to exactly undo cleanup_concurrent_column_renameReuben Pereira
- Also add helper to undo rename_column_concurrently.
2019-08-24Drop existing trigger before creating new oneReuben Pereira
- When renaming a column concurrently, drop any existing trigger before attempting to create a new one. When running migration specs multiple times (as it happens during local development), the down method of previous migrations are called. If any of the called methods contains a call to rename_column_concurrently, a trigger will be created and not removed. So, the next time a migration spec is run, if the same down method is executed again, it will cause an error when attempting to create the trigger (since it already exists). Dropping the trigger if it already exists will prevent this problem.
2019-07-29Further remove code branches by database typeAndreas Brandl
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.
2019-07-25Merge branch 'tc-revert-rails5-workaround' into 'master'Andreas Brandl
Revert "Workaround for Rails 5, where LIMIT..." See merge request gitlab-org/gitlab-ce!30780
2019-07-24Enable tablesample count strategy by defaultAndreas Brandl
https://gitlab.com/gitlab-org/gitlab-ce/issues/58792
2019-07-23Remove dead MySQL codeNick Thomas
None of this code can be reached any more, so it can all be removed
2019-07-18Improves add_timestamps_with_timezone helperAlex Kalderimis
This improves the `add_timestamps_with_timezone` helper by allowing the column names to be configured. This has the advantage that unnecessary columns can be avoided, saving space. A helper for removing the columns is also provided, to be used in the `down` method of migrations.
2019-07-16Revert "Workaround for Rails 5, where LIMIT..."Toon Claes
This reverts commit 6823e7defb45dfd86d5258b40d6f82482d1ef451. Originally implemented in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21839, but an error was reported in https://gitlab.com/gitlab-org/gitlab-ce/issues/51729 resulting in a workaround introduced in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21879. Now Rails 5.2 is used, this workaround no longer seems needed, so this reverts it.
2019-07-12Upgrade to Rails 5.2Heinrich Lee Yu
Updates changed method names and fixes spec failures
2019-07-10Add a rubocop for Rails.loggerMayra Cabrera
Suggests to use a JSON structured log instead Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
2019-07-05Add where condition to count in median classMałgorzata Ksionek
2019-06-28Support jsonb Default Value in add_column_with_default Migration HelperJason Goodman
2019-06-19Use correct arg namepjaspers
So funny story, true story. I tried to run the test locally, but didn't make it past setting up Gitaly. Here's what I tried: First attempt: `git clone gitlab-ce` `cd gitlab-ce && bundle install` `be rspec` This didn't work because I was missing the config/database.yml, I didn't see a `script/bootstrap` so I looked in the readme which redirected me to a webpage which redirected me to the gitlab-development-kit. Second attempt: `gem install gitlab-development-kit` cd gitlab-development-kit gdk init gdk isntall This broke somwhere along the way because it couldn't install Gitaly because my go version was too low. But it did clone the gitlab repo again and this time it did have a config/database.yml. So I tried to cd into it and `be rspec spec/lib/gitlab/database/migration_helpers_spec.rb` which complained about the database not being configured so I: - Changed the socket to localhost (in the config/database.yml) - `createdb <dev_db>` `createdb test_db` - `be rake db:test:prepare` Great success, it was doing things! But then failed when it came at the Gitaly step. Since I only want to change these three lines, at the point I gave up and entrusted the pipeline to do its thing. What I would have liked: - A 'It's a Rails system, I know this' readme/docs (It's in there somewhere just couldn't find it) - A way to run tests without having to use Gitaly - Not having too install all the things for a small fix (I get why'd you want this, but to me it's overkill)
2019-06-19Fix syntax coloring on emacspjaspers
The rather cryptic: "fk_#{Digest::SHA256.hexdigest("#{table}_#{column}_fk").first(10)}" Was too much for emacs too handle*, since it was coming from the Rails codebase I took their way of doing the same thing and applied it here. I think it's easier to read and it also makes emacs render the migration helpers pretty again. * not true, emacs can handle anything, leave emacs alone!
2019-06-17Allow custom names for concurrent foreign keysYorick Peterse
This is necessary for backporting the EE schema to ensure backported foreign keys use the same key names.
2019-05-07Add remove_foreign_key_if_existsLin Jen-Shin
2019-04-06Clean up `noteable_id` for notes on commitsHeinrich Lee Yu
This was incorrectly set by a bug in: https://gitlab.com/gitlab-org/gitlab-ce/issues/54924 Also adds a `batch_size` option to `update_column_in_batches`
2019-03-13Run rubocop -aNick Thomas
2019-03-12Seed tablesample strategyAndreas Brandl
This produces stable approximate counts among invocations unless the table changed. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58791.
2019-03-12Fix counting of groups in admin dashboardStan Hu
1. Ignore tables that use STI in reltuples count strategy. Models that use Rails' single-type inheritance, such as `Group` and `CiService`, need an additional WHERE clause to count the total properly, which isn't supported by the reltuples strategy. For now, we just omit these from the statistics sampling and rely on the other strategies to get this data. 2. Fix tablesample count strategy not counting groups properly. Models such as `Group` needs a WHERE clause to distinguish it from namespaces. We now add in the WHERE clause if STI is in use. Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/7435
2019-03-06Adds the Rubocop ReturnNil copAndrew Newdigate
This style change enforces `return if ...` instead of `return nil if ...` to save maintainers a few minor review points
2018-12-16Remove rails4 specific codeJasper Maes
2018-12-07Backports some changes from gitlab-ee!7885Rubén Dávila
2018-12-06Use approximate counts for big tablesJan Provaznik
2018-12-03Lower the tablesample thresholds/targets.Andreas Brandl
The numbers in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22650#note_117645395 are quite promising with that target.
2018-12-03Move strategies in their own filesAndreas Brandl
This improves readability quite a bit.
2018-12-03Fix comment.Andreas Brandl
2018-12-03Refactor estimate queryAndreas Brandl
2018-12-03Fix rubocop offenses.Andreas Brandl
2018-12-03Add feature flag for tablesample counting.Andreas Brandl
2018-12-03Implement TablesampleCountStrategy.Andreas Brandl
A tablesample count executes in two phases: * Estimate table sizes based on reltuples. * Based on the estimate: * If the table is considered 'small', execute an exact relation count. * Otherwise, count on a sample of the table using TABLESAMPLE. The size of the sample is chosen in a way that we always roughly scan the same amount of rows (see TABLESAMPLE_ROW_TARGET).
2018-12-03More specs for fallback testing.Andreas Brandl
2018-12-03Refactor specs to separate concerns.Andreas Brandl
2018-12-03Flexible approximate counts with fallback strategies.Andreas Brandl
2018-12-03Simplify to use models instead of tables.Andreas Brandl
2018-12-03Add ExactCountStrategy.Andreas Brandl
2018-12-03Extract ReltuplesCountStrategy.Andreas Brandl
2018-11-07Enable even more frozen string in lib/gitlabgfyoung
Enables frozens string for the following: * lib/gitlab/conflict/**/*.rb * lib/gitlab/cross_project_access/**/*.rb * lib/gitlab/cycle_analytics/**/*.rb * lib/gitlab/data_builder/**/*.rb * lib/gitlab/database/**/*.rb * lib/gitlab/dependency_linker/**/*.rb * lib/gitlab/diff/**/*.rb * lib/gitlab/downtime_check/**/*.rb * lib/gitlab/email/**/*.rb * lib/gitlab/etag_caching/**/*.rb Partially addresses gitlab-org/gitlab-ce#47424.
2018-11-01Fix typos in comments and specsGeorge Tsiolis
2018-10-23Merge branch 'mysql-migration-trigger-permissions' into 'master'Andreas Brandl
Add dbname to MySQL migration GRANT command See merge request gitlab-org/gitlab-ce!21719