Skip to content

Instantly share code, notes, and snippets.

@jodell
Created August 21, 2012 18:31
Show Gist options
  • Save jodell/3418189 to your computer and use it in GitHub Desktop.
Save jodell/3418189 to your computer and use it in GitHub Desktop.
gawk 'match($0, /CREATE (TABLE|SEQUENCE|UNIQUE INDEX) (\w+)/, a) { print a[2] }' db/structure.sql > structures.out
@jodell
Copy link
Author

jodell commented Aug 27, 2012

ad_server_credentials
ad_server_ids
advertisers
invites
negotiations_websites
phone_numbers
placement_snapshots
proposal_snapshots
proposal_snapshots_websites
proposals_websites
sync_messages
sync_messages_users

@jodell
Copy link
Author

jodell commented Aug 27, 2012

heroku pg:psql; \o prod-structures.out; select relname from pg_stat_user_tables WHERE schemaname='public'; \o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment