Skip to content

Instantly share code, notes, and snippets.

@seiya0-g
Created May 5, 2023 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seiya0-g/395d650594ed425a05033956a419e5df to your computer and use it in GitHub Desktop.
Save seiya0-g/395d650594ed425a05033956a419e5df to your computer and use it in GitHub Desktop.
ER図 例

ER図

tweetデータベース

---
title: "タイトル"
---
erDiagram
    users ||--o{ tweets : ""

    users {
        bigint id PK "ID"
        varchar name "名称"
        varchar username "ユーザー名"
        varchar description "説明"
        timestamp deleted_at "削除日時"
        timestamp created_at "作成日時"
        timestamp updated_at "更新日時"
    }

    tweets {
        bigint id PK "ID"
        bigint author_id FK "オーサーID:users.id"
        varchar tweet "ツイート"
        timestamp deleted_at "削除日時"
        timestamp created_at "作成日時"
        timestamp updated_at "更新日時"
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment