How to turn off auto_increment in Rails Active Record
activerecord, auto-increment, ruby-on-rails
Solution
Try this?
create_table(:table_name, :id => false) do |t|
t.integer :id, :options => 'PRIMARY KEY'
end
Problem
Is it possible to create primary key without `auto_increment` flag in ActiveRecord? I can't do ``` create table :blah, :id => false ``` because I want to have primary key index on the column. I looked up documentation but didn't find anything useful. Is it possible to create primary key without auto_increment?