A quick way to check your Rails database schema

Sometimes, we need to check what our database schema looks like. Instead of spinning up a database GUI tool like MySQL Workbench and doing a few clicks (or a whole lot of clicks if using pgAdmin!), you can view the db/schema.rb file that Rails maintains for you.

This file should tell you most of the wonderful things you typically need to know about your database schema.

So much fun.

Sajad Torkamani

Hello! My name is Sajad. I’m a software developer at Nationwide and an aspiring entrepreneur. Originally from Afghanistan, I moved to London at an early age and have been living here for the past 20 years.

This is my personal website where I blog mostly about programming with occasional thoughts on a bunch of other things. I write mainly for my own benefit as I find that writing helps clarify my otherwise very confused thoughts.

Get in touch: sajadtorkamani1@gmail.com