Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate database schema graph for one application using ActiveRecord?

I want to generate graphs to describe the relations within a application using ActiveRecord, is there some gem to accomplish that?

such as this one database graph

like image 707
steveyang Avatar asked Oct 30 '12 07:10

steveyang


1 Answers

There was good gem for this: https://github.com/amatsuda/erd

But as I see it was last updated 2 years ago.

According to the README it has the following features:

  • Erd draws an ER diagram based on your app's database and models
  • You can drag and arrange the positions of each model
  • You can operate DB schema manipulations such as add column, rename column, alter column, create model (as well as table), and drop table
  • Then, Erd generates migration files on the server
  • And you can run each migration on your browser
like image 156
Nickolay Kondratenko Avatar answered Nov 02 '22 21:11

Nickolay Kondratenko