質問編集履歴

2

エラー内容を追加しました。

2020/05/26 02:11

投稿

ypk
ypk

スコア80

test CHANGED
File without changes
test CHANGED
@@ -80,6 +80,12 @@
80
80
 
81
81
  を用いて連携させようとしたのですがエラーが発生してしまいます。
82
82
 
83
+ エラーメッセージは以下の通りです。
84
+
85
+
86
+
87
+ > Cannot add foreign key constraint
88
+
83
89
 
84
90
 
85
91
  参考にした記事:https://www.sejuku.net/blog/54072#i-6

1

エラーメッセージを追加しました。

2020/05/26 02:11

投稿

ypk
ypk

スコア80

test CHANGED
File without changes
test CHANGED
@@ -94,6 +94,26 @@
94
94
 
95
95
 
96
96
 
97
+ #エラーメッセージ
98
+
99
+ > FOREIGN KEY(?X???) REFERENCES checker(?X???):
100
+
101
+ Cannot find an index in the referenced table where the
102
+
103
+ referenced columns appear as the first columns, or column types
104
+
105
+ in the table and the referenced table do not match for constraint.
106
+
107
+ Note that the internal storage type of ENUM and SET changed in
108
+
109
+ tables created with >= InnoDB-4.1.12, and such columns in old tables
110
+
111
+ cannot be referenced by such columns in new tables.
112
+
113
+ Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-foreign-key-constraints.html for correct foreign key definition.
114
+
115
+
116
+
97
117
  checkerにある「店舗名」をsaleにある「店舗名」の外部キーとし連携させようとしています。
98
118
 
99
119
  もし何か、気になる箇所などございましたらご教授いただけたら幸いです。どうぞよろしくお願いいたします。