Skip to content

Instantly share code, notes, and snippets.

@joecannatti
Created November 15, 2011 15:12
Show Gist options
  • Save joecannatti/1367304 to your computer and use it in GitHub Desktop.
Save joecannatti/1367304 to your computer and use it in GitHub Desktop.
print a table from the schema in a rails project
schema ()
{
sed -n "/table \"$1\"/,/^ *end/ p" db/schema.rb
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment