schema - laamp/giftable-rails GitHub Wiki
Database Schema
users
column name | data type | details |
---|---|---|
id |
integer | primary key |
email |
string | unique, indexed, not null |
name |
string | not null |
password_digest |
string | not null |
session_token |
string | unique, indexed, not null |
profile_img |
string | |
timestamps |
datetime | not null |
lists
column name | data type | details |
---|---|---|
id |
integer | primary key |
title |
string | not null |
event_date |
datetime | |
owner_id |
integer | foreign key, indexed, not null |
timestamps |
datetime | not null |
owner_id
referencesusers
table
gifts
column name | data type | details |
---|---|---|
id |
integer | primary key |
description |
string | not null |
gift_img |
string | |
purchased |
boolean | not null, default false |
creator_id |
integer | foreign key, indexed, not null |
recipient_id |
integer | foreign key, indexed, not null |
list_id |
integer | foreign key, indexed, not null |
timestamps |
datetime | not null |
creator_id
referencesusers
tablerecipient_id
referencesusers
tablelist_id
referenceslists
table
users_to_lists
column name | data type | details |
---|---|---|
id |
integer | primary key |
user_id |
integer | foreign key, indexed, not null |
list_id |
integer | foreign key, indexed, not null |
timestamps |
datetime | not null |
user_id
referencesusers
tablelist_id
referenceslists
table