Skip to content

Postgres Database Schema

Catherine Vidos edited this page Sep 13, 2020 · 8 revisions

Welcome to the Pinteriors wiki!

users

column name data type details
id integer not null primary key
username string not null indexed, unique
email string not null indexed unique
full name string not null
password_digest string not null
session_token string not null indexed unique
created_at date, time not null
updated_at date, time not null
  • index on username, unique: true
  • index on email, unique: true
  • index on session_token, unique: true

boards

column name data type details
id integer not null primary key
title string not null
description string not null
user_id integer not null
created_at date, time not null
updated_at date, time not null

pins

column name data type details
id integer not null primary key
title string not null
description string not null
user_id integer not null
source_link string not null
created_at date, time not null
updated_at date, time not null

join_pins_boards

column name data type details
id integer not null primary key
pin_id string not null indexed unique
board_id string not null indexed unique
created_at date, time not null
updated_at date, time not null

followers

column name data type details
id integer not null primary key
follower_id string not null indexed
following_id string not null indexed
created_at date, time not null
updated_at date, time not null
Clone this wiki locally