LoginSignup
2

More than 5 years have passed since last update.

MovableTypeで記事とカテゴリの関連付けはどこに保存されているのか?

Last updated at Posted at 2015-06-24

記事とカテゴリの紐付け情報はmt_placementテーブルに保存されています。

select * from mt_placement  order by placement_entry_id;

自分のブログで見てみたらこんな結果でした。

placement_id placement_blog_id placement_category_id placement_entry_id placement_is_primary
1 1 1 6 1
2 1 2 10 1
3 1 3 11 1
4 1 2 13 1
5 1 2 14 1
6 1 2 17 1
7 1 2 18 1
10 1 5 18 0

placement_is_primaryは名前から類推するに「主要カテゴリ」でしょうか。

mt_entry.entry_category_id は嘘だ

mt_entryテーブルにentry_category_idというそれっぽい名前のカラムがあるのですが、
あれは空です。

歴史的事情というやつでしょう。

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
2