Repository navigation
Schema
AlbertgitC edited this page Oct 6, 2019
·
7 revisions
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| username | string | not null, indexed, unique |
| string | not null, indexed, unique | |
| password_digest | string | not null |
| session_token | string | not null, indexed, unique |
| created_at | datetime | not null |
| updated_at | datetime | not null |
- index on
username, unique: true - index on
email, unique: true - index on
session_token, unique: true
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| picture_url | string | not null, unique |
| body | string | |
| author_id | integer | not null, indexed, foreign key |
| created_at | datetime | not null |
| updated_at | datetime | not null |
-
author_idreferencesusers - index on
author_id
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| body | string | not null |
| feed_id | integer | not null, indexed, foreign key |
| author_id | integer | not null, foreign key |
| created_at | datetime | not null |
| updated_at | datetime | not null |
-
feed_idreferencesfeeds -
author_idreferencesusers
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| feed_id | integer | not null, indexed, foreign key |
| comment_id | integer | not null, indexed, foreign key |
| author_id | integer | not null, foreign key |
| created_at | datetime | not null |
| updated_at | datetime | not null |
-
feed_idreferencesfeeds -
comment_idreferencescomments -
author_idreferencesusers - index on
[:feed_id, comment_id], unique: true
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| user_id | integer | not null, indexed, foreign key |
| follower_id | integer | not null, indexed, foreign key |
| created_at | datetime | not null |
| updated_at | datetime | not null |
-
user_idreferencesusers -
follower_idreferencesusers