summaryrefslogtreecommitdiff
path: root/doc/development/database_debugging.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-18 09:09:24 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-18 09:09:24 +0000
commit4720b569f0fcbb47e9f1a60e95172ae63b6f065a (patch)
tree5c6bcecbca227e608753a57a9aad19ccfe0567b6 /doc/development/database_debugging.md
parentcefe554b7ce2d0b52f9de855be832a47c2bc24ab (diff)
downloadgitlab-ce-4720b569f0fcbb47e9f1a60e95172ae63b6f065a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/database_debugging.md')
-rw-r--r--doc/development/database_debugging.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/development/database_debugging.md b/doc/development/database_debugging.md
index 234d6b2518d..d91edba92db 100644
--- a/doc/development/database_debugging.md
+++ b/doc/development/database_debugging.md
@@ -52,6 +52,30 @@ bundle exec rails db RAILS_ENV=development
- `SELECT * FROM schema_migrations WHERE version = '20170926203418';`: Check if a migration was run
- `DELETE FROM schema_migrations WHERE version = '20170926203418';`: Manually remove a migration
+## Access the GDK database with Visual Studio Code
+
+Use these instructions for exploring the GitLab database while developing with the GDK:
+
+1. Install or open [Visual Studio Code](https://code.visualstudio.com/download).
+1. Install the [PostgreSQL VSCode Extension](https://marketplace.visualstudio.com/items?itemName=ckolkman.vscode-postgres) by Chris Kolkman.
+1. In Visual Studio Code click on the PostgreSQL Explorer button in the left toolbar.
+1. In the top bar of the new window, click on the `+` to **Add Database Connection**, and follow the prompts to fill in the details:
+ 1. **Hostname**: the path to the PostgreSQL folder in your GDK directory (for example `/dev/gitlab-development-kit/postgresql`).
+ 1. **PostgreSQL user to authenticate as**: usually your local username, unless otherwise specified during PostgreSQL installation.
+ 1. **Password of the PostgreSQL user**: the password you set when installing PostgreSQL.
+ 1. **Port number to connect to**: `5432` (default).
+ 1. **Use an ssl connection?** This depends on your installation. Options are:
+ - **Use Secure Connection**
+ - **Standard Connection** (default)
+ 1. **(Optional) The database to connect to**: `gitlabhq_development`.
+ 1. **The display name for the database connection**: `gitlabhq_development`.
+
+Your database connection should now be displayed in the PostgreSQL Explorer pane and
+you can explore the `gitlabhq_development` database. If you cannot connect, ensure
+that GDK is running. For further instructions on how to use the PostgreSQL Explorer
+Extension for Visual Studio Code, read the [usage section](https://marketplace.visualstudio.com/items?itemName=ckolkman.vscode-postgres#usage)
+of the extension documentation.
+
## FAQ
### `ActiveRecord::PendingMigrationError` with Spring