Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 657 Bytes

schema.md

File metadata and controls

30 lines (25 loc) · 657 Bytes

8 tables

  1. users
CREATE TABLE users(
  id SERIAL PRIMARY KEY,
  created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
  companyname VARCHAR(20) NOT NULL,
  email VARCHAR(255) UNIQUE NOT NULL,
  password VARCHAR(500) NOT NULL,
  name VARCHAR(40) NOT NULL,
);

  1. reviews
CREATE TABLE reviews(
  id SERIAL PRIMARY KEY,
  created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
  user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
  content VARCHAR(500),
  rating smallint
);