Mysql::Error: Specified key was too long; max key length is 767 bytes: CREATE INDEX

后端 未结 5 1511
时光说笑
时光说笑 2020-12-06 05:48

I\'m working with rails 2.3.5 application, in witch I have this field

t.string   \"trip_cities\",             :limit => 256

And this ind

5条回答
  •  攒了一身酷
    2020-12-06 06:19

    how about changing the migration itself:

    remove_index "bookings", :name => :trip_cities
    add_index "bookings", ["trip_cities"], :name => :trip_cities, :length => { :trip_cities => 255 }
    

提交回复
热议问题