begin29
5/17/2016 - 9:12 AM

Database tools

Database tools

# clean restore postgress database from dump
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U postgres -d pixaloca_development pixaloca.dump

# create ssh-tunel to remote database
https://support.cloud.engineyard.com/hc/en-us/articles/205408088-Access-Your-Database-Remotely-Through-an-SSH-Tunnel

# sql select and group tips 
https://habrahabr.ru/post/149571/

# row expiration in raw sql
http://stackoverflow.com/questions/20744508/best-way-to-manage-row-expiration-in-mysql