Visualizing Your Database Schema Entirely in Rails

I was recently looking into a tool to visualize the schema in a rails app, and found mostly windows only solutions. Some of these included two steps: one to convert your schema into another format (usually XML) and another step which included using a windows only executable to convert that into a diagram.

However, among these I found an interesting plugin which would allow you to not only view your schema live in your application, but also to make changes to it.

I'm not exactly comfortable with the tool being embeded in my application when it has no security around it (can you imagine that being deployed to production?), but I alleviated that fear by checking out a separate copy of the code and installing the plugin into that copy. I didn't check it in (obviously), and use that copy when I need visualization of the schema.

This, of course, is a less than ideal situation; however, the plugin author mentions this concern and plans to address it in a future version. Probably a better way for me to handle this limitation would be to make the code configurable per environment, and then contribute the fix back by creating a new branch in git.

Regardless, this is a valuable plugin. If your particular itch happens to be the same as mine then this plugin might just scratch it for you.

Github: schema-browser
Author's Blog Post about schema-browser