0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【オリジナルアプリのDBを考える】

Posted at

What

DB設計をREADMEに書く前にmarkdownで書く

Why

明白にするため(メモ)

DB設計

usersテーブル

Column Type Options
username string null: :false
email string null: :false, unique: true
password string null: :false

Association






blogsテーブル

Column Type Options
user_id references null: :false
image
title string null: :false
text text null: :false
date date null: :false

Association






videoテーブル

Column Type Options
user_id references null: :false
video
title string null: :false
text text null: :false
date date null: :false

Association






photosテーブル

Column Type Options
user_id references null: :false
image
title string null: :false
text text null: :false
date date null: :false

Association






profilesテーブル

Column Type Options
user_id references null: :false
image
username string null: :false
birthday text null: :false
birthplace date null: :false
bloodgroup string null: :false
height integer null: :false

Association






0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?