This repository was archived by the owner on Jun 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
新旧スキーマまとめ
giginet edited this page Sep 21, 2014
·
22 revisions
全てのテーブルにid(integer)があるが、省略している。
PKが違うテーブルについては特筆している。
name | type | description | remarks |
---|---|---|---|
pub_state | varchar | 公開状況 | public/protected |
title | varchar | 記事タイトル | max128文字 |
body | text | テキスト | |
author_id | integer | 作者 | |
created_at | datetime | 作成日 | |
updated_at | datetime | 更新日 |
- _body_rendered
- sage
- updated_by_id
- publish_at
- publish_at_date
- body_markup_type
name | type | description | remarks |
---|---|---|---|
content_file | varchar | 添付ファイルのパス | max=100 |
author_id | integer | 作者 | |
slug | varchar | slug | max=50 |
ip_address | char | IPアドレス | 15 |
created_at | datetime | 作成日 |
- pub_state
- license
- title
- body
- project_id
- pv
- update_at
- テーブル名を
commons_material
からリネーム - file -> content_file
- content_fileのパスを変更
- storage/commons/[author.username]/[filename]
- attachments/[author.username]/[filename]
- slugを生成
- 変換後のcontent_file.nameの値からsha1を生成
name | type | description | remarks |
---|---|---|---|
label | varchar | ラベル | max=255 |
author_id | integer | 作者 |
name | type | description | remarks |
---|---|---|---|
pub_state | varchar | 公開状況 | public/protected/draft |
title | varchar | 記事タイトル | max255文字 |
body | text | 本文 | |
category_id | integer | カテゴリ | |
author_id | integer | 作者 | |
created_at | datetime | 作成日 | |
updated_at | datetime | 更新日 | |
publish_at | datetime | 公開日 |
- body_markup_type
- _body_rendered
- publish_at_date
name | type | description | remarks |
---|---|---|---|
content_type_id | integer | ContentTypeID | |
object_pk | text | オブジェクトID | |
site_id | integer | サイトID | |
user_id | integer | ユーザーID | |
user_name | varchar | ユーザー名 | max=50 |
user_email | varchar | メールアドレス | max=75 |
user_url | varchar | URL | max=200 |
comment | text | 本文 | |
submit_date | datetime | 投稿日 | |
ip_address | char | IPアドレス | max=39 |
is_public | bool | 公開中かどうか | |
is_remove | bool | 削除フラグ |
- _comment_rendered
- comment_markup_type
- テーブル名をmcomments_markitupcommentから変更
- 地獄のcontent_type
name | type | description | remarks |
---|---|---|---|
pub_state | varchar | 公開状況 | public/protected/draft |
title | varchar | 記事タイトル | max255文字 |
body | text | 本文 | |
period_start | datetime | 開始日時 | null |
period_end | datetime | 終了日時 | null |
place | varchar | 開催場所 | |
number_restriction | integer unsigned | 最大参加人数 | null |
attendance_deadline | datetime | 参加締め切り日時 | null |
category_id | integer | カテゴリ | |
organizer_id | integer | 作者 | |
created_at | datetime | 作成日 | |
updated_at | datetime | 更新日 |
- location
- body_markup_type
- _body_rendered
- publish_at
- publish_at_date
- gcal
- author_id->organizer_id
中間テーブル
name | type | description | remarks |
---|---|---|---|
event_id | integer | イベントID | |
persona_id | integer | 参加者のID |
- テーブル名events_event_members -> events_event_attendees
- user_id -> persona_id
name | type | description | remarks |
---|---|---|---|
password | varchar | ContentTypeID | |
last_login | datetime | オブジェクトID | |
username | varchar | 作者 | |
first_name | varchar | 引用 | max=512, null |
last_name | varchar | ||
varchar | Eメール | max=75 | |
is_active | bool | 有効フラグ | |
date_joined | datetime | メンバー加入日 | |
nickname | varchar | ニックネーム | max=30 |
quotes | varchar | ムードメッセージ | max=127, default="" |
avatar | varchar | ユーザーアイコン | max=100 |
gender | varchar | 10 | man/woman |
role | varchar | 10 | adam/seele/nerv/children/wille |
- is_superuser
- is_staff
- 旧profiles_profileから写す
- mood -> quotes
- icon -> avatar
- sex -> gender
- avatarのパスを変更
- storage/profiles/[username]/[filename]
- profiles/[username]/filename
name | type | description | remarks |
---|---|---|---|
profile_id | integer | プロフィールID | |
service_id | integer | サービスID | |
pub_state | varchar | 公開状態 | public/protected |
username | varchar | ユーザー名 |
- テーブル名をprofiles_serviceから移行
- service->service_id
- service(varchar)->service_id(integer)
- serviceを以下の対応表に応じて写す
service | service_id |
---|---|
skype | 2 |
wlm | None |
1 | |
mixi | 17 |
3 | |
foursquare | 4 |
5 | |
pixiv | 6 |
hatena | 7 |
xbl | 9 |
psn | 10 |
dropbox | 8 |
name | type | description | remarks |
---|---|---|---|
pub_state | varchar | 公開状況 | public/protected |
birthday | date | 誕生日 | null |
place | varchar | 住んでる場所 | null |
url | varchar | URL | null |
remarks | text | 自己紹介 | |
user_id | integer | ユーザー | |
created_at | datetime | 作成日 | |
updated_at | datetime | 更新日 |
- nickname
- mood
- icon
- sex
- location
- twitter_token
- user_id
- remarks_markup_type
- _remarks_rendered
中間テーブル
name | type | description | remarks |
---|---|---|---|
profile_id | integer | プロフィールID | |
skill_id | integer | スキルID |
name | type | description | remarks |
---|---|---|---|
pub_state | varchar | 公開状態 | public/protected |
status | varchar | 活動状況 | planning/active/paused/eternal/done |
title | varchar | タイトル | max=127 |
slug | varchar | slug | max=63 |
body | text | プロジェクト詳細 | |
icon | varchar | アイコン | null |
administrator_id | int | 管理者ID | |
created_at | datetime | 作成日 | |
updated_at | datetime | 更新日 | |
tracker | varchar | トラッカーURL | null |
repository | varchar | リポジトリURL | null |
- permission
- body_markup_type
- _body_rendered
- updated_by_id
- group_id
- publish_at
- publish_at_date
- bugwaz_id
- author_id -> administrator_id
- iconのパスを変換
- storage/projects/[slug]/[filename]
- projects/[slug]/[filename]
中間テーブル
name | type | description | remarks |
---|---|---|---|
project_id | integer | プロジェクトID | |
persona_id | integer | ユーザーID |
- user_id->persona_id
name | type | description | remarks |
---|---|---|---|
content_type_id | integer | ContentTypeID | |
object_id | integer unsigned | オブジェクトID | |
author_id | integer | 作者 | |
quote | varchar | 引用 | max=512, null |
created_at | datetime |
- tag
- テーブル名 star_star->stars_star
- comment->quote
- 地獄のcontent_type
※移行の必要がない奴は面倒で一部スキーマを省略している
name | type | description | remarks |
---|---|---|---|
label | varchar | ラベル | max=255 |
order | integer | 並び順 |
Productは新規アプリのため移行を考えなくて良い。
そのため、とりあえずスキーマは省略する;。
移行なし
name | type | description | remarks |
---|---|---|---|
label | varchar | ラベル | max=64 |
icon | varchar | アイコン | max=199 |
url_pattern | varchar | URLパターン | max=256 |
移行の必要なし
name | type | description | remarks |
---|---|---|---|
label | varchar | ラベル | max=32 |
description | varchar | 概要 | max=128 |
order | integer | 並び順 |
name | type | description | remarks |
---|---|---|---|
label | varchar | ラベル | max=32 |
移行なし
name | type | description | remarks |
---|---|---|---|
title | varchar | タイトル | max=128 |
url | varchar | 元記事のURL | |
thumbnail | varchar | サムネイル | |
publish_at | datetime | 公開日 |