diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-06 18:49:40 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-06 18:49:40 +0200 |
commit | 9362f5939710bba322008aabd37a4962ddae6f2f (patch) | |
tree | 2c4cea2adfaa170732061c1710dfe74c4e8777b8 /doc | |
parent | 163e9f99ab29524bca204fbd0d0aabc1a1813e4a (diff) | |
parent | 46e4ed6bd0c8c256bce6d35b4bb992d77fd09971 (diff) | |
download | gitlab-ce-9362f5939710bba322008aabd37a4962ddae6f2f.tar.gz |
Merge commit '46e4ed6bd0c8c256bce6d35b4bb992d77fd09971' into feature/multi-level-container-registry-imagesfeature/multi-level-container-registry-images
* commit '46e4ed6bd0c8c256bce6d35b4bb992d77fd09971': (28 commits)
Award emoji button smiley animation
Introduced empty/error UX states to environments monitoring.
Github import rake task
Remove individual modal width styles
Fix RuboCop for removing index
Link to docs site for file in doc/
Disable invalid service templates (again)
Show CI status as Favicon on Pipelines, Job and MR pages
STL file viewer
Wait for the PDF to be loaded before doing anything
remove unnecessary lease as cron job
Search for opened MRs - include reopened MRs
ProjectsFinder should handle more options
Clearly show who triggered the pipeline in email
Make it possible to preview pipeline success/failed emails
Add remove_concurrent_index to database helper
Add more tests for subgroups feature
Large features by the 1st, small ones by the 3rd
Ask people to create EE MRs on the 7th
fix project authorizations migration issue
...
Diffstat (limited to 'doc')
-rw-r--r-- | doc/administration/raketasks/github_import.md | 36 | ||||
-rw-r--r-- | doc/development/migration_style_guide.md | 16 |
2 files changed, 50 insertions, 2 deletions
diff --git a/doc/administration/raketasks/github_import.md b/doc/administration/raketasks/github_import.md new file mode 100644 index 00000000000..affb4d17861 --- /dev/null +++ b/doc/administration/raketasks/github_import.md @@ -0,0 +1,36 @@ +# GitHub import + +>**Note:** +> +> - [Introduced][ce-10308] in GitLab 9.1. +> - You need a personal access token in order to retrieve and import GitHub +> projects. You can get it from: https://github.com/settings/tokens +> - You also need to pass an username as the second argument to the rake task +> which will become the owner of the project. + +To import a project from the list of your GitHub projects available: + +```bash +# Omnibus installations +sudo gitlab-rake import:github[access_token,root,foo/bar] + +# Installations from source +bundle exec rake import:github[access_token,root,foo/bar] RAILS_ENV=production +``` + +In this case, `access_token` is your GitHub personal access token, `root` +is your GitLab username, and `foo/bar` is the new GitLab namespace/project that +will get created from your GitHub project. Subgroups are also possible: `foo/foo/bar`. + + +To import a specific GitHub project (named `foo/github_repo` here): + +```bash +# Omnibus installations +sudo gitlab-rake import:github[access_token,root,foo/bar,foo/github_repo] + +# Installations from source +bundle exec rake import:github[access_token,root,foo/bar,foo/github_repo] RAILS_ENV=production +``` + +[ce-10308]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10308 diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md index fd8335d251e..587922d0136 100644 --- a/doc/development/migration_style_guide.md +++ b/doc/development/migration_style_guide.md @@ -58,10 +58,22 @@ migration was tested. ## Removing indices -If you need to remove index, please add a condition like in following example: +When removing an index make sure to use the method `remove_concurrent_index` instead +of the regular `remove_index` method. The `remove_concurrent_index` method +automatically drops concurrent indexes when using PostgreSQL, removing the +need for downtime. To use this method you must disable transactions by calling +the method `disable_ddl_transaction!` in the body of your migration class like +so: ```ruby -remove_index :namespaces, column: :name if index_exists?(:namespaces, :name) +class MyMigration < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + disable_ddl_transaction! + + def up + remove_concurrent_index :table_name, :column_name if index_exists?(:table_name, :column_name) + end +end ``` ## Adding indices |