Page MenuHomeSoftware Heritage

Create database for npm lister
Closed, MigratedEdits Locked

Description

A database named lister-npm must be created to hold the names of npm packages.

Event Timeline

anlambert triaged this task as Normal priority.Apr 10 2019, 10:53 AM
anlambert created this task.
anlambert added a project: Npm Lister.

Create role

Generate password for the user lister-npm (xkcdpass is your friend).
Then add it to the swh password store.

Then:

createuser -p 5434 -P lister-npm
password:

Create db

createdb -p 5434 --lc-ctype=C.UTF-8 -T template1 lister-npm -O lister-npm

Check

postgres@host:~$ psql -p 5434 lister-npm
psql (11.2 (Debian 11.2-1.pgdg90+1))
Type "help" for help.

lister-npm=# \d
Did not find any relations.
lister-npm=# \conninfo
You are connected to database "lister-npm" as user "postgres" via socket in "/var/run/postgresql" at port "5434".

Initialize schema

From your machine (for example):

$ workon swh
$ swh-lister --db-url postgres://${PG_USER}:${PG_USERPASS}@${PG_HOST}:${PG_PORT}/${PG_DBNAME} npm
ardumont claimed this task.