-
Notifications
You must be signed in to change notification settings - Fork 0
Schema
KellyAnneSantos edited this page Dec 12, 2022
·
9 revisions
column name | data type | constraints |
---|---|---|
id | int | primary key, auto increment |
first_name | varchar(50) | not null |
last_name | varchar(50) | not null |
username | varchar(50) | not null, unique |
varchar(50) | not null, unique | |
biography | varchar(256) | |
hashed_password | varbinary | not null |
preview_image | varchar(256) | not null |
created_at | datetime | now(), not null |
updated_at | datetime | now(), not null |
column name | data type | constraints |
---|---|---|
id | int | primary key, auto increment |
user_id | int | not null FK(references: > users.id) |
follows_user_id | int | not null FK(references: > users.id) |
following_status | boolean | not null, default true |
created_at | datetime | now(), not null |
updated_at | datetime | now(), not null |
column name | data type | constraints |
---|---|---|
id | int | primary key, auto increment |
user_id | int | not null FK(references: > users.id) |
caption | varchar(256) | |
location | varchar(100) | |
created_at | datetime | now(), not null |
updated_at | datetime | now(), not null |
column name | data type | constraints |
---|---|---|
id | int | primary key, auto increment |
user_id | int | not null FK(references: > users.id) |
post_id | int | not null FK(references: > posts.id) |
media_file | varchar(256) | not null |
type | varchar(256) | not null |
created_at | datetime | now(), not null |
updated_at | datetime | now(), not null |
column name | data type | constraints |
---|---|---|
id | int | primary key, auto increment |
user_id | int | not null FK(references: > users.id) |
post_id | int | not null FK(references: > posts.id) |
like_status | boolean | not null, default true |
created_at | datetime | now(), not null |
updated_at | datetime | now(), not null |
column name | data type | constraints |
---|---|---|
id | int | primary key, auto increment |
user_id | int | not null FK(references: > users.id) |
post_id | int | not null FK(references: > posts.id) |
comment | varchar(256) | not null |
created_at | datetime | now(), not null |
updated_at | datetime | now(), not null |
column name | data type | constraints |
---|---|---|
id | int | primary key, auto increment |
user_id | int | not null FK(references: > users.id) |
comment_id | int | not null FK(references: > comments.id) |
reply | varchar(256) | not null |
created_at | datetime | now(), not null |
updated_at | datetime | now(), not null |