database schema - michael-berman/Blue-Prints GitHub Wiki
Column |
Data Type |
Details |
username |
string |
not null |
email |
string |
not null |
password_digest |
string |
not null |
session_token |
string |
not null |
created_at |
dateTime |
not null |
updated_at |
dateTime |
not null |
- Add index on username
- has_many projects
- has_many comments
- has_many favorites
Column |
Data Type |
Details |
title |
string |
not null |
body |
string |
not null |
author_id |
integer |
not null |
category_id |
integer |
not null |
created_at |
dateTime |
not null |
updated_at |
dateTime |
not null |
- belongs_to author
- has_many comments (association)
- has_many pictures (assocation)
- has_many videos (assocation)
- has_many steps (assocation)
- has_many favorites (association)
- Add index on title (for search by keywords)
- Add index on author_id
- Add index on category_id
Column |
Data Type |
Details |
header |
string |
not null |
description |
string |
not null |
project_id |
integer |
not null |
created_at |
dateTime |
not null |
updated_at |
dateTime |
not null |
- belongs_to project (association)
- has_many pictures (association)
- has_many videos (association)
Comments
Column |
Data Type |
Details |
body |
string |
not null |
author_id |
integer |
not null |
project_id |
integer |
not null |
created_at |
dateTime |
not null |
updated_at |
dateTime |
not null |
- belongs_to author (association)
- belongs_to project (association)
Column |
Data Type |
Details |
url |
string |
not null |
step_id |
integer |
not null |
created_at |
dateTime |
not null |
updated_at |
dateTime |
not null |
- belongs_to project (association)
- belongs_to step (association)
Column |
Data Type |
Details |
url |
string |
not null |
step_id |
integer |
not null |
created_at |
dateTime |
not null |
updated_at |
dateTime |
not null |
- belongs_to project (association)
- belongs_to step (association)
Column |
Data Type |
Details |
title |
string |
not null |
created_at |
dateTime |
not null |
updated_at |
dateTime |
not null |
Column |
Data Type |
Details |
author_id |
integer |
not null |
project_id |
integer |
not null |
created_at |
dateTime |
not null |
updated_at |
dateTime |
not null |
- belongs_to author (association)
- belongs_to project (association)
⚠️ **GitHub.com Fallback** ⚠️