-
Notifications
You must be signed in to change notification settings - Fork 0
Database Schema
Bart Dorsey edited this page Feb 26, 2021
·
5 revisions
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| username | string | not null, |
| string | not null, indexed, unique | |
| created_at | datetime | not null |
| updated-at | datetime | not null |
- index on
email, unique: true
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| content | string | not null |
| userId | integer | not null, foreign key |
| created_at | datetime | not null |
| updated-at | datetime | not null |
-
userIdreferencesuserstable
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| content | string | not null |
| userId | integer | not null, foreign key |
| fauxCommentId | integer | not null, foreign key |
| created_at | datetime | not null |
| updated-at | datetime | not null |
-
userIdreferencesuserstable -
fauxCommentIdreferencesfauxcommentstable
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| userId | integer | not null, indexed, foreign key |
| fauxTweetId | integer | indexed, foreign key |
| fauxCommentId | integer | indexed, foreign key |
-
userIdreferencesuserstable -
fauxTweetIdreferencesfauxtweetstable -
fauxCommentIdreferencesfauxcommentstable - Unique index on
[userId, fauxTweetId] - Unique index on
[userId, fauxCommentId]