Real World
Tables (4)
Article
- id — bigint — Primary key — NOT NULL
- author_id (Key) — bigint — Foreign key → User.id — NOT NULL
- title (Field) — varchar — NOT NULL
- description (Field2) — varchar — NOT NULL
- body (Field3) — text — NOT NULL
- created_at (Field5) — datetime — NOT NULL
- updated_at (Field6) — datetime
ArticleFavorite (Untitled)
- id (Key2) — bigint — Primary key — NOT NULL
- article_id (id) — bigint — Foreign key → Article.id — NOT NULL
- user_id (Key) — bigint — Foreign key → User.id — NOT NULL
- created_at (Field) — datetime
Comment
- id (Key) — bigint — Primary key — NOT NULL
- article_id (id) — bigint — Foreign key → Article.id — NOT NULL
- author_id (Key2) — bigint — Foreign key → User.id — NOT NULL
- body (Field) — varchar
- created_at (Field3) — datetime
- updated_at (Field4) — datetime
User
- id (Key) — bigint — Primary key — NOT NULL
- email (Field) — varchar — unique
- password (Field2) — varchar
- username (Field3) — varchar
- bio (Field4) — varchar
- image (Field5) — varchar
- created_at (Field6) — datetime
- updated_at (Field7) — datetime