example
Register & Login | Register |
---|---|
![]() |
![]() |
- User flow
![]() |
![]() |
![]() |
!BUGS authentication
open
psql -U postgres -d postgres
creating user
CREATE USER ullasDB WITH PASSWORD 'ullasdb1' CREATEDB;
connecting to user db
psql -U ullasdb -d postgres
creating database
CREATE DATABASE nodeuserlogin;
listing the database
\l
connect to db
\c nodeuserlogin
creating table
CREATE TABLE users
nodeuserlogin-> (id BIGSERIAL PRIMARY KEY NOT NULL,
nodeuserlogin(> name VARCHAR(200) NOT NULL,
nodeuserlogin(> email VARCHAR(200) NOT NULL,
nodeuserlogin(> password VARCHAR(200) NOT NULL,
nodeuserlogin(> UNIQUE (email));
check
nodeuserlogin=> \d users
Table "public.users"
Column | Type | Collation | Nullable | Default
----------+------------------------+-----------+----------+-----------------------------------
id | bigint | | not null | nextval('users_id_seq'::regclass)
name | character varying(200) | | not null |
email | character varying(200) | | not null |
password | character varying(200) | | not null |
Indexes:
"users_pkey" PRIMARY KEY, btree (id)
"users_email_key" UNIQUE CONSTRAINT, btree (email)