From 3217f0ea5ad0bbddc3ff25b4d7226093fb2414da Mon Sep 17 00:00:00 2001 From: nelsonic Date: Wed, 29 Jul 2026 21:46:40 +0100 Subject: [PATCH 01/13] create commands.md with a handful of useful comands #135 --- commands.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 commands.md diff --git a/commands.md b/commands.md new file mode 100644 index 0000000..bb16c90 --- /dev/null +++ b/commands.md @@ -0,0 +1,110 @@ +# Useful `Postgres` Commands + +## List All Databases: `\l` + +If you connect to a `Postgres` database + +```sql +\l +``` + +```md + List of databases + Name | Owner | Encoding | Locale Provider | Collate | Ctype | Locale | ICU Rules | Access privileges +-----------------+------------+----------+-----------------+------------+------------+--------+-----------+--------------------------- + mvp | flypgadmin | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | + mvp_pr_421 | flypgadmin | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | + mvp_review_test | flypgadmin | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | + postgres | flypgadmin | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | + template0 | flypgadmin | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | =c/flypgadmin + + | | | | | | | | flypgadmin=CTc/flypgadmin + template1 | flypgadmin | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | =c/flypgadmin + + | | | | | | | | flypgadmin=CTc/flypgadmin +(8 rows) +``` + +## Switch to a Specific Database + +```sql +\c postgres +``` + +You should see output similar to the following: + +```sh +psql (18.4 (Postgres.app), server 14.6 (Debian 14.6-1.pgdg110+1)) +You are now connected to database "postgres" as user "postgres". +``` + +## Describe Tables: `\dt` + +To describe (list) the available tables in the database run: + +```sh +\dt +``` + + +## Create a New User + +We needed to create a new `user` and grant it access to the database: + +```sql +CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass'; +GRANT ALL PRIVILEGES ON DATABASE yourdbname TO youruser; +ALTER DATABASE yourdbname OWNER TO youruser; +``` + +e.g: + +```sql +CREATE USER mvp_user_2026 WITH ENCRYPTED PASSWORD '7z3S2y17ABDeZPIJkQFh43tjZMoAiNSrVSWByWgR7JVoRNCvBogjLs1kug1rkX4i'; +GRANT ALL PRIVILEGES ON DATABASE mvp TO mvp_user_2026; +GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO mvp_user_2026; + +ALTER DATABASE mvp OWNER TO mvp_user_2026; +``` + +Now test if that worked: + +```sql +GRANT ALL PRIVILEGES ON ALL TABLES IN DATABASE mvp TO mvp_user_2026; + +``` + +Got: +```sh +ERROR: permission denied for table items +``` + + + +```sh +SELECT * FROM postgres; +``` + +## What _Version_ of `Postgres` is Running? + +```sql +SELECT version(); +``` + +You should expect to see something like: + +```sh +PostgreSQL 14.6 (Debian 14.6-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit +``` + + +# References + +We found the following answers/pages/posts useful. + +- Top psql commands with examples: +[bytebase.com/reference/postgres/how-to/top-psql-commands-with-examples](https://www.bytebase.com/reference/postgres/how-to/top-psql-commands-with-examples/) +- Creating user, database and adding access on PostgreSQL: +[medium.com/coding-blocks/creating-user-database-and-adding-access-on-postgresql-8bfcd2f4a91e](https://medium.com/coding-blocks/creating-user-database-and-adding-access-on-postgresql-8bfcd2f4a91e) +- Permissions errors when granting access to new user: +[stackoverflow.com/questions/15520361/permission-denied-for-relation-in-postgresql](https://stackoverflow.com/questions/15520361/permission-denied-for-relation-in-postgresql) +- Restore a postgres backup file: +[stackoverflow.com/questions/2732474/restore-a-postgres-backup-file](https://stackoverflow.com/questions/2732474/restore-a-postgres-backup-file-using-the-command-line) \ No newline at end of file From 3e159efdc340d62e53809e35f233bc9d8fcf654a Mon Sep 17 00:00:00 2001 From: nelsonic Date: Thu, 30 Jul 2026 14:49:09 +0100 Subject: [PATCH 02/13] tidy commands.md #135 --- commands.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/commands.md b/commands.md index bb16c90..e465c6a 100644 --- a/commands.md +++ b/commands.md @@ -69,19 +69,13 @@ Now test if that worked: ```sql GRANT ALL PRIVILEGES ON ALL TABLES IN DATABASE mvp TO mvp_user_2026; - -``` - -Got: -```sh -ERROR: permission denied for table items ``` - - + ## What _Version_ of `Postgres` is Running? @@ -100,6 +94,8 @@ PostgreSQL 14.6 (Debian 14.6-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gc We found the following answers/pages/posts useful. +- Using psql in Terminal: +[dev.to/koshirok096/how-to-start-using-psql-in-terminal-for-beginners-2ok3](https://dev.to/koshirok096/how-to-start-using-psql-in-terminal-for-beginners-2ok3) - Top psql commands with examples: [bytebase.com/reference/postgres/how-to/top-psql-commands-with-examples](https://www.bytebase.com/reference/postgres/how-to/top-psql-commands-with-examples/) - Creating user, database and adding access on PostgreSQL: From 9f308effc5175e0fbb328427289dcd979710fe33 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Thu, 30 Jul 2026 17:14:44 +0100 Subject: [PATCH 03/13] add optimised intro image https://github.com/dwyl/learn-postgresql/issues/135#issuecomment-5132204458 --- README.md | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 1a31c44..7b87669 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,11 @@
-# Learn PostgreSQL +Learn Postgres intro image -Learn how to use PostgreSQL -and Structured Query Language (SQL) to store -and query your data. - -
- - - - +Learn to use **`Postgres`** +and Structured Query Language (**SQL**) +to **securely store** +and **reliably query** your data.
@@ -19,9 +14,8 @@ and query your data. [![Dependencies: None!](https://david-dm.org/dwyl/learn-postgresql/status.svg?style=flat-square)](https://david-dm.org/dwyl/learn-postgresql) [![devDependencies Status](https://david-dm.org/dwyl/learn-postgresql/dev-status.svg?style=flat-square)](https://david-dm.org/dwyl/learn-postgresql?type=dev) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat-square)](https://github.com/dwyl/learn-postgresql/issues) - +[![HitCount](https://hits.dwyl.com/dwyl/learn-postgresql.svg)](https://hits.dwyl.io/dwyl/learn-postgresql) +
From 9c848aec02ae7a6c0d9796d8e114bb10dd0fb982 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Thu, 30 Jul 2026 18:49:12 +0100 Subject: [PATCH 04/13] tidy FAQ.md #135 --- FAQ.md | 62 ++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/FAQ.md b/FAQ.md index 1ce202a..a56c776 100644 --- a/FAQ.md +++ b/FAQ.md @@ -1,69 +1,75 @@ -## Why PostgreSQL and _Not_ MySQL? +# _Why_ `Postgres` and _Not_ `MySQL`? -The _good_ news is that almost all of your PostgreSQL knowledge +The _good_ news is that almost all of your `PostgreSQL` knowledge is _directly_ transferable to [MySQL](https://en.wikipedia.org/wiki/MySQL). -Since _both_ use SQL as the language +Since _both_ use `SQL` as the language for interacting with the database, -the time you invest in learning PostgreSQL -and building SQL skills is a hugely valuable. +the time you invest in learning `Postgres` +and building `SQL` skills is a hugely valuable. Learning how to _run_ means you also know how to _walk_. -PostgreSQL might _feel_ "more difficult" +`Postgres` might _feel_ "more difficult" in the same way that , but the principals are all the same. -Just stick with it and keep asking questions until it all "makes sense". -If you need to _apply_ your SQL skills to MySQL, MS SQL or MariaDB, -it will only take you a few minutes to adapt to it. +Just stick with it +and **keep asking questions** until it all makes sense. +If you need to _apply_ your `SQL` skills to `MySQL`, +`MS SQL` or `MariaDB`, +it will only take you a few minutes to adapt to it +(with some Googling). It's very much like riding a bicycle. Once you know how to balance, pedal and steer, your skills transfer to other bicycles. - -The _reason_ MySQL is still _hugely_ popular +The _reason_ `MySQL` is still _hugely_ popular can be summarised by _one_ word: -[***WordPress***](https://en.wikipedia.org/wiki/WordPress). +[***`WordPress`***](https://en.wikipedia.org/wiki/WordPress). -Over **30%** of the 10 million most popular websites use WordPress. -WordPress runs on the "LAMP" (_Linux Apache **MySQL** PHP_) stack, -which means that people are using MySQL by _`default`_ +Over **30%** of the 10 million most popular websites use `WordPress`. +WordPress runs on the "LAMP" (_`Linux` `Apache` **`MySQL`** `PHP`_) stack, +which means that people are using `MySQL` by _`default`_ not _conscious enlightenment_. + https://www.whoishostingthis.com/compare/wordpress/stats + https://w3techs.com/technologies/overview/content_management/all -## Why _Not_ Use WordPress? +## Why _Not_ Use `WordPress`? -WordPress is _unquestionably_ a good CMS and blogging platform +`WordPress` is _unquestionably_ a good +[CMS](https://en.wikipedia.org/wiki/Content_management_system) +and blogging platform that helps millions of people/businesses publish online. -Sadly, it's not secure by _default_ and when a vulnerability is discovered, +Sadly, it's **not secure by _default_** +and when a vulnerability is discovered, it gets exploited en-mass very quickly. -Yes, WordPress can be +Yes, `WordPress` can be ["Hardened"](https://codex.wordpress.org/Hardening_WordPress) but that is _usually_ not the _first_ thing on people's todo list when launching a website or blog. -The result is that _thousands_ of WordPress websites get hacked +The result is that _thousands_ of `WordPress` websites get hacked each time a patch is released e.g: -https://www.zdnet.com/article/thousands-of-wordpress-sites-backdoored-with-malicious-code +[zdnet.com/article/thousands-of-wordpress-sites-backdoored-with-malicious-code](https://www.zdnet.com/article/thousands-of-wordpress-sites-backdoored-with-malicious-code) and it creates a maintenance headache for the person/people _responsible_ for the site. -We're not saying you (_or anyone else_) should not use WordPress, +We're not saying you (_or anyone else_) should not use `WordPress`, just make sure you follow the the latest "best practice" if you do. (_We have been "burned" by it through no fault of our own... and would not touch it again with a barge pole! There are **much** more **secure** and **performant** options!_) -### What About NoSQL Databases/Datastores Like ElasticSearch and Redis? +### What About NoSQL Databases/Datastores Like `ElasticSearch` and `Redis`? @dwyl we are _huge_ fans of _special-purpose_ data storage/retrieval systems. -We have used _several_ NoSQL databases including CouchDB, ElasticSearch, -MongoDB, Neo4J and Redis. -Of these we _recommend_ ElasticSearch for full-text search -and Redis for in-momory datasets and caching. see: +We have used _several_ NoSQL databases including `CouchDB`, `ElasticSearch`, +`MongoDB`, `Neo4J` and `Redis` to name a few. +Of these we _recommend_ `ElasticSearch` for **full-text search** +and `Redis` for in-momory datasets and caching. +see: + [github.com/dwyl/learn-**elasticsearch**](https://github.com/dwyl/learn-elasticsearch) + [github.com/dwyl/learn-**redis**](https://github.com/dwyl/learn-redis) However as a "primary" datastore with a robust query language, -we feel PostgreSQL is the _clear_ winner as a "first" database. +we feel `Postgres` is the **_clear_ winner** as a "first" database. From 29acac64e147a829f944e71aa7517516cffc3061 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Thu, 30 Jul 2026 19:06:17 +0100 Subject: [PATCH 05/13] update all dependencies #135 --- .github/dependabot.yml | 8 ++++++++ .github/workflows/ci.yml | 34 +++++++++++++++++++++++++++++++++ .github/workflows/fix-typos.yml | 20 +++++++++++++++++++ README.md | 22 +++++++++------------ package.json | 8 ++++---- 5 files changed, 75 insertions(+), 17 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/fix-typos.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..64b5838 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: +- package-ecosystem: npm + directory: "/" + schedule: + interval: monthly + time: "17:00" + timezone: Europe/London \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e3d2a86 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [24.x] # [18.x, 20.x, 21.x, 26.x] + # Node.js release schedule: nodejs.org/en/about/releases/ + + - uses: actions/checkout@v7 # github.com/actions/checkout + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v7 # github.com/actions/setup-node + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm test + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v7 # github.com/codecov/codecov-action + with: + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/fix-typos.yml b/.github/workflows/fix-typos.yml new file mode 100644 index 0000000..ad1ae7d --- /dev/null +++ b/.github/workflows/fix-typos.yml @@ -0,0 +1,20 @@ +# Temporarily Commenting Out +# name: Automatically fix typos +# on: +# push: +# branches: +# - main + +# jobs: +# build: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# with: +# ref: main +# - uses: sobolevn/misspell-fixer-action@master +# - uses: peter-evans/create-pull-request@v4.2.0 +# env: +# ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' +# with: +# token: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 7b87669..09ed6c4 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,21 @@
-Learn Postgres intro image +Learn Postgres intro image Learn to use **`Postgres`** -and Structured Query Language (**SQL**) +and Structured Query Language (**`SQL`**) to **securely store** and **reliably query** your data.
- -[![Build Status](https://img.shields.io/travis/dwyl/learn-postgresql/master.svg?style=flat-square)](https://travis-ci.org/dwyl/learn-postgresql) -[![codecov.io](https://img.shields.io/codecov/c/github/dwyl/learn-postgresql/master.svg?style=flat-square)](https://codecov.io/github/dwyl/learn-postgresql?branch=master) -[![Dependencies: None!](https://david-dm.org/dwyl/learn-postgresql/status.svg?style=flat-square)](https://david-dm.org/dwyl/learn-postgresql) -[![devDependencies Status](https://david-dm.org/dwyl/learn-postgresql/dev-status.svg?style=flat-square)](https://david-dm.org/dwyl/learn-postgresql?type=dev) + +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/dwyl/javascript-todo-list-tutorial/ci.yml?label=build&style=flat-square&branch=main)](https://github.com/dwyl/javascript-todo-list-tutorial/actions) +[![codecov.io](https://img.shields.io/codecov/c/github/dwyl/learn-postgresql/master.svg?style=flat-square)](https://codecov.io/github/dwyl/learn-postgresql?branch=main) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat-square)](https://github.com/dwyl/learn-postgresql/issues) -[![HitCount](https://hits.dwyl.com/dwyl/learn-postgresql.svg)](https://hits.dwyl.io/dwyl/learn-postgresql) - +[![HitCount](https://hits.dwyl.com/dwyl/learn-postgresql.svg)](https://hits.dwyl.com/dwyl/learn-postgresql)
- # _Why_? Helping people store, retrieve and derive insights from data @@ -27,13 +23,13 @@ is the essence of _all_ software applications.
## SQL is _Everywhere_ -Like it or not, Relational Databases store +Like it or not, **Relational Databases** store _most_ of the world's structured data -and Structured Query Language (SQL) +and Structured Query Language (`SQL`) is _by far_ the most frequent way of retrieving the data.
According to the most _recent_ surveys/statistics, -SQL _still_ dominates the world of databases. +`SQL` _still_ dominates the world of databases. https://insights.stackoverflow.com/survey/2018/#technology-databases ![stackoverflow-survey-2018-databases](https://user-images.githubusercontent.com/194400/52594468-80cb3b80-2e43-11e9-867a-eeb4eea9a322.png) diff --git a/package.json b/package.json index 5ab277b..3b9662b 100644 --- a/package.json +++ b/package.json @@ -35,13 +35,13 @@ }, "homepage": "https://github.com/dwyl/learn-postgresql#readme", "dependencies": { - "github-scraper": "^6.7.0", - "pg": "^7.8.1" + "github-scraper": "^7.1.1", + "pg": "^8.22" }, "devDependencies": { "faster": "^3.5.1", - "nyc": "^13.1.0", - "supertest": "^4.0.2", + "nyc": "^18.0.0", + "supertest": "^7.2.2", "tap": "^12.6.1", "tap-nyc": "^1.0.3" }, From ef0f84025b947900011ef93bdf99b7631e58532b Mon Sep 17 00:00:00 2001 From: nelsonic Date: Thu, 30 Jul 2026 19:16:12 +0100 Subject: [PATCH 06/13] update screenshots #135 --- README.md | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 09ed6c4..62731c4 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ and **reliably query** your data.
+ [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/dwyl/javascript-todo-list-tutorial/ci.yml?label=build&style=flat-square&branch=main)](https://github.com/dwyl/javascript-todo-list-tutorial/actions) [![codecov.io](https://img.shields.io/codecov/c/github/dwyl/learn-postgresql/master.svg?style=flat-square)](https://codecov.io/github/dwyl/learn-postgresql?branch=main) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat-square)](https://github.com/dwyl/learn-postgresql/issues) @@ -30,13 +31,16 @@ is _by far_ the most frequent way of retrieving the data.
According to the most _recent_ surveys/statistics, `SQL` _still_ dominates the world of databases. +`PostgreSQL` _specifically_ is the most popular: +[survey.stackoverflow.co/2025/technology#1-databases](https://survey.stackoverflow.co/2025/technology#1-databases) -https://insights.stackoverflow.com/survey/2018/#technology-databases -![stackoverflow-survey-2018-databases](https://user-images.githubusercontent.com/194400/52594468-80cb3b80-2e43-11e9-867a-eeb4eea9a322.png) + https://db-engines.com/en/ranking -![dbms-ranking](https://user-images.githubusercontent.com/194400/52594416-64c79a00-2e43-11e9-8a61-02af22554802.png) + +DB Engines ranking 2026 > _**Note**: you should never adopt a technology based on it's **current popularity**, @@ -48,40 +52,43 @@ based on the requirements, constraints and/or availability (both of "skill" on your existing team or in the wider community). We include these stats to explain that **relational databases** are **still** the most widely used **by far** and so -learning SQL skills is a very **wise investment** -both as an **individual** and for your **team** or **organisation**._ +learning `SQL` skills is a very **wise investment** +both as an **individual** +and for your **team** or **organisation**._ -## PostgreSQL is _Easy_ to Learn and it Runs _Everywhere_! +## `PostgreSQL` is _Easy_ to Learn and it Runs _Everywhere_! -Getting started with PostgreSQL is _easy_, +Getting started with `PostgreSQL`` is _easy_, (_just follow the steps in this guide and try out the example queries!_)
When you are ready to _deploy_ your app, you are in safe hands, PostgreSQL runs _everywhere_: -+ **Travis-CI** (free) Integration Testing: -https://docs.travis-ci.com/user/database-setup/#postgresql -+ **Heroku** PostgreSQL (_free for MVP: 10k rows_): https://www.heroku.com/postgres + AWS RDS Postgres (_good value + high performance_): -https://aws.amazon.com/rds/postgresql/ -+ Google Cloud SQL: https://cloud.google.com/sql/ -+ DigitalOcean: https://www.digitalocean.com/products/managed-databases/ +[aws.amazon.com/rds/postgresql](https://aws.amazon.com/rds/postgresql/) ++ Google Cloud SQL: +[cloud.google.com/sql](https://cloud.google.com/sql/) ++ DigitalOcean: +[digitalocean.com/products/managed-databases](https://www.digitalocean.com/products/managed-databases/) ++ Azure: +[azure.microsoft.com/en-us/services/postgresql](https://azure.microsoft.com/en-us/services/postgresql/) + + Citus: + https://techcrunch.com/2019/01/24/microsoft-acquires-citus-data ++ Self-managed high availability cluster: +[github.com/sorintlab/stolon](https://github.com/sorintlab/stolon) + Linode: https://www.linode.com/docs/databases/postgresql/create-a-highly-available-postgresql-cluster-using-patroni-and-haproxy/ -+ Azure: https://azure.microsoft.com/en-us/services/postgresql/ - + Citus: https://techcrunch.com/2019/01/24/microsoft-acquires-citus-data -+ Self-managed high availability cluster: https://github.com/sorintlab/stolon # _Who_? -_Everyone_ building _any_ application that stores data should learn SQL. -SQL is _ubiquitous_ in every field/industry and the sooner you learn/master it, +_Everyone_ building _any_ application that stores data should learn `SQL`. +`SQL` is _ubiquitous_ in every field/industry and the sooner you learn/master it, the higher your life-time return on time investment. Learning how to use a relational database is a foundational skill for all of computer science and application development. -Being _proficient_ in SQL will open the door to Data Science with +Being _proficient_ in `SQL` will open the door to Data Science with [SQL-on-Hadoop](https://mapr.com/why-hadoop/sql-hadoop/sql-hadoop-details/) [Apache Spark](https://en.wikipedia.org/wiki/Apache_Spark#Spark_SQL), Google [BigQuery](https://en.wikipedia.org/wiki/BigQuery), From 74066f8e643f50334757d965f423c0c69582544f Mon Sep 17 00:00:00 2001 From: nelsonic Date: Thu, 30 Jul 2026 19:18:57 +0100 Subject: [PATCH 07/13] delete .travis.yml #135 https://github.com/dwyl/learn-travis/issues/67 --- .travis.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 95da228..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -node_js: - - "node" -env: - global: - - DATABASE_URL=postgres://postgres:@localhost/codeface - - NODE_ENV=TEST -services: - - postgresql -after_success: - - bash <(curl -s https://codecov.io/bash) From 50341d5f177d980f47c9722430a2dd1bdd534347 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Thu, 30 Jul 2026 19:22:06 +0100 Subject: [PATCH 08/13] add link to https://dbeaver.io in install.md #135 --- install.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install.md b/install.md index e2b6936..df414c4 100644 --- a/install.md +++ b/install.md @@ -1,3 +1,9 @@ -# DBeaver +# `DBeaver` -See: https://github.com/dwyl/learn-postgresql/issues/43#issuecomment-469000357 +We recommend installing `DBeaver` +to manage and interact with your `Postgres` Databases. +see: +[dbeaver.io](https://dbeaver.io/) + +Walkthrough of installation and setup: +[dwyl/learn-postgresql#43](https://github.com/dwyl/learn-postgresql/issues/43#issuecomment-469000357) From 99460e5c2b67aea8f471745de40db5fd2287f9b9 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Thu, 30 Jul 2026 19:25:19 +0100 Subject: [PATCH 09/13] clarify that "npm install" creates the database #135 --- tutorial.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tutorial.md b/tutorial.md index 45b1bde..9545955 100644 --- a/tutorial.md +++ b/tutorial.md @@ -1,11 +1,14 @@ # Why? This is a self-contained tutorial for people learning -PostgreSQL for the _first_ time. - +`PostgreSQL` for the _first_ time. +When you run `npm install`, +the `postinstall` script +will create the required database and do all necessary setup. ## People - +```sql psql -U postgres -d codeface -a -f schema.sql +``` From b5ccd586b0aed189bc76db3ae50af32d45459d90 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Thu, 30 Jul 2026 19:27:14 +0100 Subject: [PATCH 10/13] add clarifying comment to schema.sql #135 --- README.md | 3 +-- schema.sql | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 62731c4..e036255 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ and Structured Query Language (**`SQL`**) to **securely store** and **reliably query** your data. -
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/dwyl/javascript-todo-list-tutorial/ci.yml?label=build&style=flat-square&branch=main)](https://github.com/dwyl/javascript-todo-list-tutorial/actions) @@ -22,7 +21,7 @@ and **reliably query** your data. Helping people store, retrieve and derive insights from data is the essence of _all_ software applications.
-## SQL is _Everywhere_ +## `SQL` is _Everywhere_ Like it or not, **Relational Databases** store _most_ of the world's structured data diff --git a/schema.sql b/schema.sql index e6b7a0f..a26ee8e 100644 --- a/schema.sql +++ b/schema.sql @@ -1,3 +1,4 @@ +-- This Schema Is Used By the /server CREATE TABLE IF NOT EXISTS "people" ( "inserted_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, "id" SERIAL PRIMARY KEY, From 36f02fee0c2c41445cbb73d181756f3a6b0f2b8d Mon Sep 17 00:00:00 2001 From: nelsonic Date: Thu, 30 Jul 2026 19:28:01 +0100 Subject: [PATCH 11/13] remove out-dated lines from .gitignore #135 --- .gitignore | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.gitignore b/.gitignore index e40f3b3..21d921b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,12 +14,6 @@ lib-cov # Coverage directory used by tools like istanbul coverage -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release From 283fb3078747982a1650015777ddd0ae62c90723 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Thu, 30 Jul 2026 19:28:55 +0100 Subject: [PATCH 12/13] clarify sample query #135 --- query.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/query.sql b/query.sql index 52465cd..53d25d9 100644 --- a/query.sql +++ b/query.sql @@ -1,3 +1,4 @@ +-- Sample Query you can run once your DB has data in it: SELECT next_page, COUNT (next_page) AS c From 3a15bd98049d59d47c1c39d027194c8acc603eaf Mon Sep 17 00:00:00 2001 From: nelsonic Date: Thu, 30 Jul 2026 19:30:45 +0100 Subject: [PATCH 13/13] remove faster as RawGit is no longer operational #135 --- client/index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/index.html b/client/index.html index 8fb9e43..562df3f 100644 --- a/client/index.html +++ b/client/index.html @@ -12,7 +12,6 @@

Hello World 123!

- - +