velog-clone-coding
Tables (8)
bookmarks (Untitled)
- id (Key) — Primary key — NOT NULL
- created_id (Field)
- porst_id (id) — BIGINT — Foreign key → users.id
- user_id (id2) — BIGINT — Foreign key → posts.id
comments
- id — BIGINT — Primary key
- post_id — BIGINT — NOT NULL
- author_id — BIGINT — NOT NULL
- content — TEXT — NOT NULL
- created_at — TIMESTAMP
- updated_at — TIMESTAMP
- post_id (id2) — BIGINT — Foreign key → posts.id
- users_id (id3) — BIGINT — Foreign key → users.id
- parent_id (id4) — BIGINT — Foreign key → comments.id
follows (Untitled2)
- id (Key) — Primary key — NOT NULL
- following_id (id) — BIGINT — Foreign key → users.id
- follower_id (id2) — BIGINT — Foreign key → users.id
- created_at (Field)
likes
- id — BIGINT — Primary key
- post_id — BIGINT — NOT NULL
- user_id — BIGINT — NOT NULL
- created_at — TIMESTAMP
- user_id (id2) — BIGINT — Foreign key → posts.id
- post_id (id3) — BIGINT — Foreign key → users.id
post_tags (Untitled3)
- id (Key) — Primary key — NOT NULL
- post_id (id) — BIGINT — Foreign key → posts.id
- tags_id (id2) — BIGINT — Foreign key → tags.id
posts
- id — BIGINT — Primary key
- author_id — BIGINT — Foreign key → users.id
- title — VARCHAR(255) — NOT NULL
- content — TEXT — NOT NULL
- preview — TEXT
- thumbnail — VARCHAR(255)
- read_time — VARCHAR(50)
- created_at — TIMESTAMP
- updated_at — TIMESTAMP
- published_at — TIMESTAMP
- is_published — BOOLEAN
tags
- id — BIGINT — Primary key
- name — VARCHAR(100) — NOT NULL
- created_at — TIMESTAMP
users
- id — BIGINT — Primary key
- email — VARCHAR(255) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- name — VARCHAR(100) — NOT NULL
- bio — TEXT
- profile_image — VARCHAR(255)
- github_url — VARCHAR(255)
- twitter_url — VARCHAR(255)
- website_url — VARCHAR(255)
- created_at — TIMESTAMP
- updated_at — TIMESTAMP