:created_at, :datetime, :nullHowever, one thing had changed somewhere on the way. I had a many-to-many table declaration like such;
:updated_at, :datetime, :null
:lock_version, :integer, :null
create_table(:manufacturers_suppliers, :id => false) do |t|
t.column :manufacturer_id, :integer, :null => false
t.column :supplier_id, :integer, :null => false
end
What I didn't know was a) if you don't have an id (:id => false), the plug-in doesn't create the fields, but b) just as you can disable the fields with :row_version => false, you can also "force" enable them with :row_version => true. Hence, changing to:
create_table(:manufacturers_suppliers, :id => false, :row_version => true) do |t|
t.column :manufacturer_id, :integer, :null => false
t.column :supplier_id, :integer, :null => false
end
Made the fields appear and it solved my problem. Sweet!
No comments:
Post a comment