Skip to content
This repository was archived by the owner on Jun 29, 2020. It is now read-only.

新旧スキーマまとめ

giginet edited this page Sep 21, 2014 · 22 revisions

全てのテーブルにid(integer)があるが、省略している。

PKが違うテーブルについては特筆している。

移行の必要あり

announcements_announcements

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

attachments_material

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を生成

blogs_category

name type description remarks
label varchar ラベル max=255
author_id integer 作者

blogs_entry

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

django_comments

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

events_event

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

events_event_attendees

中間テーブル

name type description remarks
event_id integer イベントID
persona_id integer 参加者のID

特記事項

  • テーブル名events_event_members -> events_event_attendees
  • user_id -> persona_id

personas_persona

name type description remarks
password varchar ContentTypeID
last_login datetime オブジェクトID
username varchar 作者
first_name varchar 引用 max=512, null
last_name varchar
email 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

profiles_account

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
twitter 1
mixi 17
facebook 3
foursquare 4
google 5
pixiv 6
hatena 7
xbl 9
psn 10
dropbox 8

profiles_profile

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

profiles_profile_skills

中間テーブル

name type description remarks
profile_id integer プロフィールID
skill_id integer スキルID

projects_project

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]

projects_project_members

中間テーブル

name type description remarks
project_id integer プロジェクトID
persona_id integer ユーザーID

特記事項

  • user_id->persona_id

stars_star

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

移行の必要なし

※移行の必要がない奴は面倒で一部スキーマを省略している

auth_group

auth_group_permissions

auth_permission

djang_admin_log

django_comment_flags

django_content_type

django_session

django_site

events_category

name type description remarks
label varchar ラベル max=255
order integer 並び順

personas_persona_groups

personas_persona_user_permissions

products_category

products_packagerelease

products_platform

products_product

products_product_administrators

products_product_categories

products_product_platforms

products_screenshot

products_urlrelease

Productは新規アプリのため移行を考えなくて良い。

そのため、とりあえずスキーマは省略する;。

profiles_service

移行なし

name type description remarks
label varchar ラベル max=64
icon varchar アイコン max=199
url_pattern varchar URLパターン max=256

profiles_skill

移行の必要なし

name type description remarks
label varchar ラベル max=32
description varchar 概要 max=128
order integer 並び順

projects_category

name type description remarks
label varchar ラベル max=32

recent_activities_recentacrivity

移行なし

name type description remarks
title varchar タイトル max=128
url varchar 元記事のURL
thumbnail varchar サムネイル
publish_at datetime 公開日

registration_registrationprofile

registrations_registrationsupplement

Clone this wiki locally