-
Notifications
You must be signed in to change notification settings - Fork 2
Database Schema
emmilco edited this page Mar 10, 2018
·
22 revisions
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
full_name | string | not null |
string | not null, index | |
session_token | string | not null |
password_digest | string | not null |
bio | string | not null |
timestamps | datetime | |
*Note: Users have avatars |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
title | string | not null, default: "untitled" |
author_id | integer | not null, foreign key, indexed |
publish_date | datetime | indexed |
published | boolean | |
timestamps | datetime | |
*Note: Articles have featured images. |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
chunkable_id | integer | not null, foreign key, indexed |
content | text | |
ord | integer | not null, indexed |
content_type | string | in: [paragraph, h1, h2, h3, pull_quote, block_quote, divider, image], not null, default: "paragraph" |
timestamps | datetime |
*in the first iteration, chunkable_id references an article. Eventually it will be revised to form the basis of a polymorphic association.
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
article_id | integer | not null, foreign key, indexed |
author_id | integer | not null, foreign key, indexed |
content | text | not null |
timestamps | datetime |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
follower_id | integer | not null, foreign key, indexed |
followee_id | integer | not null, foreign key, indexed |
timestamps | datetime |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
howlable_id | integer | not null, foreign key, indexed |
howlable_type | string | not null, indexed |
howler_id | integer | not null, foreign key, indexed |
timestamps | datetime |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
tag_name | string | not null |
timestamps | datetime |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
article_id | integer | not null, foreign key, indexed |
tag_id | integer | not null, foreign key, indexed |
timestamps | datetime |