How to view current database schema for Heroku app in Terminal?

前端 未结 3 828
鱼传尺愫
鱼传尺愫 2021-01-30 16:56

I am trying to view my Heroku app\'s schema in Terminal (Mac OS X Lion) and stumbled upon a command that does just that. In Terminal, I run heroku run more db/schema.rb

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-30 17:19

    You could run heroku pg:psql to fire up a Postgres console, then issue \d to see all tables, and \d tablename to see details for a particular table.

提交回复
热议问题