From 612a849a6cba1765bc41d30d4e931195dcdf64cf Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 3 Mar 2020 03:08:31 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- doc/update/mysql_to_postgresql.md | 16 ++++++++-------- doc/update/restore_after_failure.md | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'doc/update') diff --git a/doc/update/mysql_to_postgresql.md b/doc/update/mysql_to_postgresql.md index 08794b8a101..9ad77a80d50 100644 --- a/doc/update/mysql_to_postgresql.md +++ b/doc/update/mysql_to_postgresql.md @@ -54,13 +54,13 @@ pgloader within the container as it is not included in the container image. 1. Start a shell session in the context of the running container: - ``` bash + ```shell docker exec -it gitlab bash ``` 1. Install pgloader: - ``` bash + ```shell apt-get update apt-get -y install pgloader ``` @@ -78,7 +78,7 @@ need to enable the bundled PostgreSQL: 1. Edit `/etc/gitlab/gitlab.rb` to enable bundled PostgreSQL: - ``` + ```ruby postgresql['enable'] = true ``` @@ -116,7 +116,7 @@ new PostgreSQL one: 1. Save the following snippet in a `commands.load` file, and edit with your MySQL database `username`, `password` and `host`: - ``` + ```sql LOAD DATABASE FROM mysql://username:password@host/gitlabhq_production INTO postgresql://gitlab-psql@unix://var/opt/gitlab/postgresql:/gitlabhq_production @@ -143,7 +143,7 @@ new PostgreSQL one: 1. Once the migration finishes, you should see a summary table that looks like the following: - ``` + ```plaintext table name read imported errors total time ----------------------------------------------- --------- --------- --------- -------------- fetch meta data 119 119 0 0.388s @@ -217,7 +217,7 @@ new PostgreSQL one: 1. Save the following snippet in a `commands.load` file, and edit with your MySQL `username`, `password` and `host`: - ``` + ```sql LOAD DATABASE FROM mysql://username:password@host/gitlabhq_production INTO postgresql://postgres@unix://var/run/postgresql:/gitlabhq_production @@ -244,7 +244,7 @@ new PostgreSQL one: 1. Once the migration finishes, you should see a summary table that looks like the following: - ``` + ```plaintext table name read imported errors total time ----------------------------------------------- --------- --------- --------- -------------- fetch meta data 119 119 0 0.388s @@ -284,7 +284,7 @@ Sometimes, you might encounter some errors during or after the migration. The PostgreSQL user that you use for the migration MUST have **superuser** privileges. Otherwise, you may see a similar message to the following: -``` +```plaintext debugger invoked on a CL-POSTGRES-ERROR:INSUFFICIENT-PRIVILEGE in thread #: Database error 42501: permission denied: "RI_ConstraintTrigger_a_20937" is a system trigger diff --git a/doc/update/restore_after_failure.md b/doc/update/restore_after_failure.md index f254373e1c8..99329fdceb3 100644 --- a/doc/update/restore_after_failure.md +++ b/doc/update/restore_after_failure.md @@ -28,7 +28,7 @@ may need to manually correct the problem next time you upgrade. Example error: -``` +```plaintext == 20151103134857 CreateLfsObjects: migrating ================================= -- create_table(:lfs_objects) rake aborted! @@ -48,7 +48,7 @@ need to do. Pass the version to a database rake task to manually mark the migration as complete. -``` +```shell # Source install sudo -u git -H bundle exec rake gitlab:db:mark_migration_complete[20151103134857] RAILS_ENV=production @@ -62,7 +62,7 @@ migrations are marked complete. ### GitLab < 8.6 -``` +```shell # Source install sudo -u git -H bundle exec rails console -e production @@ -72,7 +72,7 @@ sudo gitlab-rails console At the Rails console, type the following commands: -``` +```ruby ActiveRecord::Base.connection.execute("INSERT INTO schema_migrations (version) VALUES('20151103134857')") exit ``` -- cgit v1.2.3