Skip to content

saiesaire/chat-space

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat-space DB設計

usersテーブル

Column Type Options
email string null: false
password string null: false
name string null: false,index: true

Association

  • has_many :users_groups
  • has_many :messages
  • has_many :groups, through: :users_groups

groupsテーブル

Column Type Options
name string null: false

Association

  • has_many :messages
  • has_many :users_groups
  • has_many :users, through: :users_groups

users_groupsテーブル

Column Type Options
user_id references null: false, foreign_key: true
group_id references null: false, foreign_key: true

Association

  • belongs_to :user
  • belongs_to :group

messagesテーブル

Column Type Options
body text
image string
group_id references null: false, foreign_key: true
user_id references null: false, foreign_key: true

Association

  • belongs_to :user
  • belomgs_to :group

About

Chat-Spaceのデータベース設計

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published