Open kikunantoka opened 7 years ago
Thanks for reporting!
I'd guess the reason has to do with the state of the in-memory cache of the accessible ActiveRecord objects with tables when inside enhance
(which I haven't used before, so I learned something today!)
I don't know if we need to solve this or not, but if I were to solve it, I'd say merge
ing those 2 tables to any user-supplied exclude
options would be an easy way to solve it; I can't imagine anyone ever expecting those tables to be represented.
I don't see this problem. I was looking for a way to have ERD automatically updated on migrate (I thought this used to happen automatically, maybe I'm wrong) and found this issue. I copied the meat of the code into lib/tasks/erd.rake
and it works great. No weird AR tables now. I'm on rails (5.0.1)
and rails-erd (1.5.0)
and inheriting my base model class as ApplicationRecord < ActiveRecord::Base
.
Rake::Task["db:migrate"].enhance do
Rake::Task["erd"].invoke
end
I want to use erd generating automatically. I wrote Rakefile as follows.
When I typed
$ rails db:migrate
, generated ER diagram has AcriveRecord::* tables such asActiveRecord::InternalMetadata
,ActiveRecord::SchemaMigration
.However, there is no AcriveRecord::* tables in generated ER diagram using following task.
I resolved this problem setting .erdconfig as follows.
I think this is not really problem but I report this problem.