From d2aa524570c85b43fde8e36c7f2d26fe96d92262 Mon Sep 17 00:00:00 2001 From: Jen Weber Date: Mon, 24 Jun 2019 18:40:50 -0400 Subject: [PATCH 1/2] Add instructions for using psql to view the local database --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 05b41ab..f66a889 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,14 @@ You can run the tests interactively via yarn test -s +## Viewing the Hub database + +```sh +psql -h localhost -p 5432 -d pgsearch_ cardboard_development -U postgres +``` + +If you don't have postgres installed, you use a Mac, and you have Homebrew installed, you can do `brew install postgresql`; + ## Creating Cards You create a new card by running the generator in the `portfolio/` directory of the project: From 4e978fc12dcff8f255f19aae337f52bacc9b6a63 Mon Sep 17 00:00:00 2001 From: Jen Weber Date: Tue, 25 Jun 2019 15:22:57 -0400 Subject: [PATCH 2/2] Update README to use Docker deps --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f66a889..9bc66fa 100644 --- a/README.md +++ b/README.md @@ -108,12 +108,15 @@ You can run the tests interactively via ## Viewing the Hub database +Note that the database has lots of whitespace padding within columns, so it is useful to use a client like [Postico](https://eggerapps.at/postico/) to view the data, or do `SELECT` for specific columns. +Otherwise, the tables might appear empty. + ```sh -psql -h localhost -p 5432 -d pgsearch_ cardboard_development -U postgres +yarn start-hub +docker exec -it cardstack-pg psql -U postgres pgsearch_cardboard_development +SELECT id from documents; ``` -If you don't have postgres installed, you use a Mac, and you have Homebrew installed, you can do `brew install postgresql`; - ## Creating Cards You create a new card by running the generator in the `portfolio/` directory of the project: