Database Schema - crespohector/Inspired GitHub Wiki

Database Schema

Inspired

users

Column Name Data Type Details
id Integer Not Null, Primary Key
username String Not Null
email String Not Null, unique
hashed_password String Not Null
created_at DateTime Not Null
update_at DataTime Not Null
  • unique: true`

collections

Column Name Data Type Details
id Integer Not Null, Primary Key
title String(150) Not Null
user_id Integer Not Null, Foreign Key
created_at DateTime Not Null
update_at DataTime Not Null
  • user_id references users table

collections_quotes

Column Name Data Type Details
collection_id Integer Not Null, Foreign Key
quote_id Integer Not Null, Foreign Key
created_at DateTime Not Null
update_at DateTime Not Null
  • collection_id references collections table
  • quote_id references quotes table

quotes

Column Name Data Type Details
id Integer Not Null, Primary Key
content String Not Null
user_id Integer Foreign Key
created_at DateTime Not Null
update_at DataTime Not Null
  • user_id references users table

favorites

Column Name Data Type Details
id Integer Not Null, Primary Key
quote_id String Not Null
user_id Integer Not, Null,Foreign Key
created_at DateTime Not Null
update_at DataTime Not Null
  • user_id references users table
  • quote_id references quotes table

dislikes

Column Name Data Type Details
id Integer Not Null, Primary Key
quote_id String Not Null
user_id Integer Not, Null,Foreign Key
created_at DateTime Not Null
update_at DataTime Not Null
  • user_id references users table
  • quote_id references quotes table