I keep getting this mysql error code #1089

With the part

PRIMARY KEY (`movie_id`(3))

you are telling mysql to create a sub part key* on the first 3 Bytes of movie id. This only works for string types.

You need to use

PRIMARY KEY (`movie_id`)

without providing a length.

*Is this sure the query resulting in the error? Never saw that on a primary key, its used for indexes.

Leave a Comment