
SET SESSION sql_mode='TRADITIONAL,NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY'
*_id は極力使わない (_code とか)user.id ← user_id, friend_user_idSELECT UUID_SHORT()user_idbook_idhttps://dev.mysql.com/doc/refman/5.6/en/storage-requirements.html
ユニークキー制約をかける場合、そのフィールド長の上限が767bytesになっている。 文字列にユニークキー制約をかける場合等に注意が必要
innodb_large_prefix というものがあって 767bytes 制約を外せる