APUOPE-RE / backend

repo for the backend
0 stars 0 forks source link

TASK Register page, database #5

Closed williamirva closed 2 days ago

williamirva commented 5 days ago

Under this issue a database table to store user information should be set up.

New table should be created with columns listed below: id SERIAL PRIMARY KEY, uuid UUID UNIQUE,
username VARCHAR(50) UNIQUE NOT NULL email VARCHAR(100) UNIQUE NOT NULL (For password recovery) password_hash VARCHAR(255) NOT NULL (stored as hash for security) created TIMESTAMP DEFAULT CURRENT_TIMESTAMP updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

Story: APUOPE-RE/Wiki#13 Specifications: https://github.com/APUOPE-RE/Wiki/wiki/FR-%E2%80%90-Log-In-&-Sign-Up

williamirva commented 5 days ago

3

williamirva commented 3 days ago

Updated the database structure: UUID to be used in email verification. For security reasons we don't want to use serialized id field for this even though we technically could.

williamirva commented 2 days ago

TESTING INSTRUCTIONS

  1. Pull branch issue5-create-db-structure-for-registration
  2. Run "docker-compose up"
  3. connect to "jdbc:postgresql://localhost:5434/apuope_db" with some database tool
  4. check that schema "apuope" is under "apuope_db" database.
  5. check that table "users" exists with correct columns.
  6. check that table "flyway_schema_history" is under schema "public"
  7. check that flyway_schema_history has two rows in it (one per migration file).