Попытка запустить приложение rails.Я получаю эту ошибку из следующего определения таблицы, указанного коллегой в виде schema.rb.
ActiveRecord::StatementInvalid: Mysql2::Error: Incorrect table definition; there can be only one auto column and it must be defined as a key
Определение таблицы:
create_table "wv latest", id: false, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
t.integer "id", null: false, auto_increment: true
t.string "cid", limit: 10
t.integer "visit_id"
t.string "cfname", limit: 20
t.string "clname", limit: 25
end
Когда я удаляю
auto_increment: true
Ошибка исчезает.Почему это происходит и почему схема не работает в моей настройке?