tohokuaikiのチラシの裏

技術的ネタとか。

2017-01-30から1日間の記事一覧

MySQLのForeignキー指定時の自動命名則

今更だけど、MySQLのForeignキーの自動命名則。 たとえば、こんなテーブルを作った時。 CREATE TABLE `author_author_type` ( `id` int (10) unsigned NOT NULL AUTO_INCREMENT, `author_id` int (10) unsigned NOT NULL, `author_type_id` int (10) unsigne…